mirror of
https://github.com/celisej567/source-sdk-2013.git
synced 2026-09-17 20:10:21 +03:00
vscript additions:
- Added CBaseEntity::Activate - Added CBaseEntity::SetSolid - Added CBaseEntity::GetSolid - Added C_BaseEntity::UpdateOnRemove - Added hook behaviour on CScriptConCommand - Added more script overridable concommands - Added CScriptConvarAccessor::SetChangeCallback - Added CScriptGlowObjectManager - Added CScriptSteamAPI
This commit is contained in:
@@ -428,6 +428,10 @@ BEGIN_RECV_TABLE_NOBASE( C_BaseEntity, DT_AnimTimeMustBeFirst )
|
||||
RecvPropInt( RECVINFO(m_flAnimTime), 0, RecvProxy_AnimTime ),
|
||||
END_RECV_TABLE()
|
||||
|
||||
#ifdef MAPBASE_VSCRIPT
|
||||
ScriptHook_t CBaseEntity::g_Hook_UpdateOnRemove;
|
||||
#endif
|
||||
|
||||
BEGIN_ENT_SCRIPTDESC_ROOT( C_BaseEntity, "Root class of all client-side entities" )
|
||||
DEFINE_SCRIPT_INSTANCE_HELPER( &g_BaseEntityScriptInstanceHelper )
|
||||
DEFINE_SCRIPTFUNC_NAMED( GetAbsOrigin, "GetOrigin", "" )
|
||||
@@ -550,7 +554,10 @@ BEGIN_ENT_SCRIPTDESC_ROOT( C_BaseEntity, "Root class of all client-side entities
|
||||
|
||||
DEFINE_SCRIPTFUNC_NAMED( ScriptSetContextThink, "SetContextThink", "Set a think function on this entity." )
|
||||
|
||||
#endif
|
||||
|
||||
DEFINE_SIMPLE_SCRIPTHOOK( CBaseEntity::g_Hook_UpdateOnRemove, "UpdateOnRemove", FIELD_VOID, "Called when the entity is being removed." )
|
||||
|
||||
#endif // MAPBASE_VSCRIPT
|
||||
|
||||
END_SCRIPTDESC();
|
||||
|
||||
@@ -1340,6 +1347,12 @@ void C_BaseEntity::Term()
|
||||
|
||||
if ( m_hScriptInstance )
|
||||
{
|
||||
#ifdef MAPBASE_VSCRIPT
|
||||
if ( m_ScriptScope.IsInitialized() )
|
||||
{
|
||||
g_Hook_UpdateOnRemove.Call( m_ScriptScope, NULL, NULL );
|
||||
}
|
||||
#endif
|
||||
g_pScriptVM->RemoveInstance( m_hScriptInstance );
|
||||
m_hScriptInstance = NULL;
|
||||
|
||||
|
||||
@@ -150,6 +150,10 @@ private:
|
||||
static const int ENTRY_IN_USE = -2;
|
||||
};
|
||||
|
||||
#ifdef MAPBASE_VSCRIPT
|
||||
// For unregistration boundary check
|
||||
public:
|
||||
#endif
|
||||
CUtlVector< GlowObjectDefinition_t > m_GlowObjectDefinitions;
|
||||
int m_nFirstFreeSlot;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user