From 479b1e8225c26e016c7a625b36988c8aa8ca580c Mon Sep 17 00:00:00 2001 From: Asher Baker Date: Thu, 24 May 2012 15:57:55 +0100 Subject: [PATCH 1/8] Fixed Float negation operator (bug 5292, r=psychonic). --- plugins/include/float.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) From 39539757cf5667dbaa1053beb29f667fe46a3a5e Mon Sep 17 00:00:00 2001 From: Asher Baker Date: Thu, 24 May 2012 15:59:34 +0100 Subject: [PATCH 2/8] Fixed typo in logic bridge (bug 5287, r=psychonic). --- core/logic/common_logic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() From 391807c8ce4321f0431f1b9bcee758e16b4caa76 Mon Sep 17 00:00:00 2001 From: Asher Baker Date: Thu, 24 May 2012 16:04:51 +0100 Subject: [PATCH 3/8] Updated the location of the blue crab (bug 4959, r=pred). --- extensions/tf2/extension.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 */ From 896d949a821fa643b09e72dcdb51be11b70f616b Mon Sep 17 00:00:00 2001 From: Asher Baker Date: Thu, 24 May 2012 16:07:10 +0100 Subject: [PATCH 4/8] Made clientprefs attempt to reconnect to the database on map change (bug 4745, r=dvander). --- extensions/clientprefs/extension.cpp | 13 +++++++++++++ extensions/clientprefs/extension.h | 2 ++ 2 files changed, 15 insertions(+) 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); From cfe87575707d194bf44b86e999f8006b553c2941 Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Thu, 24 May 2012 16:10:01 +0100 Subject: [PATCH 5/8] Log functions now respect sv_logecho (bug 5135, r=asherkin). --- core/Logger.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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) From a8242fd7e3f7c2b288cbd066b333db34df0829cf Mon Sep 17 00:00:00 2001 From: FlaminSarge Date: Sat, 26 May 2012 16:25:05 -0400 Subject: [PATCH 6/8] Fixed client console vote progress not displaying in some cases (bug 5290, r=psychonic). --- core/MenuVoting.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/MenuVoting.cpp b/core/MenuVoting.cpp index 8b69fd8a..fe29c593 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; From ce77a86808ef9bf28aec29ceb5ebf2114ac6238f Mon Sep 17 00:00:00 2001 From: FlaminSarge Date: Sat, 26 May 2012 18:25:28 -0400 Subject: [PATCH 7/8] Fixed client console vote output missing newlines (bug 5205, r=psychonic). --- core/MenuVoting.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/MenuVoting.cpp b/core/MenuVoting.cpp index fe29c593..0a873b67 100644 --- a/core/MenuVoting.cpp +++ b/core/MenuVoting.cpp @@ -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); } } } From 693c0cf41b995b91e7911b316ea647940e2d6916 Mon Sep 17 00:00:00 2001 From: FlaminSarge Date: Sat, 26 May 2012 19:17:49 -0400 Subject: [PATCH 8/8] Updated TF2 condition defines (bug 5259, r=psychonic). --- plugins/include/tf2.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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