forked from ValveSoftware/source-sdk-2013
-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 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
- Loading branch information
Showing
82 changed files
with
4,589 additions
and
330 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
//====== Copyright © 1996-2005, Valve Corporation, All rights reserved. ======= | ||
// | ||
// Purpose: Depth of field controller entity | ||
// | ||
//============================================================================= | ||
|
||
#include "cbase.h" | ||
|
||
// NOTE: This has to be the last file included! | ||
#include "tier0/memdbgon.h" | ||
|
||
|
||
extern bool g_bDOFEnabled; | ||
extern float g_flDOFNearBlurDepth; | ||
extern float g_flDOFNearFocusDepth; | ||
extern float g_flDOFFarFocusDepth; | ||
extern float g_flDOFFarBlurDepth; | ||
extern float g_flDOFNearBlurRadius; | ||
extern float g_flDOFFarBlurRadius; | ||
|
||
EHANDLE g_hDOFControllerInUse = NULL; | ||
|
||
class C_EnvDOFController : public C_BaseEntity | ||
{ | ||
DECLARE_CLASS( C_EnvDOFController, C_BaseEntity ); | ||
public: | ||
DECLARE_CLIENTCLASS(); | ||
|
||
C_EnvDOFController(); | ||
~C_EnvDOFController(); | ||
virtual void OnDataChanged( DataUpdateType_t updateType ); | ||
|
||
private: | ||
bool m_bDOFEnabled; | ||
float m_flNearBlurDepth; | ||
float m_flNearFocusDepth; | ||
float m_flFarFocusDepth; | ||
float m_flFarBlurDepth; | ||
float m_flNearBlurRadius; | ||
float m_flFarBlurRadius; | ||
|
||
private: | ||
C_EnvDOFController( const C_EnvDOFController & ); | ||
}; | ||
|
||
IMPLEMENT_CLIENTCLASS_DT( C_EnvDOFController, DT_EnvDOFController, CEnvDOFController ) | ||
RecvPropInt( RECVINFO(m_bDOFEnabled) ), | ||
RecvPropFloat( RECVINFO(m_flNearBlurDepth) ), | ||
RecvPropFloat( RECVINFO(m_flNearFocusDepth) ), | ||
RecvPropFloat( RECVINFO(m_flFarFocusDepth) ), | ||
RecvPropFloat( RECVINFO(m_flFarBlurDepth) ), | ||
RecvPropFloat( RECVINFO(m_flNearBlurRadius) ), | ||
RecvPropFloat( RECVINFO(m_flFarBlurRadius) ) | ||
END_RECV_TABLE() | ||
|
||
C_EnvDOFController::C_EnvDOFController() | ||
: m_bDOFEnabled( true ), | ||
m_flNearBlurDepth( 20.0f ), | ||
m_flNearFocusDepth( 100.0f ), | ||
m_flFarFocusDepth( 250.0f ), | ||
m_flFarBlurDepth( 1000.0f ), | ||
m_flNearBlurRadius( 0.0f ), // no near blur by default | ||
m_flFarBlurRadius( 5.0f ) | ||
{ | ||
} | ||
|
||
C_EnvDOFController::~C_EnvDOFController() | ||
{ | ||
if ( g_hDOFControllerInUse == this ) | ||
{ | ||
g_bDOFEnabled = false; | ||
} | ||
} | ||
|
||
void C_EnvDOFController::OnDataChanged( DataUpdateType_t updateType ) | ||
{ | ||
BaseClass::OnDataChanged( updateType ); | ||
|
||
g_bDOFEnabled = m_bDOFEnabled && ( ( m_flNearBlurRadius > 0.0f ) || ( m_flFarBlurRadius > 0.0f ) ); | ||
g_flDOFNearBlurDepth = m_flNearBlurDepth; | ||
g_flDOFNearFocusDepth = m_flNearFocusDepth; | ||
g_flDOFFarFocusDepth = m_flFarFocusDepth; | ||
g_flDOFFarBlurDepth = m_flFarBlurDepth; | ||
g_flDOFNearBlurRadius = m_flNearBlurRadius; | ||
g_flDOFFarBlurRadius = m_flFarBlurRadius; | ||
|
||
g_hDOFControllerInUse = this; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
//====== Copyright © 1996-2008, Valve Corporation, All rights reserved. ======= | ||
// | ||
// Purpose: stores map postprocess params | ||
// | ||
//============================================================================= | ||
#include "cbase.h" | ||
#include "c_postprocesscontroller.h" | ||
|
||
// memdbgon must be the last include file in a .cpp file!!! | ||
#include "tier0/memdbgon.h" | ||
|
||
IMPLEMENT_CLIENTCLASS_DT( C_PostProcessController, DT_PostProcessController, CPostProcessController ) | ||
RecvPropArray3( RECVINFO_NAME( m_PostProcessParameters.m_flParameters[0], m_flPostProcessParameters ), POST_PROCESS_PARAMETER_COUNT, RecvPropFloat( RECVINFO_NAME( m_PostProcessParameters.m_flParameters[0], m_flPostProcessParameters[0] ) ) ), | ||
RecvPropBool( RECVINFO(m_bMaster) ) | ||
END_RECV_TABLE() | ||
|
||
C_PostProcessController* C_PostProcessController::ms_pMasterController = nullptr; | ||
|
||
//----------------------------------------------------------------------------- | ||
C_PostProcessController::C_PostProcessController() | ||
: m_bMaster( false ) | ||
{ | ||
if ( ms_pMasterController == nullptr) | ||
{ | ||
ms_pMasterController = this; | ||
} | ||
} | ||
|
||
//----------------------------------------------------------------------------- | ||
C_PostProcessController::~C_PostProcessController() | ||
{ | ||
if ( ms_pMasterController == this ) | ||
{ | ||
ms_pMasterController = nullptr; | ||
} | ||
} | ||
|
||
void C_PostProcessController::PostDataUpdate( DataUpdateType_t updateType ) | ||
{ | ||
BaseClass::PostDataUpdate( updateType ); | ||
|
||
if ( m_bMaster ) | ||
{ | ||
ms_pMasterController = this; | ||
} | ||
} | ||
|
||
#ifdef MAPBASE | ||
// Prevents parameters from fading after a save/restore | ||
bool g_bPostProcessNeedsRestore = false; | ||
|
||
void C_PostProcessController::OnRestore() | ||
{ | ||
BaseClass::OnRestore(); | ||
|
||
C_BasePlayer *pPlayer = C_BasePlayer::GetLocalPlayer(); | ||
if ( pPlayer && pPlayer->GetActivePostProcessController() == this ) | ||
{ | ||
// Tell clientmode this is part of a save/restore | ||
g_bPostProcessNeedsRestore = true; | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#pragma once | ||
|
||
#include "postprocess_shared.h" | ||
|
||
//============================================================================= | ||
// | ||
// Class Postprocess Controller: | ||
// | ||
class C_PostProcessController : public C_BaseEntity | ||
{ | ||
DECLARE_CLASS( C_PostProcessController, C_BaseEntity ); | ||
public: | ||
DECLARE_CLIENTCLASS(); | ||
|
||
C_PostProcessController(); | ||
virtual ~C_PostProcessController(); | ||
|
||
virtual void PostDataUpdate( DataUpdateType_t updateType ); | ||
|
||
static C_PostProcessController* GetMasterController() { return ms_pMasterController; } | ||
|
||
PostProcessParameters_t m_PostProcessParameters; | ||
|
||
#ifdef MAPBASE | ||
// Prevents fade time from being used in save/restore | ||
virtual void OnRestore(); | ||
#endif | ||
|
||
private: | ||
bool m_bMaster; | ||
|
||
static C_PostProcessController* ms_pMasterController; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.