Remove hacks associated with SetLevelMesh

This commit is contained in:
RaveYard 2023-09-11 14:42:18 +02:00 committed by Christoph Oelckers
parent d59be13830
commit 6a2135b315
4 changed files with 6 additions and 9 deletions

View file

@ -55,12 +55,9 @@ void VkRaytrace::SetLevelMesh(LevelMesh* mesh)
if (!mesh)
mesh = &NullMesh;
if (mesh != Mesh)
{
Reset();
Mesh = mesh;
CreateVulkanObjects();
}
Reset();
Mesh = mesh;
CreateVulkanObjects();
}
void VkRaytrace::Reset()

View file

@ -537,7 +537,7 @@ void VulkanRenderDevice::SetLevelMesh(LevelMesh* mesh)
{
mRaytrace->SetLevelMesh(mesh);
if (lastMesh != mesh && mesh->GetSurfaceCount() > 0)
if (mesh->GetSurfaceCount() > 0)
{
lastMesh = mesh;

View file

@ -475,6 +475,8 @@ void P_SetupLevel(FLevelLocals *Level, int position, bool newGame)
loader.LoadLevel(map, Level->MapName.GetChars(), position);
delete map;
screen->SetLevelMesh(Level->levelMesh);
// if deathmatch, randomly spawn the active players
if (deathmatch)
{

View file

@ -123,8 +123,6 @@ sector_t* RenderViewpoint(FRenderViewpoint& mainvp, AActor* camera, IntRect* bou
screen->mShadowMap->SetCollectLights(nullptr);
}
screen->SetLevelMesh(camera->Level->levelMesh);
static HWDrawContext mainthread_drawctx;
hw_ClearFakeFlat(&mainthread_drawctx);