source-sdk-2013-mapbase/sp/src/game/client/flashlighteffect.h
Joe Ludwig 53e78c503e General:
*         Upgraded Steamworks SDK to v1.29
*         Fixed mod compatibility problem with Multiplayer Base that was introduced in September.
*         In Hammer, while using the Vertex Tool, pressing CTRL+B will snap selected vertices to the grid.

Virtual Reality:
*         Mods that support virtual reality now need to have a line in gameinfo.txt that says “supportsvr 1”. This indicates to gameui and engine that certain UI should be enabled.
*         VR-enabled mods will now start up in VR mode when launched from Steam’s VR mode.

Windows:
*         Upgraded to Visual Studio 2013. If you need to build projects for VS 2010, add /2010 to your VPC command line.

OSX:
*         Upgraded to XCode 5.
2014-05-15 13:59:18 -07:00

65 lines
1.5 KiB
C++

//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//=============================================================================//
#ifndef FLASHLIGHTEFFECT_H
#define FLASHLIGHTEFFECT_H
#ifdef _WIN32
#pragma once
#endif
struct dlight_t;
class CFlashlightEffect
{
public:
CFlashlightEffect(int nEntIndex = 0);
virtual ~CFlashlightEffect();
virtual void UpdateLight(const Vector &vecPos, const Vector &vecDir, const Vector &vecRight, const Vector &vecUp, int nDistance);
void TurnOn();
void TurnOff();
bool IsOn( void ) { return m_bIsOn; }
ClientShadowHandle_t GetFlashlightHandle( void ) { return m_FlashlightHandle; }
void SetFlashlightHandle( ClientShadowHandle_t Handle ) { m_FlashlightHandle = Handle; }
protected:
void LightOff();
void LightOffOld();
void LightOffNew();
void UpdateLightNew(const Vector &vecPos, const Vector &vecDir, const Vector &vecRight, const Vector &vecUp);
void UpdateLightOld(const Vector &vecPos, const Vector &vecDir, int nDistance);
bool m_bIsOn;
int m_nEntIndex;
ClientShadowHandle_t m_FlashlightHandle;
// Vehicle headlight dynamic light pointer
dlight_t *m_pPointLight;
float m_flDistMod;
// Texture for flashlight
CTextureReference m_FlashlightTexture;
};
class CHeadlightEffect : public CFlashlightEffect
{
public:
CHeadlightEffect();
~CHeadlightEffect();
virtual void UpdateLight(const Vector &vecPos, const Vector &vecDir, const Vector &vecRight, const Vector &vecUp, int nDistance);
};
#endif // FLASHLIGHTEFFECT_H