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

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\chSWWM \czGZ\c- \cw1.0.5 r4 \cu(Fri 20 Aug 21:49:27 CEST 2021)\c-";
SWWM_SHORTVER="\cw1.0.5 r4 \cu(2021-08-20 21:49:27)\c-";
SWWM_MODVER="\chSWWM \czGZ\c- \cw1.0.7 \cu(Fri 20 Aug 22:19:29 CEST 2021)\c-";
SWWM_SHORTVER="\cw1.0.7 \cu(2021-08-20 22:19:29)\c-";

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);
}