Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
879 B

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #ifndef INFO_DARKNESSMODE_LIGHTSOURCE_H
  7. #define INFO_DARKNESSMODE_LIGHTSOURCE_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. // Default distance from lightsources that entities are considered visible
  12. // NOTE!!! This is bigger by a factor of to deal with fixing a bug from HL2. See dlight_t.h
  13. #define DARKNESS_LIGHTSOURCE_SIZE (256.0f*1.2f)
  14. void AddEntityToDarknessCheck( CBaseEntity *pEntity, float flLightRadius = DARKNESS_LIGHTSOURCE_SIZE );
  15. void RemoveEntityFromDarknessCheck( CBaseEntity *pEntity );
  16. bool LookerCouldSeeTargetInDarkness( CBaseEntity *pLooker, CBaseEntity *pTarget );
  17. bool DarknessLightSourceWithinRadius( CBaseEntity *pLooker, float flRadius );
  18. #endif // INFO_DARKNESSMODE_LIGHTSOURCE_H