diff --git a/cl_dll/flashlight.cpp b/cl_dll/flashlight.cpp index 9d3dda93..1b1b67e4 100644 --- a/cl_dll/flashlight.cpp +++ b/cl_dll/flashlight.cpp @@ -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_FLASHLIGHT ) ) ) ) return 1; diff --git a/dlls/lights.cpp b/dlls/lights.cpp index 1c39266b..13e6d3a9 100644 --- a/dlls/lights.cpp +++ b/dlls/lights.cpp @@ -155,10 +155,10 @@ void CEnvLight::KeyValue( KeyValueData* pkvd ) } else if( j == 4 ) { - v /= 255; - r *= v; - g *= v; - b *= v; + float vf = v / 255.0f; + r *= vf; + g *= vf; + b *= vf; } // simulate qrad direct, ambient,and gamma adjustments, as well as engine scaling diff --git a/dlls/player.cpp b/dlls/player.cpp index f5143389..c0b6c902 100644 --- a/dlls/player.cpp +++ b/dlls/player.cpp @@ -1417,7 +1417,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;