I am making a script with a hog that has a SineGun modified with SetGearValues: The "Radius" and the "Boom" of the sinegunshot are set to 0 so that the weapon is used not for doing damage but for moving around the map with the blast wave of the recoil but this cause a game crash if you aim with the sight at an hog. Idk if this is fixable or if it is worth fixing. Thanks
Why did you change the Radius? It just shoves hogs around a little.
Anyway, eyeballing the code, it seems pretty sensitive to the Radius values. specifically.
else if (Gear^.Radius > 1) then
begin
if (Gear^.Health <= (initHealth div 6)) then
dec(Gear^.Radius)
end;
Does not do a zero check, which would probably underflow the radius on the dec.
I'd suggest Radius of 1, Health of 1, Damage of 0 based on the code, but maybe look over that function.
Changing Radius probably not necessary.
--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev
Of what you said I only understood to set the radius to 1 so I did that and now seems to work fine.
Thank you very much