mirror of
https://github.com/celisej567/source-sdk-2013.git
synced 2026-09-17 20:10:21 +03:00
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
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#include <vgui/ILocalize.h>
|
||||
#include "hud_vote.h"
|
||||
#include "ienginevgui.h"
|
||||
#include "viewpostprocess.h"
|
||||
#include "sourcevr/isourcevirtualreality.h"
|
||||
#if defined( _X360 )
|
||||
#include "xbox/xbox_console.h"
|
||||
@@ -291,6 +292,9 @@ ClientModeShared::ClientModeShared()
|
||||
m_pWeaponSelection = NULL;
|
||||
m_nRootSize[ 0 ] = m_nRootSize[ 1 ] = -1;
|
||||
|
||||
m_pCurrentPostProcessController = NULL;
|
||||
m_PostProcessLerpTimer.Invalidate();
|
||||
|
||||
#if defined( REPLAY_ENABLED )
|
||||
m_pReplayReminderPanel = NULL;
|
||||
m_flReplayStartRecordTime = 0.0f;
|
||||
@@ -604,6 +608,8 @@ void ClientModeShared::Update()
|
||||
m_pViewport->SetVisible( cl_drawhud.GetBool() );
|
||||
}
|
||||
|
||||
UpdatePostProcessingEffects();
|
||||
|
||||
UpdateRumbleEffects();
|
||||
|
||||
if ( cl_show_num_particle_systems.GetBool() )
|
||||
@@ -914,6 +920,17 @@ void ClientModeShared::LevelShutdown( void )
|
||||
s_hVGuiContext = DEFAULT_VGUI_CONTEXT;
|
||||
}
|
||||
|
||||
#ifdef MAPBASE
|
||||
// Always reset post-processing on level unload
|
||||
//if (m_pCurrentPostProcessController)
|
||||
{
|
||||
m_CurrentPostProcessParameters = PostProcessParameters_t();
|
||||
m_LerpEndPostProcessParameters = PostProcessParameters_t();
|
||||
m_pCurrentPostProcessController = NULL;
|
||||
SetPostProcessParams( &m_CurrentPostProcessParameters );
|
||||
}
|
||||
#endif
|
||||
|
||||
// Reset any player explosion/shock effects
|
||||
CLocalPlayerFilter filter;
|
||||
enginesound->SetPlayerDSP( filter, 0, true );
|
||||
@@ -988,6 +1005,69 @@ float ClientModeShared::GetViewModelFOV( void )
|
||||
return v_viewmodel_fov.GetFloat();
|
||||
}
|
||||
|
||||
#ifdef MAPBASE
|
||||
extern bool g_bPostProcessNeedsRestore;
|
||||
#endif
|
||||
|
||||
void ClientModeShared::UpdatePostProcessingEffects()
|
||||
{
|
||||
C_PostProcessController* pNewPostProcessController = NULL;
|
||||
C_BasePlayer* pPlayer = C_BasePlayer::GetLocalPlayer();
|
||||
|
||||
if (pPlayer)
|
||||
pNewPostProcessController = pPlayer->GetActivePostProcessController();
|
||||
|
||||
if (!pNewPostProcessController)
|
||||
{
|
||||
m_CurrentPostProcessParameters = PostProcessParameters_t();
|
||||
m_pCurrentPostProcessController = NULL;
|
||||
SetPostProcessParams( &m_CurrentPostProcessParameters );
|
||||
return;
|
||||
}
|
||||
|
||||
if (pNewPostProcessController != m_pCurrentPostProcessController)
|
||||
m_pCurrentPostProcessController = pNewPostProcessController;
|
||||
|
||||
// Start a lerp timer if the parameters changed, regardless of whether the controller changed
|
||||
if (m_LerpEndPostProcessParameters != pNewPostProcessController->m_PostProcessParameters)
|
||||
{
|
||||
m_LerpStartPostProcessParameters = m_CurrentPostProcessParameters;
|
||||
m_LerpEndPostProcessParameters = pNewPostProcessController ? pNewPostProcessController->m_PostProcessParameters : m_CurrentPostProcessParameters;
|
||||
|
||||
float flFadeTime = pNewPostProcessController ? pNewPostProcessController->m_PostProcessParameters.m_flParameters[PPPN_FADE_TIME] : 0.0f;
|
||||
if (flFadeTime <= 0.0f)
|
||||
{
|
||||
flFadeTime = 0.001f;
|
||||
}
|
||||
|
||||
m_PostProcessLerpTimer.Start( flFadeTime );
|
||||
}
|
||||
#ifdef MAPBASE
|
||||
// HACKHACK: Needs to be checked here because OnRestore() doesn't seem to run before a lerp begins
|
||||
else if (g_bPostProcessNeedsRestore)
|
||||
{
|
||||
// The player just loaded a saved game.
|
||||
// Don't fade parameters from 0; instead, take what's already there and assume they were already active.
|
||||
// (we have no way of knowing if they were in the middle of a lerp)
|
||||
m_PostProcessLerpTimer.Invalidate();
|
||||
g_bPostProcessNeedsRestore = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Lerp between old and new parameters
|
||||
float flLerpFactor = 1.0f - m_PostProcessLerpTimer.GetRemainingRatio();
|
||||
for (int nParameter = 0; nParameter < POST_PROCESS_PARAMETER_COUNT; ++nParameter)
|
||||
{
|
||||
m_CurrentPostProcessParameters.m_flParameters[nParameter] =
|
||||
Lerp(
|
||||
flLerpFactor,
|
||||
m_LerpStartPostProcessParameters.m_flParameters[nParameter],
|
||||
m_LerpEndPostProcessParameters.m_flParameters[nParameter] );
|
||||
}
|
||||
|
||||
SetPostProcessParams( &m_CurrentPostProcessParameters );
|
||||
}
|
||||
|
||||
class CHudChat;
|
||||
|
||||
bool PlayerNameNotSetYet( const char *pszName )
|
||||
|
||||
Reference in New Issue
Block a user