mirror of
https://github.com/FWGS/hlsdk-xash3d
synced 2024-11-22 18:05:23 +01:00
Fix memory leak.
This commit is contained in:
parent
b925cbd284
commit
932d269e74
@ -59,6 +59,8 @@ enum
|
||||
class CGameRules
|
||||
{
|
||||
public:
|
||||
virtual ~CGameRules();
|
||||
|
||||
virtual void RefreshSkillData( void );// fill skill data struct with proper values
|
||||
virtual void Think( void ) = 0;// GR_Think - runs every server frame, should handle any timer tasks, periodic events, etc.
|
||||
virtual BOOL IsAllowedToSpawn( CBaseEntity *pEntity ) = 0; // Can this item spawn (eg monsters don't spawn in deathmatch).
|
||||
|
@ -462,18 +462,19 @@ void CWorld::Precache( void )
|
||||
{
|
||||
g_pLastSpawn = NULL;
|
||||
#if 1
|
||||
CVAR_SET_STRING("sv_gravity", "800"); // 67ft/sec
|
||||
CVAR_SET_STRING("sv_stepsize", "18");
|
||||
CVAR_SET_STRING( "sv_gravity", "800" ); // 67ft/sec
|
||||
CVAR_SET_STRING( "sv_stepsize", "18" );
|
||||
#else
|
||||
CVAR_SET_STRING("sv_gravity", "384"); // 32ft/sec
|
||||
CVAR_SET_STRING("sv_stepsize", "24");
|
||||
CVAR_SET_STRING( "sv_gravity", "384" ); // 32ft/sec
|
||||
CVAR_SET_STRING( "sv_stepsize", "24" );
|
||||
#endif
|
||||
CVAR_SET_STRING("room_type", "0");// clear DSP
|
||||
CVAR_SET_STRING( "room_type", "0" );// clear DSP
|
||||
|
||||
// Set up game rules
|
||||
if( g_pGameRules )
|
||||
{
|
||||
delete g_pGameRules;
|
||||
g_pGameRules = NULL;
|
||||
}
|
||||
|
||||
g_pGameRules = InstallGameRules();
|
||||
|
Loading…
Reference in New Issue
Block a user