1
0
mirror of https://github.com/YGGverse/hlsdk-portable.git synced 2025-03-13 05:51:19 +00:00

Fix access to uninitialized variables.

This commit is contained in:
Night Owl 2017-01-06 21:24:59 +05:00
parent 4180937ae5
commit fe84787244
4 changed files with 7 additions and 4 deletions

@ -791,7 +791,7 @@ void CHudAmmo::UserCmd_PrevWeapon( void )
//-------------------------------------------------------------------------
int CHudAmmo::Draw( float flTime )
{
int a, x, y, r, g, b;
int a, x = 0, y, r, g, b;
int AmmoWidth;
int iCrossX;

@ -3704,7 +3704,7 @@ void CBasePlayer::UpdateClientData( void )
for( int i = 1; i < 10; i++ )
{
const char *pszName;
int iAmmoIndex;
int iAmmoIndex = 0;
int iMaxAmmo = 0;
int iCurrentAmmo = 0;
int iBit = 0;

@ -809,7 +809,7 @@ void CTriggerEnvHurt::Spawn( void )
// When touched, a hurt trigger does DMG points of damage each half-second
void CBaseTrigger::EnvTouch( CBaseEntity *pOther )
{
float fldmg;
float fldmg = 0.0f;
if( !pOther->pev->takedamage )
return;

@ -744,6 +744,9 @@ int CBasePlayerWeapon::UpdateClientData( CBasePlayer *pPlayer )
case IT_LIGHTNING:
iId = IT_LIGHTNING;
break;
default:
iId = 0; //Player is dead
break;
}
if( bSend )
@ -765,7 +768,7 @@ int CBasePlayerWeapon::UpdateClientData( CBasePlayer *pPlayer )
return 1;
}
void CBasePlayerWeapon::SendWeaponAnim( int iAnim, int skiplocal)
void CBasePlayerWeapon::SendWeaponAnim( int iAnim, int skiplocal )
{
if( UseDecrement() )
skiplocal = 1;