Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 4 additions & 22 deletions src/game/client/clientleafsystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1004,20 +1004,6 @@ void CClientLeafSystem::RemoveShadowFromRenderables( ClientLeafShadowHandle_t ha
//-----------------------------------------------------------------------------
void CClientLeafSystem::AddShadowToLeaf( int leaf, ClientLeafShadowHandle_t shadow )
{
#if defined(DEBUG) && defined(NEO)
static constexpr const char *ASSERT_MAPS_TO_IGNORE[] = {
"ntre_engage_ctg", "ntre_skyline_ctg", "ntre_rise_ctg"
};
bool bIgnoreAssert = false;
for (const char *pszMapCmp : ASSERT_MAPS_TO_IGNORE)
{
if (FStrEq(MapName(), pszMapCmp))
{
bIgnoreAssert = true;
break;
}
}
#endif // defined(DEBUG) && defined(NEO)
m_ShadowsInLeaf.AddElementToBucket( leaf, shadow );

// Add the shadow exactly once to all renderables in the leaf
Expand All @@ -1034,15 +1020,11 @@ void CClientLeafSystem::AddShadowToLeaf( int leaf, ClientLeafShadowHandle_t shad
info.m_EnumCount = m_ShadowEnum;
}

#ifdef DEBUG
#ifdef NEO
// Few maps will happily blows past this limit, but it seems to be fine.
// Just ignoring this specific case in debug.
if (!bIgnoreAssert)
#endif
{
Assert(m_ShadowsInLeaf.NumAllocated() < 2000);
}
// don't nuke dev build perf by spamming the assert every frame
AssertOnce(m_ShadowsInLeaf.NumAllocated() < 2000);
#else
Assert(m_ShadowsInLeaf.NumAllocated() < 2000);
#endif

i = m_RenderablesInLeaf.NextElement(i);
Expand Down
Loading