Fix blood spurts causing divisions by zero at random.

This commit is contained in:
Mari the Deer 2021-01-30 10:19:42 +01:00
commit 376fd87da3
2 changed files with 3 additions and 3 deletions

View file

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r238 \cu(Fri 29 Jan 23:05:25 CET 2021)\c-";
SWWM_SHORTVER="\cw0.9.11b-pre r238 \cu(2021-01-29 23:05:25)\c-";
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r239 \cu(Sat 30 Jan 10:19:42 CET 2021)\c-";
SWWM_SHORTVER="\cw0.9.11b-pre r239 \cu(2021-01-30 10:19:42)\c-";

View file

@ -94,7 +94,7 @@ Class mkBloodSpray : Actor
Vector3 setofs;
setofs = (cos(target.angle)*attachofs.x+sin(target.angle)*attachofs.y,sin(target.angle)*attachofs.x-cos(target.angle)*attachofs.y,attachofs.z);
SetOrigin(level.Vec3Offset(target.pos,setofs),false);
int sz = max(1,args[0]/2)-Random[Blood](0,2);
int sz = max(1,args[0]/2-Random[Blood](0,2));
double ang, pt;
for ( int i=0; i<sz; i++ )
{