Fix infinite loop in silver bullet trace.

This commit is contained in:
Mari the Deer 2021-08-20 22:19:00 +02:00
commit 275a16d1bf
2 changed files with 5 additions and 4 deletions

View file

@ -674,15 +674,16 @@ Class SilverBullet : SWWMWeapon
}
}
sst.pastwall = false;
sst.fullstop = false;
Vector3 norigin = origin;
double maxdist = 20000.;
while ( !sst.fullstop )
do
{
sst.fullstop = true;
sst.Trace(norigin,level.PointInSector(norigin.xy),x2,maxdist,TRACE_HitSky);
maxdist -= (sst.exitpoint-norigin).length();
norigin = sst.exitpoint;
}
while ( !sst.fullstop );
invoker.nkills = 0;
ProcessTraceHit(sst,origin,x2);
}