call onusedammo earlier for switcher
authornemo
Wed, 29 Jun 2011 00:05:26 -0400
changeset 5358 e2201f71beac
parent 5355 9e0c51a882aa
child 5360 d47b8833284c
call onusedammo earlier for switcher
hedgewars/GSHandlers.inc
--- a/hedgewars/GSHandlers.inc	Tue Jun 28 23:32:42 2011 -0400
+++ b/hedgewars/GSHandlers.inc	Wed Jun 29 00:05:26 2011 -0400
@@ -2565,7 +2565,6 @@
         HHGear := Gear^.Hedgehog^.Gear;
         Msg := Gear^.Message and not gmSwitch;
         DeleteGear(Gear);
-        OnUsedAmmo(HHGear^.Hedgehog^);
         ApplyAmmoChanges(HHGear^.Hedgehog^);
 
         HHGear := CurrentHedgehog^.Gear;
@@ -2614,6 +2613,7 @@
     Gear^.doStep := @doStepSwitcherWork;
 
     HHGear := Gear^.Hedgehog^.Gear;
+    OnUsedAmmo(HHGear^.Hedgehog^);
     with HHGear^ do
     begin
         State := State and not gstAttacking;