mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-29 07:12:36 +00:00
- fix softpoly portal crash
This commit is contained in:
parent
e8eb8dd596
commit
61032cb6ae
1 changed files with 4 additions and 2 deletions
|
@ -49,6 +49,7 @@ RenderPolyScene::~RenderPolyScene()
|
||||||
|
|
||||||
void RenderPolyScene::Render(PolyPortalViewpoint *viewpoint)
|
void RenderPolyScene::Render(PolyPortalViewpoint *viewpoint)
|
||||||
{
|
{
|
||||||
|
PolyPortalViewpoint *oldviewpoint = CurrentViewpoint;
|
||||||
CurrentViewpoint = viewpoint;
|
CurrentViewpoint = viewpoint;
|
||||||
|
|
||||||
PolyRenderThread *thread = PolyRenderer::Instance()->Threads.MainThread();
|
PolyRenderThread *thread = PolyRenderer::Instance()->Threads.MainThread();
|
||||||
|
@ -85,7 +86,7 @@ void RenderPolyScene::Render(PolyPortalViewpoint *viewpoint)
|
||||||
|
|
||||||
RenderPortals();
|
RenderPortals();
|
||||||
|
|
||||||
CurrentViewpoint = nullptr;
|
CurrentViewpoint = oldviewpoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RenderPolyScene::RenderSectors()
|
void RenderPolyScene::RenderSectors()
|
||||||
|
@ -359,6 +360,7 @@ void RenderPolyScene::RenderPortals()
|
||||||
|
|
||||||
void RenderPolyScene::RenderTranslucent(PolyPortalViewpoint *viewpoint)
|
void RenderPolyScene::RenderTranslucent(PolyPortalViewpoint *viewpoint)
|
||||||
{
|
{
|
||||||
|
PolyPortalViewpoint *oldviewpoint = CurrentViewpoint;
|
||||||
CurrentViewpoint = viewpoint;
|
CurrentViewpoint = viewpoint;
|
||||||
|
|
||||||
PolyRenderThread *thread = PolyRenderer::Instance()->Threads.MainThread();
|
PolyRenderThread *thread = PolyRenderer::Instance()->Threads.MainThread();
|
||||||
|
@ -428,7 +430,7 @@ void RenderPolyScene::RenderTranslucent(PolyPortalViewpoint *viewpoint)
|
||||||
|
|
||||||
PolyMaskedCycles.Unclock();
|
PolyMaskedCycles.Unclock();
|
||||||
|
|
||||||
CurrentViewpoint = nullptr;
|
CurrentViewpoint = oldviewpoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Reference in a new issue