This commit is contained in:
2022-09-15 17:48:53 +03:00
parent a025c1dbc8
commit 3d00a8ca15
6 changed files with 18 additions and 18 deletions

View File

@@ -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"); //<2F> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#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

View File

@@ -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);
}

View File

@@ -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()

View File

@@ -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?

View File

@@ -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));
}
}

View File

@@ -280,6 +280,8 @@ protected:
float m_fFrameTime;
//private:
int m_iSpeedCropped;