From cf9ba716862eb50da691a4daff272a61f0a0b674 Mon Sep 17 00:00:00 2001 From: Night Owl Date: Fri, 21 Jul 2017 00:52:09 +0500 Subject: [PATCH] Make UpdateOnRemove() virtual. --- cl_dll/hl/hl_baseentity.cpp | 1 + dlls/cbase.h | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cl_dll/hl/hl_baseentity.cpp b/cl_dll/hl/hl_baseentity.cpp index d24c0ef4..acd537e0 100644 --- a/cl_dll/hl/hl_baseentity.cpp +++ b/cl_dll/hl/hl_baseentity.cpp @@ -55,6 +55,7 @@ BOOL CBaseEntity::IsInWorld( void ) { return TRUE; } int CBaseEntity::ShouldToggle( USE_TYPE useType, BOOL currentState ) { return 0; } int CBaseEntity::DamageDecal( int bitsDamageType ) { return -1; } CBaseEntity *CBaseEntity::Create( const char *szName, const Vector &vecOrigin, const Vector &vecAngles, edict_t *pentOwner ) { return NULL; } +void CBaseEntity::UpdateOnRemove( void ) { } void CBaseEntity::SUB_Remove( void ) { } // CBaseDelay Stubs diff --git a/dlls/cbase.h b/dlls/cbase.h index 6c738bf5..b78de883 100644 --- a/dlls/cbase.h +++ b/dlls/cbase.h @@ -12,6 +12,8 @@ * without written permission from Valve LLC. * ****/ +#ifndef CBASE_H +#define CBASE_H /* Class Hierachy @@ -229,7 +231,7 @@ public: }; #endif - void UpdateOnRemove( void ); + virtual void UpdateOnRemove( void ); // common member functions void EXPORT SUB_Remove( void ); @@ -780,3 +782,4 @@ public: void Precache( void ); void KeyValue( KeyValueData *pkvd ); }; +#endif