Browse Source

Make UpdateOnRemove() virtual.

halloween
Night Owl 7 years ago
parent
commit
cf9ba71686
  1. 1
      cl_dll/hl/hl_baseentity.cpp
  2. 5
      dlls/cbase.h

1
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::ShouldToggle( USE_TYPE useType, BOOL currentState ) { return 0; }
int CBaseEntity::DamageDecal( int bitsDamageType ) { return -1; } int CBaseEntity::DamageDecal( int bitsDamageType ) { return -1; }
CBaseEntity *CBaseEntity::Create( const char *szName, const Vector &vecOrigin, const Vector &vecAngles, edict_t *pentOwner ) { return NULL; } 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 ) { } void CBaseEntity::SUB_Remove( void ) { }
// CBaseDelay Stubs // CBaseDelay Stubs

5
dlls/cbase.h

@ -12,6 +12,8 @@
* without written permission from Valve LLC. * without written permission from Valve LLC.
* *
****/ ****/
#ifndef CBASE_H
#define CBASE_H
/* /*
Class Hierachy Class Hierachy
@ -229,7 +231,7 @@ public:
}; };
#endif #endif
void UpdateOnRemove( void ); virtual void UpdateOnRemove( void );
// common member functions // common member functions
void EXPORT SUB_Remove( void ); void EXPORT SUB_Remove( void );
@ -780,3 +782,4 @@ public:
void Precache( void ); void Precache( void );
void KeyValue( KeyValueData *pkvd ); void KeyValue( KeyValueData *pkvd );
}; };
#endif

Loading…
Cancel
Save