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

@ -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++ )
{