This commit is contained in:
Night Owl 2017-12-28 00:17:47 +05:00
parent 58ff94c2f3
commit 324f03fa3b
1 changed files with 8 additions and 1 deletions

View File

@ -3870,6 +3870,7 @@ void CBasePlayer::UpdateClientData( void )
{
if( m_fInitHUD )
{
BOOL bFlashLightStatus;
m_fInitHUD = FALSE;
gInitHUD = FALSE;
@ -3896,11 +3897,17 @@ void CBasePlayer::UpdateClientData( void )
FireTargets( "game_playerspawn", this, this, USE_TOGGLE, 0 );
// Send flashlight status
bFlashLightStatus = FlashlightIsOn();
MESSAGE_BEGIN( MSG_ONE, gmsgFlashlight, NULL, pev );
WRITE_BYTE( FlashlightIsOn() ? 1 : 0 );
WRITE_BYTE( bFlashLightStatus );
WRITE_BYTE( m_iFlashBattery );
MESSAGE_END();
MESSAGE_BEGIN( MSG_ONE, gmsgNightvision, NULL, pev );
WRITE_BYTE( bFlashLightStatus );
MESSAGE_END();
InitStatusBar();
}