This commit is contained in:
Night Owl 2017-07-19 04:06:19 +05:00
parent 51c682c15e
commit 946e962f3c
2 changed files with 8 additions and 0 deletions

View File

@ -49,6 +49,8 @@ void CHudFlashlight::Reset( void )
{ {
m_fFade = 0; m_fFade = 0;
m_fOn = 0; m_fOn = 0;
m_iBat = 100;
m_flBat = 1.0;
} }
int CHudFlashlight::VidInit( void ) int CHudFlashlight::VidInit( void )

View File

@ -3868,6 +3868,12 @@ void CBasePlayer::UpdateClientData( void )
FireTargets( "game_playerspawn", this, this, USE_TOGGLE, 0 ); FireTargets( "game_playerspawn", this, this, USE_TOGGLE, 0 );
// Send flashlight status
MESSAGE_BEGIN( MSG_ONE, gmsgFlashlight, NULL, pev );
WRITE_BYTE( FlashlightIsOn() ? 1 : 0 );
WRITE_BYTE( m_iFlashBattery );
MESSAGE_END();
InitStatusBar(); InitStatusBar();
} }