Adding missing parts from vscript Alien Swarm port

This commit is contained in:
James Mitchell 2020-05-20 21:39:50 +10:00
parent 3ad34f31a5
commit dc8ee0a7dd
2 changed files with 4 additions and 2 deletions

View File

@ -1106,6 +1106,8 @@ bool C_BaseEntity::Init( int entnum, int iSerialNum )
m_nCreationTick = gpGlobals->tickcount; m_nCreationTick = gpGlobals->tickcount;
m_hScriptInstance = NULL;
return true; return true;
} }

View File

@ -347,7 +347,7 @@ bool CPointTemplate::CreateInstance( const Vector &vecOrigin, const QAngle &vecA
// Some templates have Entity I/O connecting the entities within the template. // Some templates have Entity I/O connecting the entities within the template.
// Unique versions of these templates need to be created whenever they're instanced. // Unique versions of these templates need to be created whenever they're instanced.
if ( AllowNameFixup() && Templates_IndexRequiresEntityIOFixup( iTemplateIndex ) ) if ( AllowNameFixup() && ( Templates_IndexRequiresEntityIOFixup( iTemplateIndex ) || m_ScriptScope.IsInitialized() ) )
{ {
// This template requires instancing. // This template requires instancing.
// Create a new mapdata block and ask the template system to fill it in with // Create a new mapdata block and ask the template system to fill it in with
@ -436,7 +436,7 @@ bool CPointTemplate::CreateSpecificInstance( int iTemplate, const Vector &vecOri
// Some templates have Entity I/O connecting the entities within the template. // Some templates have Entity I/O connecting the entities within the template.
// Unique versions of these templates need to be created whenever they're instanced. // Unique versions of these templates need to be created whenever they're instanced.
if ( AllowNameFixup() && Templates_IndexRequiresEntityIOFixup( iTemplateIndex ) ) if ( AllowNameFixup() && ( Templates_IndexRequiresEntityIOFixup( iTemplateIndex ) || m_ScriptScope.IsInitialized() ) )
{ {
// This template requires instancing. // This template requires instancing.
// Create a new mapdata block and ask the template system to fill it in with // Create a new mapdata block and ask the template system to fill it in with