Skip to content

Commit ed58eae

Browse files
committed
perf: do not declare convars inline with runtime code
a weird misusage of the convar constructor, should be done at init instead
1 parent 1f38e57 commit ed58eae

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/engine/l_studio.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3179,15 +3179,19 @@ int CModelRender::DrawStaticPropArrayFast( StaticPropRenderInfo_t *pProps, int c
31793179
#endif // SWDS
31803180
}
31813181

3182+
#ifndef SWDS
3183+
static ConVar r_shadowlod("r_shadowlod", "-1");
3184+
static ConVar r_shadowlodbias("r_shadowlodbias", "2");
3185+
#endif
3186+
31823187
//-----------------------------------------------------------------------------
31833188
// Shadow rendering
31843189
//-----------------------------------------------------------------------------
31853190
matrix3x4_t* CModelRender::DrawModelShadowSetup( IClientRenderable *pRenderable, int body, int skin, DrawModelInfo_t *pInfo, matrix3x4_t *pCustomBoneToWorld )
31863191
{
31873192
#ifndef SWDS
31883193
DrawModelInfo_t &info = *pInfo;
3189-
static ConVar r_shadowlod("r_shadowlod", "-1");
3190-
static ConVar r_shadowlodbias("r_shadowlodbias", "2");
3194+
31913195

31923196
model_t const* pModel = pRenderable->GetModel();
31933197
if ( !pModel )

0 commit comments

Comments
 (0)