mirror of
https://github.com/celisej567/source-engine.git
synced 2026-01-05 22:09:59 +03:00
game: init uninitialized variables
This commit is contained in:
@@ -11331,6 +11331,7 @@ CAI_BaseNPC::CAI_BaseNPC(void)
|
||||
m_flHeadYaw = 0;
|
||||
m_flHeadPitch = 0;
|
||||
m_spawnEquipment = NULL_STRING;
|
||||
m_SquadName = NULL_STRING;
|
||||
m_pEnemies = new CAI_Enemies;
|
||||
m_bIgnoreUnseenEnemies = false;
|
||||
m_flEyeIntegRate = 0.95;
|
||||
|
||||
@@ -1543,7 +1543,7 @@ void CAI_LeadGoal::InputActivate( inputdata_t &inputdata )
|
||||
AI_LeadArgs_t leadArgs = {
|
||||
GetGoalEntityName(),
|
||||
STRING(m_iszWaitPointName),
|
||||
m_spawnflags,
|
||||
(unsigned)m_spawnflags,
|
||||
m_flWaitDistance,
|
||||
m_flLeadDistance,
|
||||
m_flRetrieveDistance,
|
||||
|
||||
@@ -153,7 +153,7 @@ END_DATADESC()
|
||||
|
||||
//-------------------------------------
|
||||
|
||||
CAI_Squad::CAI_Squad(string_t newName)
|
||||
CAI_Squad::CAI_Squad(string_t newName)
|
||||
#ifndef PER_ENEMY_SQUADSLOTS
|
||||
: m_squadSlotsUsed(MAX_SQUADSLOTS)
|
||||
#endif
|
||||
@@ -163,7 +163,7 @@ CAI_Squad::CAI_Squad(string_t newName)
|
||||
|
||||
//-------------------------------------
|
||||
|
||||
CAI_Squad::CAI_Squad()
|
||||
CAI_Squad::CAI_Squad()
|
||||
#ifndef PER_ENEMY_SQUADSLOTS
|
||||
: m_squadSlotsUsed(MAX_SQUADSLOTS)
|
||||
#endif
|
||||
@@ -175,7 +175,7 @@ CAI_Squad::CAI_Squad()
|
||||
|
||||
void CAI_Squad::Init(string_t newName)
|
||||
{
|
||||
m_Name = AllocPooledString( STRING(newName) );
|
||||
m_Name = newName;
|
||||
m_pNextSquad = NULL;
|
||||
m_flSquadSoundWaitTime = 0;
|
||||
m_SquadMembers.RemoveAll();
|
||||
|
||||
@@ -162,7 +162,7 @@ void CFunc_Dust::Spawn()
|
||||
|
||||
//Since keyvalues can arrive in any order, and UTIL_StringToColor32 stomps alpha,
|
||||
//install the alpha value here.
|
||||
color32 clr = { m_Color.m_Value.r, m_Color.m_Value.g, m_Color.m_Value.b, m_iAlpha };
|
||||
color32 clr = { m_Color.m_Value.r, m_Color.m_Value.g, m_Color.m_Value.b, (uint8)m_iAlpha };
|
||||
m_Color.Set( clr );
|
||||
|
||||
BaseClass::Spawn();
|
||||
|
||||
@@ -289,7 +289,7 @@ bool CMultiManager::KeyValue( const char *szKeyName, const char *szValue )
|
||||
{
|
||||
char tmp[128];
|
||||
|
||||
UTIL_StripToken( szKeyName, tmp, Q_ARRAYSIZE( tmp ) );
|
||||
UTIL_StripToken( szKeyName, tmp );
|
||||
m_iTargetName [ m_cTargets ] = AllocPooledString( tmp );
|
||||
m_flTargetDelay [ m_cTargets ] = atof (szValue);
|
||||
m_cTargets++;
|
||||
|
||||
@@ -1988,7 +1988,7 @@ void CNPC_CScanner::BlindFlashTarget( CBaseEntity *pTarget )
|
||||
|
||||
if ( tr.startsolid == false && tr.fraction == 1.0)
|
||||
{
|
||||
color32 white = { 255, 255, 255, SCANNER_FLASH_MAX_VALUE * dotPr };
|
||||
color32 white = { 255, 255, 255, (uint8)(SCANNER_FLASH_MAX_VALUE * dotPr) };
|
||||
|
||||
if ( ( g_pMaterialSystemHardwareConfig != NULL ) && ( g_pMaterialSystemHardwareConfig->GetHDRType() != HDR_TYPE_NONE ) )
|
||||
{
|
||||
|
||||
@@ -199,7 +199,7 @@ public:
|
||||
unsigned int operator()( const NavVisPair_t &item ) const
|
||||
{
|
||||
COMPILE_TIME_ASSERT( sizeof(CNavArea *) == 4 );
|
||||
int key[2] = { (int)item.pAreas[0] + item.pAreas[1]->GetID(), (int)item.pAreas[1] + item.pAreas[0]->GetID() };
|
||||
int key[2] = { (int)(item.pAreas[0] + item.pAreas[1]->GetID()), (int)(item.pAreas[1] + item.pAreas[0]->GetID()) };
|
||||
return Hash8( key );
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user