# HG changeset patch # User nemo # Date 1286823313 14400 # Node ID 09eea558ba83935dda6d42616049799773fdcde0 # Parent 6aadae28b3dfff93fffedf1c8151719b035163d3 Call OnUsedAmmo *after* doing the normal CurAmmoType stuff so CurAmmoType actually points to the right bloody weapon diff -r 6aadae28b3df -r 09eea558ba83 hedgewars/GSHandlers.inc --- a/hedgewars/GSHandlers.inc Mon Oct 11 20:47:17 2010 +0200 +++ b/hedgewars/GSHandlers.inc Mon Oct 11 14:55:13 2010 -0400 @@ -3092,8 +3092,7 @@ HHGear := PHedgehog(Gear^.Hedgehog)^.Gear; FollowGear := HHGear; - OnUsedAmmo(PHedgehog(Gear^.Hedgehog)^); - ApplyAmmoChanges(PHedgehog(Gear^.Hedgehog)^); + AfterAttack; with HHGear^ do begin State := State and not gstAttacking; diff -r 6aadae28b3df -r 09eea558ba83 hedgewars/HHHandlers.inc --- a/hedgewars/HHHandlers.inc Mon Oct 11 20:47:17 2010 +0200 +++ b/hedgewars/HHHandlers.inc Mon Oct 11 14:55:13 2010 -0400 @@ -327,14 +327,14 @@ end else begin - OnUsedAmmo(CurrentHedgehog^); if ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NoRoundEndHint) = 0) and ((GameFlags and gfInfAttack) = 0) then begin TurnTimeLeft:= Ammoz[CurAmmoType].TimeAfterTurn; State:= State or gstAttacked end; if (Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NoRoundEndHint) <> 0 then ApplyAmmoChanges(CurrentHedgehog^); - if (GameFlags and gfInfAttack) <> 0 then State:= State or gstAttacked + if (GameFlags and gfInfAttack) <> 0 then State:= State or gstAttacked; + OnUsedAmmo(CurrentHedgehog^) end; end else