mirror of https://github.com/FWGS/hlsdk-xash3d
Do not show flashlight sprite in spectator mode.
This commit is contained in:
parent
9d7ab6acf4
commit
3d7e2b0d93
|
@ -108,6 +108,9 @@ int CHudFlashlight::Draw( float flTime )
|
||||||
int r, g, b, x, y, a;
|
int r, g, b, x, y, a;
|
||||||
wrect_t rc;
|
wrect_t rc;
|
||||||
|
|
||||||
|
if( gEngfuncs.IsSpectateOnly() )
|
||||||
|
return 1;
|
||||||
|
|
||||||
if( !( gHUD.m_iWeaponBits & ( 1 << ( WEAPON_SUIT ) ) ) )
|
if( !( gHUD.m_iWeaponBits & ( 1 << ( WEAPON_SUIT ) ) ) )
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
|
|
@ -1421,7 +1421,7 @@ void CBasePlayer::StartObserver( Vector vecPosition, Vector vecViewAngle )
|
||||||
MESSAGE_END();
|
MESSAGE_END();
|
||||||
|
|
||||||
// Setup flags
|
// Setup flags
|
||||||
m_iHideHUD = ( HIDEHUD_HEALTH | HIDEHUD_WEAPONS );
|
m_iHideHUD = ( HIDEHUD_HEALTH | HIDEHUD_FLASHLIGHT | HIDEHUD_WEAPONS );
|
||||||
m_afPhysicsFlags |= PFLAG_OBSERVER;
|
m_afPhysicsFlags |= PFLAG_OBSERVER;
|
||||||
pev->effects = EF_NODRAW;
|
pev->effects = EF_NODRAW;
|
||||||
pev->view_ofs = g_vecZero;
|
pev->view_ofs = g_vecZero;
|
||||||
|
|
Loading…
Reference in New Issue