- moved gameframe hook to timersys
authorDavid Anderson <dvander@alliedmods.net>
Wed Sep 12 22:46:00 2007 +0000 (2007-09-12)
changeset 1412a2ca3d22dd71
parent 1411 a6e52857a881
child 1413 8bf5f32608bc
- moved gameframe hook to timersys
- rewrote simulation algorithm
- various internal improvements to timer
- removed the unused parameter to GetTickedTime()
core/PlayerManager.cpp
core/PlayerManager.h
core/TimerSys.cpp
core/TimerSys.h
core/frame_hooks.cpp
core/frame_hooks.h
core/msvc8/sourcemod_mm.vcproj
core/smn_timers.cpp
core/sourcemod.cpp
core/sourcemod.h
plugins/include/timers.inc
     1.1 --- a/core/PlayerManager.cpp	Wed Sep 12 07:22:38 2007 +0000
     1.2 +++ b/core/PlayerManager.cpp	Wed Sep 12 22:46:00 2007 +0000
     1.3 @@ -48,6 +48,7 @@
     1.4  bool g_OnMapStarted = false;
     1.5  IForward *PreAdminCheck = NULL;
     1.6  IForward *PostAdminCheck = NULL;
     1.7 +const unsigned int *g_NumPlayersToAuth = NULL;
     1.8  
     1.9  SH_DECL_HOOK5(IServerGameClients, ClientConnect, SH_NOATTRIB, 0, bool, edict_t *, const char *, const char *, char *, int);
    1.10  SH_DECL_HOOK2_void(IServerGameClients, ClientPutInServer, SH_NOATTRIB, 0, edict_t *, const char *);
    1.11 @@ -86,6 +87,8 @@
    1.12  
    1.13  PlayerManager::~PlayerManager()
    1.14  {
    1.15 +	g_NumPlayersToAuth = NULL;
    1.16 +
    1.17  	delete [] m_AuthQueue;
    1.18  	delete [] m_UserIdLookUp;
    1.19  }
    1.20 @@ -187,6 +190,8 @@
    1.21  		m_FirstPass = false;
    1.22  
    1.23  		memset(m_AuthQueue, 0, sizeof(unsigned int) * (m_maxClients + 1));
    1.24 +
    1.25 +		g_NumPlayersToAuth = &m_AuthQueue[0];
    1.26  	}
    1.27  	m_onActivate->Execute(NULL);
    1.28  	m_onActivate2->Execute(NULL);
    1.29 @@ -318,7 +323,6 @@
    1.30  			m_AuthQueue[0] -= removed;
    1.31  		} else {
    1.32  			m_AuthQueue[0] = 0;
    1.33 -			g_SourceMod.SetAuthChecking(false);
    1.34  		}
    1.35  	}
    1.36  }
    1.37 @@ -351,7 +355,6 @@
    1.38  		if (!m_Players[client].IsAuthorized())
    1.39  		{
    1.40  			m_AuthQueue[++m_AuthQueue[0]] = client;
    1.41 -			g_SourceMod.SetAuthChecking(true);
    1.42  		}
    1.43  	} else {
    1.44  		RETURN_META_VALUE(MRES_SUPERCEDE, false);
     2.1 --- a/core/PlayerManager.h	Wed Sep 12 07:22:38 2007 +0000
     2.2 +++ b/core/PlayerManager.h	Wed Sep 12 22:46:00 2007 +0000
     2.3 @@ -168,5 +168,6 @@
     2.4  
     2.5  extern PlayerManager g_Players;
     2.6  extern bool g_OnMapStarted;
     2.7 +extern const unsigned int *g_NumPlayersToAuth;
     2.8  
     2.9  #endif //_INCLUDE_SOURCEMOD_CPLAYERMANAGER_H_
     3.1 --- a/core/TimerSys.cpp	Wed Sep 12 07:22:38 2007 +0000
     3.2 +++ b/core/TimerSys.cpp	Wed Sep 12 22:46:00 2007 +0000
     3.3 @@ -31,13 +31,20 @@
     3.4  
     3.5  #include <time.h>
     3.6  #include "TimerSys.h"
     3.7 +#include "ForwardSys.h"
     3.8  #include "sourcemm_api.h"
     3.9 +#include "frame_hooks.h"
    3.10  
    3.11  TimerSystem g_Timers;
    3.12 +float g_fUniversalTime = 0.0f;
    3.13 +const float *g_pUniversalTime = &g_fUniversalTime;
    3.14  
    3.15  ConVar sm_time_adjustment("sm_time_adjustment", "0", 0, "Adjusts the server time in seconds");
    3.16  
    3.17 -__BUILD_INTENTIONALLY_BROKEN_BY_BAIL__
    3.18 +inline float GetSimulatedTime()
    3.19 +{
    3.20 +	return g_fUniversalTime;
    3.21 +}
    3.22  
    3.23  time_t GetAdjustedTime(time_t *buf)
    3.24  {
    3.25 @@ -49,11 +56,6 @@
    3.26  	return val;
    3.27  }
    3.28  
    3.29 -inline float GetSimulatedTime()
    3.30 -{
    3.31 -	return engine->Time();
    3.32 -}
    3.33 -
    3.34  void ITimer::Initialize(ITimedEvent *pCallbacks, float fInterval, float fToExec, void *pData, int flags)
    3.35  {
    3.36  	m_Listener = pCallbacks;
    3.37 @@ -68,6 +70,9 @@
    3.38  TimerSystem::TimerSystem()
    3.39  {
    3.40  	m_fnTimeLeft = NULL;
    3.41 +	m_bHasMapTickedYet = false;
    3.42 +	m_fLastTickedTime = 0.0f;
    3.43 +	m_LastExecTime = 0.0f;
    3.44  }
    3.45  
    3.46  TimerSystem::~TimerSystem()
    3.47 @@ -83,6 +88,12 @@
    3.48  void TimerSystem::OnSourceModAllInitialized()
    3.49  {
    3.50  	g_ShareSys.AddInterface(NULL, this);
    3.51 +	m_pOnGameFrame = g_Forwards.CreateForward("OnGameFrame", ET_Ignore, 0, NULL);
    3.52 +}
    3.53 +
    3.54 +void TimerSystem::OnSourceModShutdown()
    3.55 +{
    3.56 +	g_Forwards.ReleaseForward(m_pOnGameFrame);
    3.57  }
    3.58  
    3.59  void TimerSystem::OnSourceModLevelChange(const char *mapName)
    3.60 @@ -90,6 +101,38 @@
    3.61  	MapChange(true);
    3.62  }
    3.63  
    3.64 +void TimerSystem::OnSourceModLevelEnd()
    3.65 +{
    3.66 +	m_bHasMapTickedYet = false;
    3.67 +}
    3.68 +
    3.69 +void TimerSystem::GameFrame(bool simulating)
    3.70 +{
    3.71 +	if (simulating && m_bHasMapTickedYet)
    3.72 +	{
    3.73 +		g_fUniversalTime += gpGlobals->curtime - m_fLastTickedTime;
    3.74 +	}
    3.75 +	else 
    3.76 +	{
    3.77 +		g_fUniversalTime += gpGlobals->interval_per_tick;
    3.78 +	}
    3.79 +
    3.80 +	m_fLastTickedTime = gpGlobals->curtime;
    3.81 +	m_bHasMapTickedYet = true;
    3.82 +
    3.83 +	if (g_fUniversalTime - m_LastExecTime >= 0.1)
    3.84 +	{
    3.85 +		RunFrame();
    3.86 +	}
    3.87 +
    3.88 +	RunFrameHooks();
    3.89 +
    3.90 +	if (m_pOnGameFrame->GetFunctionCount())
    3.91 +	{
    3.92 +		m_pOnGameFrame->Execute(NULL);
    3.93 +	}
    3.94 +}
    3.95 +
    3.96  void TimerSystem::RunFrame()
    3.97  {
    3.98  	ITimer *pTimer;
    3.99 @@ -299,8 +342,6 @@
   3.100  		if (real_mapchange && (pTimer->m_Flags & TIMER_FLAG_NO_MAPCHANGE))
   3.101  		{
   3.102  			s_tokill.push(pTimer);
   3.103 -		} else {
   3.104 -			pTimer->m_ToExec = pTimer->m_ToExec - m_LastExecTime + GetSimulatedTime();
   3.105  		}
   3.106  	}
   3.107  
   3.108 @@ -310,8 +351,6 @@
   3.109  		if (real_mapchange && (pTimer->m_Flags & TIMER_FLAG_NO_MAPCHANGE))
   3.110  		{
   3.111  			s_tokill.push(pTimer);
   3.112 -		} else {
   3.113 -			pTimer->m_ToExec = pTimer->m_ToExec - m_LastExecTime + GetSimulatedTime();
   3.114  		}
   3.115  	}
   3.116  
   3.117 @@ -329,8 +368,6 @@
   3.118  		KillTimer(s_tokill.front());
   3.119  		s_tokill.pop();
   3.120  	}
   3.121 -
   3.122 -	m_LastExecTime = GetSimulatedTime();
   3.123  }
   3.124  
   3.125  SM_TIMELEFT_FUNCTION TimerSystem::SetTimeLeftFunction(SM_TIMELEFT_FUNCTION fn)
     4.1 --- a/core/TimerSys.h	Wed Sep 12 07:22:38 2007 +0000
     4.2 +++ b/core/TimerSys.h	Wed Sep 12 22:46:00 2007 +0000
     4.3 @@ -67,6 +67,8 @@
     4.4  public: //SMGlobalClass
     4.5  	void OnSourceModAllInitialized();
     4.6  	void OnSourceModLevelChange(const char *mapName);
     4.7 +	void OnSourceModLevelEnd();
     4.8 +	void OnSourceModShutdown();
     4.9  public: //ITimerSystem
    4.10  	ITimer *CreateTimer(ITimedEvent *pCallbacks, float fInterval, void *pData, int flags);
    4.11  	void KillTimer(ITimer *pTimer);
    4.12 @@ -75,6 +77,7 @@
    4.13  public:
    4.14  	void RunFrame();
    4.15  	void MapChange(bool real_mapchange);
    4.16 +	void GameFrame(bool simulating);
    4.17  private:
    4.18  	List<ITimer *> m_SingleTimers;
    4.19  	List<ITimer *> m_LoopTimers;
    4.20 @@ -82,10 +85,19 @@
    4.21  	CStack<ITimer *> m_FreeTimers;
    4.22  	float m_LastExecTime;
    4.23  	SM_TIMELEFT_FUNCTION m_fnTimeLeft;
    4.24 +
    4.25 +	/* This is stuff for our manual ticking escapades. */
    4.26 +	bool m_bHasMapTickedYet;	/** Has the map ticked yet? */
    4.27 +	float m_fLastTickedTime;	/** Last time that the game currently gave 
    4.28 +									us while ticking.
    4.29 +									*/
    4.30 +
    4.31 +	IForward *m_pOnGameFrame;
    4.32  };
    4.33  
    4.34  time_t GetAdjustedTime(time_t *buf = NULL);
    4.35  
    4.36 +extern const float *g_pUniversalTime;
    4.37  extern TimerSystem g_Timers;
    4.38  
    4.39  #endif //_INCLUDE_SOURCEMOD_CTIMERSYS_H_
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/core/frame_hooks.cpp	Wed Sep 12 22:46:00 2007 +0000
     5.3 @@ -0,0 +1,63 @@
     5.4 +/**
     5.5 + * vim: set ts=4 :
     5.6 + * =============================================================================
     5.7 + * SourceMod
     5.8 + * Copyright (C) 2004-2007 AlliedModders LLC.  All rights reserved.
     5.9 + * =============================================================================
    5.10 + *
    5.11 + * This program is free software; you can redistribute it and/or modify it under
    5.12 + * the terms of the GNU General Public License, version 3.0, as published by the
    5.13 + * Free Software Foundation.
    5.14 + * 
    5.15 + * This program is distributed in the hope that it will be useful, but WITHOUT
    5.16 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    5.17 + * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
    5.18 + * details.
    5.19 + *
    5.20 + * You should have received a copy of the GNU General Public License along with
    5.21 + * this program.  If not, see <http://www.gnu.org/licenses/>.
    5.22 + *
    5.23 + * As a special exception, AlliedModders LLC gives you permission to link the
    5.24 + * code of this program (as well as its derivative works) to "Half-Life 2," the
    5.25 + * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
    5.26 + * by the Valve Corporation.  You must obey the GNU General Public License in
    5.27 + * all respects for all other code used.  Additionally, AlliedModders LLC grants
    5.28 + * this exception to all derivative works.  AlliedModders LLC defines further
    5.29 + * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
    5.30 + * or <http://www.sourcemod.net/license.php>.
    5.31 + *
    5.32 + * Version: $Id$
    5.33 + */
    5.34 +#include "frame_hooks.h"
    5.35 +#include "TimerSys.h"
    5.36 +#include "Database.h"
    5.37 +#include "HalfLife2.h"
    5.38 +#include "MenuStyle_Valve.h"
    5.39 +#include "MenuStyle_Radio.h"
    5.40 +#include "PlayerManager.h"
    5.41 +
    5.42 +float g_LastMenuTime = 0.0f;
    5.43 +float g_LastAuthCheck = 0.0f;
    5.44 +
    5.45 +void RunFrameHooks()
    5.46 +{
    5.47 +	/* Frame based hooks */
    5.48 +	g_DBMan.RunFrame();
    5.49 +	g_HL2.ProcessFakeCliCmdQueue();
    5.50 +
    5.51 +	float curtime = *g_pUniversalTime;
    5.52 +
    5.53 +	if (curtime - g_LastMenuTime >= 1.0f)
    5.54 +	{
    5.55 +		g_ValveMenuStyle.ProcessWatchList();
    5.56 +		g_RadioMenuStyle.ProcessWatchList();
    5.57 +		g_LastMenuTime = curtime;
    5.58 +	}
    5.59 +
    5.60 +	if (*g_NumPlayersToAuth && curtime - g_LastAuthCheck >= 0.7f)
    5.61 +	{
    5.62 +		g_Players.RunAuthChecks();
    5.63 +		g_LastAuthCheck = curtime;
    5.64 +	}
    5.65 +}
    5.66 +
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/core/frame_hooks.h	Wed Sep 12 22:46:00 2007 +0000
     6.3 @@ -0,0 +1,37 @@
     6.4 +/**
     6.5 + * vim: set ts=4 :
     6.6 + * =============================================================================
     6.7 + * SourceMod
     6.8 + * Copyright (C) 2004-2007 AlliedModders LLC.  All rights reserved.
     6.9 + * =============================================================================
    6.10 + *
    6.11 + * This program is free software; you can redistribute it and/or modify it under
    6.12 + * the terms of the GNU General Public License, version 3.0, as published by the
    6.13 + * Free Software Foundation.
    6.14 + * 
    6.15 + * This program is distributed in the hope that it will be useful, but WITHOUT
    6.16 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    6.17 + * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
    6.18 + * details.
    6.19 + *
    6.20 + * You should have received a copy of the GNU General Public License along with
    6.21 + * this program.  If not, see <http://www.gnu.org/licenses/>.
    6.22 + *
    6.23 + * As a special exception, AlliedModders LLC gives you permission to link the
    6.24 + * code of this program (as well as its derivative works) to "Half-Life 2," the
    6.25 + * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
    6.26 + * by the Valve Corporation.  You must obey the GNU General Public License in
    6.27 + * all respects for all other code used.  Additionally, AlliedModders LLC grants
    6.28 + * this exception to all derivative works.  AlliedModders LLC defines further
    6.29 + * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
    6.30 + * or <http://www.sourcemod.net/license.php>.
    6.31 + *
    6.32 + * Version: $Id$
    6.33 + */
    6.34 +
    6.35 +#ifndef _INCLUDE_SOURCEMOD_FRAME_HOOKS_H_
    6.36 +#define _INCLUDE_SOURCEMOD_FRAME_HOOKS_H_
    6.37 +
    6.38 +void RunFrameHooks();
    6.39 +
    6.40 +#endif //_INCLUDE_SOURCEMOD_FRAME_HOOKS_H_
     7.1 --- a/core/msvc8/sourcemod_mm.vcproj	Wed Sep 12 07:22:38 2007 +0000
     7.2 +++ b/core/msvc8/sourcemod_mm.vcproj	Wed Sep 12 22:46:00 2007 +0000
     7.3 @@ -308,6 +308,10 @@
     7.4  				>
     7.5  			</File>
     7.6  			<File
     7.7 +				RelativePath="..\frame_hooks.cpp"
     7.8 +				>
     7.9 +			</File>
    7.10 +			<File
    7.11  				RelativePath="..\GameConfigs.cpp"
    7.12  				>
    7.13  			</File>
    7.14 @@ -454,6 +458,10 @@
    7.15  				>
    7.16  			</File>
    7.17  			<File
    7.18 +				RelativePath="..\frame_hooks.h"
    7.19 +				>
    7.20 +			</File>
    7.21 +			<File
    7.22  				RelativePath="..\GameConfigs.h"
    7.23  				>
    7.24  			</File>
     8.1 --- a/core/smn_timers.cpp	Wed Sep 12 07:22:38 2007 +0000
     8.2 +++ b/core/smn_timers.cpp	Wed Sep 12 22:46:00 2007 +0000
     8.3 @@ -255,8 +255,7 @@
     8.4  
     8.5  static cell_t smn_GetTickedTime(IPluginContext *pContext, const cell_t *params)
     8.6  {
     8.7 -	float t = engine->Time();
     8.8 -	return sp_ftoc(t);
     8.9 +	return sp_ftoc(*g_pUniversalTime);
    8.10  }
    8.11  
    8.12  REGISTER_NATIVES(timernatives)
     9.1 --- a/core/sourcemod.cpp	Wed Sep 12 07:22:38 2007 +0000
     9.2 +++ b/core/sourcemod.cpp	Wed Sep 12 22:46:00 2007 +0000
     9.3 @@ -46,10 +46,6 @@
     9.4  #include "Translator.h"
     9.5  #include "ForwardSys.h"
     9.6  #include "TimerSys.h"
     9.7 -#include "MenuStyle_Valve.h"
     9.8 -#include "MenuStyle_Radio.h"
     9.9 -#include "Database.h"
    9.10 -#include "HalfLife2.h"
    9.11  #include "GameConfigs.h"
    9.12  
    9.13  SH_DECL_HOOK6(IServerGameDLL, LevelInit, SH_NOATTRIB, false, bool, const char *, const char *, const char *, const char *, bool, bool);
    9.14 @@ -65,10 +61,6 @@
    9.15  ISourcePawnEngine *g_pSourcePawn = &g_SourcePawn;
    9.16  IVirtualMachine *g_pVM;
    9.17  IdentityToken_t *g_pCoreIdent = NULL;
    9.18 -float g_LastTime = 0.0f;
    9.19 -float g_LastMenuTime = 0.0f;
    9.20 -float g_LastAuthCheck = 0.0f;
    9.21 -IForward *g_pOnGameFrame = NULL;
    9.22  IForward *g_pOnMapEnd = NULL;
    9.23  bool g_Loaded = false;
    9.24  IExtension *g_pGameExt = NULL;
    9.25 @@ -286,7 +278,7 @@
    9.26  void SourceModBase::StartSourceMod(bool late)
    9.27  {
    9.28  	SH_ADD_HOOK_MEMFUNC(IServerGameDLL, LevelShutdown, gamedll, this, &SourceModBase::LevelShutdown, false);
    9.29 -	SH_ADD_HOOK_MEMFUNC(IServerGameDLL, GameFrame, gamedll, this, &SourceModBase::GameFrame, false);
    9.30 +	SH_ADD_HOOK_MEMFUNC(IServerGameDLL, GameFrame, gamedll, &g_Timers, &TimerSystem::GameFrame, false);
    9.31  
    9.32  	enginePatch = SH_GET_CALLCLASS(engine);
    9.33  	gamedllPatch = SH_GET_CALLCLASS(gamedll);
    9.34 @@ -330,9 +322,6 @@
    9.35  	m_IsMapLoading = true;
    9.36  	m_ExecPluginReload = true;
    9.37  	m_ExecOnMapEnd = true;
    9.38 -	g_LastTime = 0.0f;
    9.39 -	g_LastMenuTime = 0.0f;
    9.40 -	g_LastAuthCheck = 0.0f;
    9.41  
    9.42  	/* Notify! */
    9.43  	SMGlobalClass *pBase = SMGlobalClass::head;
    9.44 @@ -354,11 +343,6 @@
    9.45  		pBase = pBase->m_pGlobalClassNext;
    9.46  	}
    9.47  
    9.48 -	if (!g_pOnGameFrame)
    9.49 -	{
    9.50 -		g_pOnGameFrame = g_Forwards.CreateForward("OnGameFrame", ET_Ignore, 0, NULL);
    9.51 -	}
    9.52 -
    9.53  	if (!g_pOnMapEnd)
    9.54  	{
    9.55  		g_pOnMapEnd = g_Forwards.CreateForward("OnMapEnd", ET_Ignore, 0, NULL);
    9.56 @@ -369,43 +353,6 @@
    9.57  	RETURN_META_VALUE(MRES_IGNORED, true);
    9.58  }
    9.59  
    9.60 -void SourceModBase::GameFrame(bool simulating)
    9.61 -{
    9.62 -	g_DBMan.RunFrame();
    9.63 -	g_HL2.ProcessFakeCliCmdQueue();
    9.64 -
    9.65 -	/**
    9.66 -	 * Note: This is all hardcoded rather than delegated to save
    9.67 -	 * precious CPU cycles.
    9.68 -	 */
    9.69 -	float curtime = engine->Time();
    9.70 -
    9.71 -	if (curtime - g_LastTime >= 0.1f)
    9.72 -	{
    9.73 -		if (m_CheckingAuth
    9.74 -			&& (gpGlobals->curtime - g_LastAuthCheck > 0.7f))
    9.75 -		{
    9.76 -			g_LastAuthCheck = gpGlobals->curtime;
    9.77 -			g_Players.RunAuthChecks();
    9.78 -		}
    9.79 -
    9.80 -		g_Timers.RunFrame();
    9.81 -		g_LastTime = curtime;
    9.82 -	}
    9.83 -
    9.84 -	if (gpGlobals->curtime - g_LastMenuTime >= 1.0f)
    9.85 -	{
    9.86 -		g_ValveMenuStyle.ProcessWatchList();
    9.87 -		g_RadioMenuStyle.ProcessWatchList();
    9.88 -		g_LastMenuTime = curtime;
    9.89 -	}
    9.90 -
    9.91 -	if (g_pOnGameFrame && g_pOnGameFrame->GetFunctionCount())
    9.92 -	{
    9.93 -		g_pOnGameFrame->Execute(NULL);
    9.94 -	}
    9.95 -}
    9.96 -
    9.97  void SourceModBase::LevelShutdown()
    9.98  {
    9.99  	if (g_LevelEndBarrier)
   9.100 @@ -521,11 +468,6 @@
   9.101  
   9.102  	if (g_Loaded)
   9.103  	{
   9.104 -		if (g_pOnGameFrame)
   9.105 -		{
   9.106 -			g_Forwards.ReleaseForward(g_pOnGameFrame);
   9.107 -		}
   9.108 -
   9.109  		if (g_pOnMapEnd)
   9.110  		{
   9.111  			g_Forwards.ReleaseForward(g_pOnMapEnd);
   9.112 @@ -570,7 +512,7 @@
   9.113  		}
   9.114  
   9.115  		SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, LevelShutdown, gamedll, this, &SourceModBase::LevelShutdown, false);
   9.116 -		SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, GameFrame, gamedll, this, &SourceModBase::GameFrame, false);
   9.117 +		SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, GameFrame, gamedll, &g_Timers, &TimerSystem::GameFrame, false);
   9.118  	}
   9.119  
   9.120  	/* Rest In Peace */
   9.121 @@ -641,11 +583,6 @@
   9.122  	m_target = index;
   9.123  }
   9.124  
   9.125 -void SourceModBase::SetAuthChecking(bool set)
   9.126 -{
   9.127 -	m_CheckingAuth = set;
   9.128 -}
   9.129 -
   9.130  unsigned int SourceModBase::GetGlobalTarget() const
   9.131  {
   9.132  	return m_target;
    10.1 --- a/core/sourcemod.h	Wed Sep 12 07:22:38 2007 +0000
    10.2 +++ b/core/sourcemod.h	Wed Sep 12 22:46:00 2007 +0000
    10.3 @@ -89,11 +89,6 @@
    10.4  	 * @brief Returns the global target index.
    10.5  	 */
    10.6  	unsigned int GetGlobalTarget() const;
    10.7 -	
    10.8 -	/** 
    10.9 -	 * @brief Sets whether if SoureMod needs to check player auths.
   10.10 -	 */
   10.11 -	void SetAuthChecking(bool set);
   10.12  public: // SMGlobalClass
   10.13  	ConfigResult OnSourceModConfigChanged(const char *key, 
   10.14  										  const char *value, 
   10.15 @@ -121,11 +116,6 @@
   10.16  	 * @brief Loading plugins
   10.17  	 */
   10.18  	void DoGlobalPluginLoads();
   10.19 -
   10.20 -	/**
   10.21 -	 * @brief GameFrame hook
   10.22 -	 */
   10.23 -	void GameFrame(bool simulating);
   10.24  private:
   10.25  	CStack<CDataPack *> m_freepacks;
   10.26  	char m_SMBaseDir[PLATFORM_MAX_PATH];
   10.27 @@ -135,7 +125,6 @@
   10.28  	bool m_ExecPluginReload;
   10.29  	bool m_ExecOnMapEnd;
   10.30  	unsigned int m_target;
   10.31 -	bool m_CheckingAuth;
   10.32  	bool m_GotBasePath;
   10.33  };
   10.34  
    11.1 --- a/plugins/include/timers.inc	Wed Sep 12 07:22:38 2007 +0000
    11.2 +++ b/plugins/include/timers.inc	Wed Sep 12 22:46:00 2007 +0000
    11.3 @@ -108,15 +108,17 @@
    11.4  native TriggerTimer(Handle:timer, bool:reset=false);
    11.5  
    11.6  /**
    11.7 - * Returns the simulated game time.
    11.8 + * Returns the simulated game time.  
    11.9   *
   11.10 - * @param simulated			Retrieves whether or not the tick count
   11.11 - *							is being manually simulated by SourceMod.
   11.12 - *							This is the case if no players have joined
   11.13 - *							the map yet.
   11.14 + * This time is internally maintained by SourceMod and is based on the game 
   11.15 + * tick count and tick rate.  Unlike GetGameTime(), it will increment past 
   11.16 + * map changes and while no players are connected.  Unlike GetEngineTime(), 
   11.17 + * it will not increment based on the system clock (i.e. it is still bound 
   11.18 + * to the ticking process).
   11.19 + *
   11.20   * @return					Time based on the game tick count.
   11.21   */
   11.22 -native Float:GetTickedTime(&bool:simulated);
   11.23 +native Float:GetTickedTime();
   11.24  
   11.25  /**
   11.26   * Creates a timer associated with a new data pack, and returns the datapack.