source-sdk-2013-mapbase/sp/src/game/server/postprocesscontroller.h
Blixibon 87cd9b24bb Mapbase v6.1
- Added postprocess_controller entity from later versions of Source
- Added env_dof_controller entity from later versions of Source
- Added SDK_Engine_Post and DepthOfField shaders from the Momentum repo/Alien Swarm SDK
- Fixed auto-breaking game_text/choreo text not null terminating
- Fixed console groups showing up at the wrong developer levels
- Added more mesages to console groups, including a new "NPC AI" console group
- Fixed typos and added elaboration in various cvars, console messages, etc.
- Fixed npc_metropolice not using frag grenades correctly when allowed to use them
- Fixed npc_metropolice not registering stitching squad slots in AI
- Fixed SetModel input late precache warning
- Fixed env_global_light angles resetting upon loading a save
- Fixed an issue with ScriptKeyValuesRead using the wrong name and having a memory leak
- Allowed VScript functions which return null strings to actually return null instead of empty strings
- Added VScript member variable documentation
- Fixed VScript documentation lines sometimes mixing together
- Fixed VScript singletons having a ! at the beginning of descriptions
- Added Color struct to VScript and allowed color-related inputs to use it
- Added more VScript functions for weapons, ammo, ragdolling, and response contexts
- Added GameRules singleton for VScript
- Exposed AI interaction system to VScript
- Recovered some lost documentation from older revisions of the Mapbase wiki
- Added a way to get the current game's load type in VScript
- Fixed Precache/SpawnEntityFromTable not accounting for a few important field types
- Added VScript functions for getting a player's eye vectors
- Fixed a crash caused by removing the active weapon of a Combine soldier while it's firing
- Changed the way metrocops deploy their manhacks so they could use their manhack death response properly
- Fixed "Use Server" keyvalue on game_convar_mod not working
- Adjusted CAI_Expresser in VScript
2020-12-17 03:38:23 +00:00

81 lines
2.2 KiB
C++

#pragma once
#include "GameEventListener.h"
#include "postprocess_shared.h"
// Spawn Flags
#define SF_POSTPROCESS_MASTER 0x0001
//=============================================================================
// Class Postprocess Controller:
//=============================================================================
class CPostProcessController : public CBaseEntity
{
public:
DECLARE_SERVERCLASS();
DECLARE_DATADESC();
DECLARE_CLASS( CPostProcessController, CBaseEntity );
CPostProcessController();
virtual ~CPostProcessController();
virtual int UpdateTransmitState();
// Input handlers
void InputSetFadeTime(inputdata_t &data);
void InputSetLocalContrastStrength(inputdata_t &data);
void InputSetLocalContrastEdgeStrength(inputdata_t &data);
void InputSetVignetteStart(inputdata_t &data);
void InputSetVignetteEnd(inputdata_t &data);
void InputSetVignetteBlurStrength(inputdata_t &data);
void InputSetFadeToBlackStrength(inputdata_t &data);
void InputSetDepthBlurFocalDistance(inputdata_t &data);
void InputSetDepthBlurStrength(inputdata_t &data);
void InputSetScreenBlurStrength(inputdata_t &data);
void InputSetFilmGrainStrength(inputdata_t &data);
void InputTurnOn(inputdata_t &data);
void InputTurnOff(inputdata_t &data);
void Spawn();
bool IsMaster() const { return HasSpawnFlags( SF_FOG_MASTER ); }
public:
CNetworkArray( float, m_flPostProcessParameters, POST_PROCESS_PARAMETER_COUNT );
CNetworkVar( bool, m_bMaster );
};
//=============================================================================
//
// Postprocess Controller System.
//
class CPostProcessSystem : public CAutoGameSystem, public CGameEventListener
{
public:
// Creation/Init.
CPostProcessSystem( char const *name ) : CAutoGameSystem( name )
{
m_hMasterController = nullptr;
}
~CPostProcessSystem()
{
m_hMasterController = nullptr;
}
virtual void LevelInitPreEntity();
virtual void LevelInitPostEntity();
virtual void FireGameEvent( IGameEvent *pEvent );
CPostProcessController *GetMasterPostProcessController() { return m_hMasterController; }
private:
void InitMasterController();
CHandle< CPostProcessController > m_hMasterController;
};
CPostProcessSystem *PostProcessSystem();