mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-13 16:07:45 +00:00
- do not clip the first frame of very slow projectiles.
This commit is contained in:
parent
7b65e6d424
commit
8817f89192
1 changed files with 6 additions and 2 deletions
|
@ -595,10 +595,14 @@ void GLSprite::Process(AActor* thing, sector_t * sector, int thruportal)
|
|||
if (thing->flags&MF_MISSILE)
|
||||
{
|
||||
if (!(thing->flags7 & MF7_FLYCHEAT) && thing->target == GLRenderer->mViewActor && GLRenderer->mViewActor != NULL)
|
||||
{
|
||||
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.
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue