From 3d00a8ca15bdbec7c9d098401eff7630d122610e Mon Sep 17 00:00:00 2001 From: celisej567 Date: Thu, 15 Sep 2022 17:48:53 +0300 Subject: [PATCH] 1 --- sp/src/game/client/c_env_cascade_light.cpp | 19 ++++++++++--------- sp/src/game/client/clientleafsystem.cpp | 2 +- sp/src/game/server/env_cascade_light.cpp | 2 +- sp/src/game/shared/baseviewmodel_shared.h | 4 ---- sp/src/game/shared/gamemovement.cpp | 7 ++++--- sp/src/game/shared/gamemovement.h | 2 ++ 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/sp/src/game/client/c_env_cascade_light.cpp b/sp/src/game/client/c_env_cascade_light.cpp index 81827553..67d64f3a 100644 --- a/sp/src/game/client/c_env_cascade_light.cpp +++ b/sp/src/game/client/c_env_cascade_light.cpp @@ -23,12 +23,12 @@ static ConVarRef mat_depthbias_shadowmap("mat_depthbias_shadowmap"); static ConVar scissor("r_flashlightscissor", "0"); #ifdef MAPBASE -static ConVar csm_ortho("csm_ortho","0", 0, "Turn light into ortho. Im lazy right now to make this works fine"); -ConVar csm_ortho_nearz("csm_ortho_nearz", "512"); -ConVar csm_ortho_left("csm_ortho_left", "-1000"); -ConVar csm_ortho_top("csm_ortho_top", "-1000"); -ConVar csm_ortho_bottom("csm_ortho_bottom", "1000"); -ConVar csm_ortho_right("csm_ortho_right", "1000"); +//static ConVar csm_ortho("csm_ortho","0", 0, "Turn light into ortho. Im lazy right now to make this works fine"); +//ConVar csm_ortho_nearz("csm_ortho_nearz", "512"); +//ConVar csm_ortho_left("csm_ortho_left", "-1000"); +//ConVar csm_ortho_top("csm_ortho_top", "-1000"); +//ConVar csm_ortho_bottom("csm_ortho_bottom", "1000"); +//ConVar csm_ortho_right("csm_ortho_right", "1000"); //ConVar csm_test_color_interpolation("csm_test_color_interpolation","0"); //я не помню что она делает, но она определённо этого не делает #endif @@ -48,12 +48,12 @@ public: virtual void Simulate(); private: - //Vector LightEnvVector; + Vector LightEnvVector; //QAngle LightEnvAngle; }; IMPLEMENT_CLIENTCLASS_DT(C_LightOrigin, DT_LightOrigin, CLightOrigin) -//RecvPropVector(RECVINFO(LightEnvVector)) +RecvPropVector(RECVINFO(LightEnvVector)) END_RECV_TABLE() void C_LightOrigin::Update() @@ -68,7 +68,8 @@ void C_LightOrigin::Simulate() BaseClass::Simulate(); } -ConVar bebra("csm_filter", "2"); +ConVar bebra("csm_filter", "1"); //if you have r_flashlightdepthres 4096 then better to change this value to 0.5 + //----------------------------------------------------------------------------- // Purpose: main csm code diff --git a/sp/src/game/client/clientleafsystem.cpp b/sp/src/game/client/clientleafsystem.cpp index 03d36cd5..b2ded967 100644 --- a/sp/src/game/client/clientleafsystem.cpp +++ b/sp/src/game/client/clientleafsystem.cpp @@ -999,7 +999,7 @@ void CClientLeafSystem::AddShadowToLeaf( int leaf, ClientLeafShadowHandle_t shad info.m_EnumCount = m_ShadowEnum; } - Assert( m_ShadowsInLeaf.NumAllocated() < 2000 ); + //Assert( m_ShadowsInLeaf.NumAllocated() < 2000 ); i = m_RenderablesInLeaf.NextElement(i); } diff --git a/sp/src/game/server/env_cascade_light.cpp b/sp/src/game/server/env_cascade_light.cpp index 179b5745..89417220 100644 --- a/sp/src/game/server/env_cascade_light.cpp +++ b/sp/src/game/server/env_cascade_light.cpp @@ -45,7 +45,7 @@ private: LINK_ENTITY_TO_CLASS(csmorigin, CLightOrigin); BEGIN_DATADESC(CLightOrigin) -//DEFINE_FIELD(LightEnvVector, FIELD_VECTOR), +DEFINE_FIELD(LightEnvVector, FIELD_VECTOR), DEFINE_THINKFUNC(InitialThink) END_DATADESC() diff --git a/sp/src/game/shared/baseviewmodel_shared.h b/sp/src/game/shared/baseviewmodel_shared.h index 7e9c79a6..3df00a17 100644 --- a/sp/src/game/shared/baseviewmodel_shared.h +++ b/sp/src/game/shared/baseviewmodel_shared.h @@ -145,11 +145,7 @@ public: // Should this object receive shadows? virtual bool ShouldReceiveProjectedTextures( int flags ) { -#ifdef MAPBASE return true; -#else - return false; -#endif } // Add entity to visible view models list? diff --git a/sp/src/game/shared/gamemovement.cpp b/sp/src/game/shared/gamemovement.cpp index 27a3b32f..8951713e 100644 --- a/sp/src/game/shared/gamemovement.cpp +++ b/sp/src/game/shared/gamemovement.cpp @@ -1968,17 +1968,18 @@ void CGameMovement::WalkMove( void ) } - if (mv->m_flSideMove > 0) + if (smove > 0) { float zoffset = 2.5 * player->GetAbsVelocity().Length() * cl_viewbob_zscale.GetFloat() / cl_viewbob_zoffset.GetFloat(); player->ViewPunch(QAngle(0, 0, zoffset)); } - else if (mv->m_flSideMove < 0) + else if (smove < 0) { float zoffset = 2.5 * player->GetAbsVelocity().Length() * cl_viewbob_zscale.GetFloat() / cl_viewbob_zoffset.GetFloat(); player->ViewPunch(QAngle(0, 0, -zoffset)); } - + + } diff --git a/sp/src/game/shared/gamemovement.h b/sp/src/game/shared/gamemovement.h index 1c7a3d0f..97b83a6d 100644 --- a/sp/src/game/shared/gamemovement.h +++ b/sp/src/game/shared/gamemovement.h @@ -280,6 +280,8 @@ protected: float m_fFrameTime; + + //private: int m_iSpeedCropped;