mirror of
https://github.com/celisej567/source-sdk-2013.git
synced 2026-09-23 20:09:45 +03:00
Integrating vscript interface code (based on Alien Swarm)
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
#include "IEffects.h"
|
||||
#include "props.h"
|
||||
|
||||
#include "point_template.h"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
||||
@@ -114,6 +116,8 @@ END_DATADESC()
|
||||
//-----------------------------------------------------------------------------
|
||||
void CBaseNPCMaker::Spawn( void )
|
||||
{
|
||||
ScriptInstallPreSpawnHook();
|
||||
|
||||
SetSolid( SOLID_NONE );
|
||||
m_nLiveChildren = 0;
|
||||
Precache();
|
||||
@@ -830,6 +834,12 @@ void CTemplateNPCMaker::MakeNPC( void )
|
||||
pent->SetAbsAngles( angles );
|
||||
}
|
||||
|
||||
if ( !ScriptPreInstanceSpawn( &m_ScriptScope, pEntity, m_iszTemplateData ) )
|
||||
{
|
||||
UTIL_RemoveImmediate( pEntity );
|
||||
return;
|
||||
}
|
||||
|
||||
m_OnSpawnNPC.Set( pEntity, pEntity, this );
|
||||
|
||||
if ( m_spawnflags & SF_NPCMAKER_FADE )
|
||||
@@ -867,6 +877,8 @@ void CTemplateNPCMaker::MakeNPC( void )
|
||||
SetUse( NULL );
|
||||
}
|
||||
}
|
||||
|
||||
ScriptPostSpawn( &m_ScriptScope, &pEntity, 1 );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user