From 8817f891923a9d675e9fa964710083770b827396 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 4 May 2016 20:31:21 +0200 Subject: [PATCH] - do not clip the first frame of very slow projectiles. --- src/gl/scene/gl_sprite.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gl/scene/gl_sprite.cpp b/src/gl/scene/gl_sprite.cpp index c85de8a0d..97e041497 100644 --- a/src/gl/scene/gl_sprite.cpp +++ b/src/gl/scene/gl_sprite.cpp @@ -596,8 +596,12 @@ void GLSprite::Process(AActor* thing, sector_t * sector, int thruportal) { if (!(thing->flags7 & MF7_FLYCHEAT) && thing->target == GLRenderer->mViewActor && GLRenderer->mViewActor != NULL) { - double clipdist = clamp(thing->Speed, thing->target->radius, thing->target->radius * 2); - if ((thingpos - ViewPos).LengthSquared() < clipdist * clipdist) return; + double speed = thing->Vel.Length(); + if (speed >= thing->target->radius / 2) + { + double clipdist = clamp(thing->Speed, thing->target->radius, thing->target->radius * 2); + if ((thingpos - ViewPos).LengthSquared() < clipdist * clipdist) return; + } } thing->flags7 |= MF7_FLYCHEAT; // do this only once for the very first frame, but not if it gets into range again. }