mirror of
https://github.com/nillerusr/source-engine.git
synced 2024-12-22 14:16:50 +00:00
game(hl1): fix use after scope
This commit is contained in:
parent
e11a21ea19
commit
2cb00530c7
@ -209,7 +209,6 @@ BEGIN_DATADESC( CNPC_HGrunt )
|
||||
DEFINE_FIELD( m_voicePitch, FIELD_INTEGER ),
|
||||
DEFINE_FIELD( m_iSentence, FIELD_INTEGER ),
|
||||
DEFINE_KEYFIELD( m_iWeapons, FIELD_INTEGER, "weapons" ),
|
||||
DEFINE_KEYFIELD( m_SquadName, FIELD_STRING, "netname" ),
|
||||
|
||||
DEFINE_FIELD( m_bInBarnacleMouth, FIELD_BOOLEAN ),
|
||||
DEFINE_FIELD( m_flLastEnemySightTime, FIELD_TIME ),
|
||||
@ -488,7 +487,7 @@ int CNPC_HGrunt::SquadRecruit( int searchRadius, int maxMembers )
|
||||
}
|
||||
else
|
||||
{
|
||||
char szSquadName[64];
|
||||
static char szSquadName[64];
|
||||
Q_snprintf( szSquadName, sizeof( szSquadName ), "squad%d\n", g_iSquadIndex );
|
||||
|
||||
m_SquadName = MAKE_STRING( szSquadName );
|
||||
|
@ -994,7 +994,7 @@ int CNPC_Houndeye::SquadRecruit( int searchRadius, int maxMembers )
|
||||
}
|
||||
else
|
||||
{
|
||||
char szSquadName[64];
|
||||
static char szSquadName[64];
|
||||
Q_snprintf( szSquadName, sizeof( szSquadName ), "squad%d\n", s_iSquadIndex );
|
||||
|
||||
m_SquadName = MAKE_STRING( szSquadName );
|
||||
|
@ -383,6 +383,11 @@ END_DATADESC()
|
||||
//-----------------------------------------------------------------------------
|
||||
CNPCMaker::CNPCMaker( void )
|
||||
{
|
||||
m_strHintGroup = NULL_STRING;
|
||||
m_RelationshipString = NULL_STRING;
|
||||
m_ChildTargetName = NULL_STRING;
|
||||
m_iszNPCClassname = NULL_STRING
|
||||
m_SquadName = NULL_STRING;
|
||||
m_spawnEquipment = NULL_STRING;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user