From 6bc2d20177bd26f3dc2dce0edefd8aeb7a63a9b4 Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Sun, 8 Feb 2015 20:30:15 -0500 Subject: [PATCH] Mess with some array sizes. --- extensions/tf2/conditions.cpp | 2 +- extensions/tf2/conditions.h | 4 ++-- extensions/tf2/extension.h | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/extensions/tf2/conditions.cpp b/extensions/tf2/conditions.cpp index 95b55756..d298df4e 100644 --- a/extensions/tf2/conditions.cpp +++ b/extensions/tf2/conditions.cpp @@ -159,7 +159,7 @@ void PlayerConditionsMgr::Shutdown() void PlayerConditionsMgr::OnClientPutInServer(int client) { - memset(&m_OldConds[client], 0, CondVar_Count * sizeof(int)); + memset(&m_OldConds[client], 0, sizeof(m_OldConds[0])); } PlayerConditionsMgr g_CondMgr; \ No newline at end of file diff --git a/extensions/tf2/conditions.h b/extensions/tf2/conditions.h index 6ae42e6f..76193c13 100644 --- a/extensions/tf2/conditions.h +++ b/extensions/tf2/conditions.h @@ -68,9 +68,9 @@ private: template bool SetupProp(const char *varname); private: - int m_OldConds[TF_MAXPLAYERS + 1][CondVar_Count]; + int m_OldConds[SM_MAXPLAYERS + 1][CondVar_LastNotifyProp]; sm_sendprop_info_t m_CondVarProps[CondVar_Count]; - SendVarProxyFn m_BackupProxyFns[CondVar_Count]; + SendVarProxyFn m_BackupProxyFns[CondVar_LastNotifyProp]; }; extern PlayerConditionsMgr g_CondMgr; diff --git a/extensions/tf2/extension.h b/extensions/tf2/extension.h index 535af282..d9b22334 100644 --- a/extensions/tf2/extension.h +++ b/extensions/tf2/extension.h @@ -42,8 +42,6 @@ #include #include -const int TF_MAXPLAYERS = 33; - namespace SourceMod { class ISDKTools; }