1.1 --- a/extensions/tf2/extension.cpp Wed Jul 06 15:30:19 2011 -0400
1.2 +++ b/extensions/tf2/extension.cpp Wed Jul 06 17:37:35 2011 -0400
1.3 @@ -109,10 +109,11 @@
1.4 plsys->AddPluginsListener(this);
1.5
1.6 playerhelpers->RegisterCommandTargetProcessor(this);
1.7 + playerhelpers->AddClientListener(this);
1.8
1.9 g_critForward = forwards->CreateForward("TF2_CalcIsAttackCritical", ET_Hook, 4, NULL, Param_Cell, Param_Cell, Param_String, Param_CellByRef);
1.10 g_getHolidayForward = forwards->CreateForward("TF2_OnGetHoliday", ET_Event, 1, NULL, Param_CellByRef);
1.11 - g_addCondForward = forwards->CreateForward("TF2_OnConditionAdded", ET_Ignore, 3, NULL, Param_Cell, Param_Cell, Param_Float);
1.12 + g_addCondForward = forwards->CreateForward("TF2_OnConditionAdded", ET_Ignore, 2, NULL, Param_Cell, Param_Cell);
1.13 g_removeCondForward = forwards->CreateForward("TF2_OnConditionRemoved", ET_Ignore, 2, NULL, Param_Cell, Param_Cell);
1.14 g_waitingPlayersStartForward = forwards->CreateForward("TF2_OnWaitingForPlayersStart", ET_Ignore, 0, NULL);
1.15 g_waitingPlayersEndForward = forwards->CreateForward("TF2_OnWaitingForPlayersEnd", ET_Ignore, 0, NULL);
1.16 @@ -162,6 +163,7 @@
1.17 g_RegNatives.UnregisterAll();
1.18 gameconfs->CloseGameConfigFile(g_pGameConf);
1.19 playerhelpers->UnregisterCommandTargetProcessor(this);
1.20 + playerhelpers->RemoveClientListener(this);
1.21
1.22 plsys->RemovePluginsListener(this);
1.23
1.24 @@ -307,7 +309,7 @@
1.25 {
1.26 UTIL_Format(info->target_name, info->target_name_maxlength, "Blue Team");
1.27 }
1.28 -
1.29 +
1.30 return true;
1.31 }
1.32
1.33 @@ -327,7 +329,7 @@
1.34 && ( g_addCondForward->GetFunctionCount() || g_removeCondForward->GetFunctionCount() )
1.35 )
1.36 {
1.37 - m_CondChecksEnabled = InitialiseConditionDetours();
1.38 + m_CondChecksEnabled = InitialiseConditionChecks();
1.39 }
1.40
1.41 if (!m_RulesDetoursEnabled
1.42 @@ -354,7 +356,7 @@
1.43 {
1.44 if (!g_addCondForward->GetFunctionCount() && !g_removeCondForward->GetFunctionCount())
1.45 {
1.46 - RemoveConditionDetours();
1.47 + RemoveConditionChecks();
1.48 m_CondChecksEnabled = false;
1.49 }
1.50 }
1.51 @@ -367,6 +369,12 @@
1.52 }
1.53 }
1.54 }
1.55 +
1.56 +void TF2Tools::OnClientPutInServer(int client)
1.57 +{
1.58 + Conditions_OnClientPutInServer(client);
1.59 +}
1.60 +
1.61 int FindResourceEntity()
1.62 {
1.63 return FindEntityByNetClass(-1, "CTFPlayerResource");