Browse Source

game(hl1): fix use after scope

pull/115/head
nillerusr 2 years ago
parent
commit
2cb00530c7
  1. 3
      game/server/hl1/hl1_npc_hgrunt.cpp
  2. 2
      game/server/hl1/hl1_npc_houndeye.cpp
  3. 5
      game/server/monstermaker.cpp

3
game/server/hl1/hl1_npc_hgrunt.cpp

@ -209,7 +209,6 @@ BEGIN_DATADESC( CNPC_HGrunt ) @@ -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 ) @@ -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 );

2
game/server/hl1/hl1_npc_houndeye.cpp

@ -994,7 +994,7 @@ int CNPC_Houndeye::SquadRecruit( int searchRadius, int maxMembers ) @@ -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 );

5
game/server/monstermaker.cpp

@ -383,6 +383,11 @@ END_DATADESC() @@ -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…
Cancel
Save