mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-09-03 17:52:38 +00:00
Fix NVG.
This commit is contained in:
parent
58ff94c2f3
commit
324f03fa3b
@ -3870,6 +3870,7 @@ void CBasePlayer::UpdateClientData( void )
|
|||||||
{
|
{
|
||||||
if( m_fInitHUD )
|
if( m_fInitHUD )
|
||||||
{
|
{
|
||||||
|
BOOL bFlashLightStatus;
|
||||||
m_fInitHUD = FALSE;
|
m_fInitHUD = FALSE;
|
||||||
gInitHUD = FALSE;
|
gInitHUD = FALSE;
|
||||||
|
|
||||||
@ -3896,11 +3897,17 @@ void CBasePlayer::UpdateClientData( void )
|
|||||||
FireTargets( "game_playerspawn", this, this, USE_TOGGLE, 0 );
|
FireTargets( "game_playerspawn", this, this, USE_TOGGLE, 0 );
|
||||||
|
|
||||||
// Send flashlight status
|
// Send flashlight status
|
||||||
|
bFlashLightStatus = FlashlightIsOn();
|
||||||
|
|
||||||
MESSAGE_BEGIN( MSG_ONE, gmsgFlashlight, NULL, pev );
|
MESSAGE_BEGIN( MSG_ONE, gmsgFlashlight, NULL, pev );
|
||||||
WRITE_BYTE( FlashlightIsOn() ? 1 : 0 );
|
WRITE_BYTE( bFlashLightStatus );
|
||||||
WRITE_BYTE( m_iFlashBattery );
|
WRITE_BYTE( m_iFlashBattery );
|
||||||
MESSAGE_END();
|
MESSAGE_END();
|
||||||
|
|
||||||
|
MESSAGE_BEGIN( MSG_ONE, gmsgNightvision, NULL, pev );
|
||||||
|
WRITE_BYTE( bFlashLightStatus );
|
||||||
|
MESSAGE_END();
|
||||||
|
|
||||||
InitStatusBar();
|
InitStatusBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user