mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-16 09:31:14 +00:00
- add null pointer check on camera (patch by dpJudas)
This commit is contained in:
parent
f250bffbb4
commit
8aa4e84b84
1 changed files with 11 additions and 5 deletions
|
@ -140,10 +140,15 @@ void PolyRenderer::RenderActorView(AActor *actor, bool dontmaplines)
|
|||
PolyCameraLight::Instance()->SetCamera(Viewpoint, RenderTarget, actor);
|
||||
//Viewport->SetupFreelook();
|
||||
|
||||
ActorRenderFlags savedflags = Viewpoint.camera->renderflags;
|
||||
ActorRenderFlags savedflags = 0;
|
||||
if (Viewpoint.camera)
|
||||
{
|
||||
savedflags = Viewpoint.camera->renderflags;
|
||||
|
||||
// Never draw the player unless in chasecam mode
|
||||
if (!Viewpoint.showviewer)
|
||||
Viewpoint.camera->renderflags |= RF_INVISIBLE;
|
||||
}
|
||||
|
||||
ScreenTriangle::FuzzStart = (ScreenTriangle::FuzzStart + 14) % FUZZTABLE;
|
||||
|
||||
|
@ -161,6 +166,7 @@ void PolyRenderer::RenderActorView(AActor *actor, bool dontmaplines)
|
|||
Scene.RenderTranslucent(&mainViewpoint);
|
||||
PlayerSprites.Render(Threads.MainThread());
|
||||
|
||||
if (Viewpoint.camera)
|
||||
Viewpoint.camera->renderflags = savedflags;
|
||||
interpolator.RestoreInterpolations ();
|
||||
|
||||
|
|
Loading…
Reference in a new issue