Browse Source

Merge pull request #59 from nekonomicon/flashlight

Do not show flashlight sprite in spectator mode.
caseclosed
Alibek Omarov 6 years ago committed by GitHub
parent
commit
744732a381
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      cl_dll/flashlight.cpp
  2. 2
      dlls/player.cpp

3
cl_dll/flashlight.cpp

@ -108,6 +108,9 @@ int CHudFlashlight::Draw( float flTime ) @@ -108,6 +108,9 @@ int CHudFlashlight::Draw( float flTime )
int r, g, b, x, y, a;
wrect_t rc;
if( gEngfuncs.IsSpectateOnly() )
return 1;
if( !( gHUD.m_iWeaponBits & ( 1 << ( WEAPON_SUIT ) ) ) )
return 1;

2
dlls/player.cpp

@ -1421,7 +1421,7 @@ void CBasePlayer::StartObserver( Vector vecPosition, Vector vecViewAngle ) @@ -1421,7 +1421,7 @@ void CBasePlayer::StartObserver( Vector vecPosition, Vector vecViewAngle )
MESSAGE_END();
// Setup flags
m_iHideHUD = ( HIDEHUD_HEALTH | HIDEHUD_WEAPONS );
m_iHideHUD = ( HIDEHUD_HEALTH | HIDEHUD_FLASHLIGHT | HIDEHUD_WEAPONS );
m_afPhysicsFlags |= PFLAG_OBSERVER;
pev->effects = EF_NODRAW;
pev->view_ofs = g_vecZero;

Loading…
Cancel
Save