hedgewars/uScript.pas
changeset 7278 000e4543f204
parent 7270 93e92e82d5c8
child 7291 ad4b6c2b09e8
child 7307 f830a65d6a6d
--- a/hedgewars/uScript.pas	Tue Jun 12 17:20:27 2012 +0400
+++ b/hedgewars/uScript.pas	Sun Jun 24 20:31:26 2012 +0400
@@ -973,10 +973,9 @@
             prevgear^.Z := cHHZ;
             RemoveGearFromList(prevgear);
             InsertGearToList(prevgear);
-
-            CurrentHedgehog := gear^.Hedgehog;
-// yes, this will muck up turn sequence
-            CurrentTeam := gear^.Hedgehog^.Team;
+            
+            SwitchCurrentHedgehog(gear^.Hedgehog);
+            CurrentTeam:= CurrentHedgehog^.Team;
 
             gear^.State:= gear^.State or gstHHDriven;
             gear^.Active := true;