mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-24 05:34:18 +00:00
Fix memory leak.
This commit is contained in:
parent
b925cbd284
commit
932d269e74
@ -59,6 +59,8 @@ enum
|
|||||||
class CGameRules
|
class CGameRules
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~CGameRules();
|
||||||
|
|
||||||
virtual void RefreshSkillData( void );// fill skill data struct with proper values
|
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 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).
|
virtual BOOL IsAllowedToSpawn( CBaseEntity *pEntity ) = 0; // Can this item spawn (eg monsters don't spawn in deathmatch).
|
||||||
|
@ -474,6 +474,7 @@ void CWorld::Precache( void )
|
|||||||
if( g_pGameRules )
|
if( g_pGameRules )
|
||||||
{
|
{
|
||||||
delete g_pGameRules;
|
delete g_pGameRules;
|
||||||
|
g_pGameRules = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_pGameRules = InstallGameRules();
|
g_pGameRules = InstallGameRules();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user