From 0931134a9c1701ea58c9ef8efe2e68f05acf3514 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 12 Feb 2016 11:20:33 +0100 Subject: [PATCH] - fixed: part of the special handling of projectiles being spawned near the camera also affected other actors, this caused the fly cheat to break. --- src/gl/scene/gl_sprite.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/gl/scene/gl_sprite.cpp b/src/gl/scene/gl_sprite.cpp index 7c51e55c2..81c9cc3cd 100644 --- a/src/gl/scene/gl_sprite.cpp +++ b/src/gl/scene/gl_sprite.cpp @@ -526,12 +526,15 @@ void GLSprite::Process(AActor* thing,sector_t * sector) } // don't draw first frame of a player missile - if (thing->flags&MF_MISSILE && !(thing->flags7 & MF7_FLYCHEAT) && thing->target==GLRenderer->mViewActor && GLRenderer->mViewActor != NULL) + if (thing->flags&MF_MISSILE) { - fixed_t clipdist = clamp(thing->Speed, thing->target->radius, thing->target->radius*2); - if (P_AproxDistance(thingpos.x-viewx, thingpos.y-viewy) < clipdist) return; + if (!(thing->flags7 & MF7_FLYCHEAT) && thing->target==GLRenderer->mViewActor && GLRenderer->mViewActor != NULL) + { + fixed_t clipdist = clamp(thing->Speed, thing->target->radius, thing->target->radius*2); + if (P_AproxDistance(thingpos.x-viewx, thingpos.y-viewy) < clipdist) return; + } + thing->flags7 |= MF7_FLYCHEAT; // do this only once for the very first frame, but not if it gets into range again. } - thing->flags7 |= MF7_FLYCHEAT; // do this only once for the very first frame, but not if it gets into range again. if (GLRenderer->mCurrentPortal) {