hedgewars/uScript.pas
changeset 7270 93e92e82d5c8
parent 7156 09262f82e99d
child 7291 ad4b6c2b09e8
child 7307 f830a65d6a6d
--- a/hedgewars/uScript.pas	Sat Jun 23 22:44:11 2012 +0400
+++ b/hedgewars/uScript.pas	Sat Jun 23 21:37:47 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;