- fixed: P_Recalculate3DFloors may not be called before the vertex buffer has been set up.

Since this function creates dynamic copies for 3D floors that need to be split it requires the vertex buffer index to be set up.
In older versions this did not produce errors because there was a fallback render path that was less efficient.
Now with that fallback removed this resulted in temporary 3D floors being created without valid vertex data.

# Conflicts:
#	src/p_setup.cpp

# Conflicts:
#	src/p_setup.cpp
This commit is contained in:
Christoph Oelckers 2018-11-28 18:41:58 +01:00 committed by drfrag666
parent bc280f67ac
commit 7600b65810
2 changed files with 6 additions and 5 deletions

View file

@ -895,11 +895,6 @@ void P_Spawn3DFloors (void)
line.special=0;
line.args[0] = line.args[1] = line.args[2] = line.args[3] = line.args[4] = 0;
}
// kg3D - do it in software
for (auto &sec : level.sectors)
{
P_Recalculate3DFloors(&sec);
}
}

View file

@ -4087,6 +4087,12 @@ void P_SetupLevel(const char *lumpname, int position, bool newGame)
// This must be done BEFORE the PolyObj Spawn!!!
Renderer->PreprocessLevel();
for (auto &sec : level.sectors)
{
P_Recalculate3DFloors(&sec);
}
P_InitHealthGroups();
times[16].Clock();