diff --git a/core/Logger.cpp b/core/Logger.cpp index 89fdbced..5896792a 100644 --- a/core/Logger.cpp +++ b/core/Logger.cpp @@ -265,6 +265,8 @@ void Logger::LogToOpenFileEx(FILE *fp, const char *msg, va_list ap) return; } + static ConVar *sv_logecho = icvar->FindVar("sv_logecho"); + char buffer[3072]; UTIL_FormatArgs(buffer, sizeof(buffer), msg, ap); @@ -275,7 +277,11 @@ void Logger::LogToOpenFileEx(FILE *fp, const char *msg, va_list ap) strftime(date, sizeof(date), "%m/%d/%Y - %H:%M:%S", curtime); fprintf(fp, "L %s: %s\n", date, buffer); - g_SMAPI->ConPrintf("L %s: %s\n", date, buffer); + + if (!sv_logecho || sv_logecho->GetBool()) + { + g_SMAPI->ConPrintf("L %s: %s\n", date, buffer); + } } void Logger::LogToFileOnlyEx(FILE *fp, const char *msg, va_list ap) diff --git a/core/MenuVoting.cpp b/core/MenuVoting.cpp index 8b69fd8a..0a873b67 100644 --- a/core/MenuVoting.cpp +++ b/core/MenuVoting.cpp @@ -518,7 +518,7 @@ void VoteMenuHandler::OnMenuSelect(IBaseMenu *menu, int client, unsigned int ite m_Votes[item]++; m_NumVotes++; - if (sm_vote_chat.GetBool() || sm_vote_console.GetBool()) + if (sm_vote_chat.GetBool() || sm_vote_console.GetBool() || sm_vote_client_console.GetBool()) { static char buffer[1024]; ItemDrawInfo dr; @@ -560,7 +560,7 @@ void VoteMenuHandler::OnMenuSelect(IBaseMenu *menu, int client, unsigned int ite if (sm_vote_client_console.GetBool()) { - engine->ClientPrintf(pPlayer->GetEdict(), buffer); + ClientConsolePrint(pPlayer->GetEdict(), buffer); } } } diff --git a/core/logic/common_logic.cpp b/core/logic/common_logic.cpp index b0dd81c8..f2540196 100644 --- a/core/logic/common_logic.cpp +++ b/core/logic/common_logic.cpp @@ -62,7 +62,7 @@ IGameHelpers *gamehelpers; static void AddCorePhraseFile(const char *filename) { - g_pCorePhrases->AddPhraseFile("antiflood.phrases"); + g_pCorePhrases->AddPhraseFile(filename); } static IGameConfig *GetCoreGameConfig() diff --git a/extensions/clientprefs/extension.cpp b/extensions/clientprefs/extension.cpp index a797ecdb..62605a23 100644 --- a/extensions/clientprefs/extension.cpp +++ b/extensions/clientprefs/extension.cpp @@ -202,6 +202,19 @@ void ClientPrefs::SDK_OnUnload() cookieMutex->DestroyThis(); } +void ClientPrefs::OnCoreMapStart(edict_t *pEdictList, int edictCount, int clientMax) +{ + if (Database == NULL && !databaseLoading) + { + g_pSM->LogMessage(myself, "Attempting to reconnect to database..."); + + databaseLoading = true; + + TQueryOp *op = new TQueryOp(Query_Connect, 0); + dbi->AddToThreadQueue(op, PrioQueue_High); + } +} + void ClientPrefs::DatabaseConnect() { char error[256]; diff --git a/extensions/clientprefs/extension.h b/extensions/clientprefs/extension.h index 22df6128..7421007e 100644 --- a/extensions/clientprefs/extension.h +++ b/extensions/clientprefs/extension.h @@ -87,6 +87,8 @@ public: const char *GetExtensionVerString(); const char *GetExtensionDateString(); + virtual void OnCoreMapStart(edict_t *pEdictList, int edictCount, int clientMax); + void DatabaseConnect(); bool AddQueryToQueue(TQueryOp *query); diff --git a/extensions/tf2/extension.cpp b/extensions/tf2/extension.cpp index 419d4e1f..e38d9176 100644 --- a/extensions/tf2/extension.cpp +++ b/extensions/tf2/extension.cpp @@ -451,6 +451,6 @@ TFClassType ClassnameToType(const char *classname) /** * A picture of a blue crab given to me as a gift and stored here for safe keeping * - * http://www.democracycellproject.net/blog/archives/Clown%20car.jpg + * http://sourcemod.net/Clown%20car.jpg */ diff --git a/plugins/include/float.inc b/plugins/include/float.inc index 28d8b80a..0b060d31 100644 --- a/plugins/include/float.inc +++ b/plugins/include/float.inc @@ -263,7 +263,7 @@ stock Float:operator--(Float:oper) stock Float:operator-(Float:oper) { - return oper^Float:((-1)^((-1)/2)); /* IEEE values are sign/magnitude */ + return oper^Float:cellmin; /* IEEE values are sign/magnitude */ } stock Float:operator*(Float:oper1, oper2) diff --git a/plugins/include/tf2.inc b/plugins/include/tf2.inc index 06cc4069..6017c09e 100644 --- a/plugins/include/tf2.inc +++ b/plugins/include/tf2.inc @@ -115,7 +115,10 @@ enum TFCond TFCond_CritOnWin, TFCond_CritOnFlagCapture, TFCond_CritOnKill, - TFCond_RestrictToMelee + TFCond_RestrictToMelee, + + TFCond_CritMmmph = 44, + TFCond_DefenseBuffMmmph, }; enum TFHoliday