Fix yet another ballgun bug
authorunc0rr
Mon, 12 Jan 2009 14:43:56 +0000
changeset 1643 434e28245dc0
parent 1642 177b440773de
child 1644 1e51e80c383c
Fix yet another ballgun bug
hedgewars/GSHandlers.inc
hedgewars/uConsts.pas
--- a/hedgewars/GSHandlers.inc	Sun Jan 11 11:03:09 2009 +0000
+++ b/hedgewars/GSHandlers.inc	Mon Jan 12 14:43:56 2009 +0000
@@ -603,7 +603,7 @@
 		Gear^.X:= HHGear^.X + Gear^.dX * (cHHRadius + cBlowTorchC);
 		Gear^.Y:= HHGear^.Y + Gear^.dY * (cHHRadius + cBlowTorchC);
 		HHGear^.State:= HHGear^.State or gstNoDamage;
-		AmmoShove(Gear, 2, 10);
+		AmmoShove(Gear, 2, 15);
 		HHGear^.State:= HHGear^.State and not gstNoDamage
 		end;
 	end;
@@ -1936,11 +1936,11 @@
 		PlaySound(sndGun, false);
 		end;
 
-	if (Gear^.Timer = 0) then
+	if (Gear^.Timer = 0) or (HHGear^.Damage <> 0) then
 		begin
 		DeleteGear(Gear);
-		AfterAttack;
-	end
+		AfterAttack
+		end
 end;
 
 procedure doStepBallgun(Gear: PGear);
--- a/hedgewars/uConsts.pas	Sun Jan 11 11:03:09 2009 +0000
+++ b/hedgewars/uConsts.pas	Mon Jan 12 14:43:56 2009 +0000
@@ -1113,7 +1113,8 @@
 			NameTex: nil;
 			Probability: 400;
 			NumberInCase: 1;
-			Ammo: (Propz:  ammoprop_ForwMsgs;
+			Ammo: (Propz:  ammoprop_ForwMsgs or
+							 ammoprop_DontHold;
 					Count: AMMO_INFINITE;
 					NumPerTurn: 0;
 					Timer: 5001;