mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-03-04 09:45:26 +03:00
Added checks for the strider template
This commit is contained in:
parent
0a16eb993f
commit
e0a1904693
@ -985,6 +985,11 @@ void CNPC_CombineDropship::Spawn( void )
|
||||
if ( m_sStriderTemplate != NULL_STRING )
|
||||
{
|
||||
m_sStriderTemplateData = Templates_FindByTargetName( STRING( m_sStriderTemplate ) );
|
||||
if (m_sStriderTemplateData == NULL_STRING)
|
||||
{
|
||||
Warning("npc_combinedropship %s: Strider Template %s not found!\n", STRING(GetEntityName()), STRING(m_sStriderTemplate));
|
||||
break;
|
||||
}
|
||||
|
||||
CAI_BaseNPC* pent = NULL;
|
||||
CBaseEntity* pEntity = NULL;
|
||||
@ -994,6 +999,12 @@ void CNPC_CombineDropship::Spawn( void )
|
||||
pent = ( CAI_BaseNPC* )pEntity;
|
||||
}
|
||||
|
||||
if ( !FClassnameIs(pent, "npc_strider"))
|
||||
{
|
||||
Warning("npc_combinedropship %s: Strider Template %s is not a strider!\n", STRING(GetEntityName()), STRING(m_sStriderTemplate));
|
||||
break;
|
||||
}
|
||||
|
||||
m_OnSpawnNPC.Set( pEntity, pEntity, this );
|
||||
|
||||
pent->RemoveSpawnFlags( SF_NPC_TEMPLATE );
|
||||
|
Loading…
x
Reference in New Issue
Block a user