mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-08 13:15:31 +03:00
031e383fb5
- Experimental RPC stuff for the future - Fixed players running over allies with vehicles (kind of) - Modified redirect filter infrastructure to support when there's no target filter (meaning it will just make sure the entity exists) - Fixed SDK_EyeRefract - Fixed env_beam SetStart/EndEntity - New "OnStateChange" output on NPCs - scripted_face removed (use generic facing VCDs instead) - Fixed RPC - Miscellaneous code cleanup
51 lines
1.5 KiB
C++
51 lines
1.5 KiB
C++
//========= Copyright (C) 2018, CSProMod Team, All rights reserved. =========//
|
|
//
|
|
// Purpose: provide world light related functions to the client
|
|
//
|
|
// Written: November 2011
|
|
// Author: Saul Rennison
|
|
//
|
|
//===========================================================================//
|
|
|
|
#pragma once
|
|
|
|
#include "igamesystem.h" // CAutoGameSystem
|
|
|
|
class Vector;
|
|
struct dworldlight_t;
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// Purpose:
|
|
//-----------------------------------------------------------------------------
|
|
class CWorldLights : public CAutoGameSystem
|
|
{
|
|
public:
|
|
CWorldLights();
|
|
~CWorldLights() { Clear(); }
|
|
|
|
//-------------------------------------------------------------------------
|
|
// Find the brightest light source at a point
|
|
//-------------------------------------------------------------------------
|
|
bool GetBrightestLightSource(const Vector &vecPosition, Vector &vecLightPos, Vector &vecLightBrightness);
|
|
#ifdef MAPBASE
|
|
bool GetCumulativeLightSource(const Vector &vecPosition, Vector &vecLightPos, float flMinBrightnessSqr);
|
|
#endif
|
|
|
|
// CAutoGameSystem overrides
|
|
public:
|
|
virtual bool Init();
|
|
virtual void LevelInitPreEntity();
|
|
virtual void LevelShutdownPostEntity() { Clear(); }
|
|
|
|
private:
|
|
void Clear();
|
|
|
|
int m_nWorldLights;
|
|
dworldlight_t *m_pWorldLights;
|
|
};
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// Singleton exposure
|
|
//-----------------------------------------------------------------------------
|
|
extern CWorldLights *g_pWorldLights;
|