hedgewars/uScript.pas
changeset 7401 4c3ec3dca0c7
parent 7339 5984b749ad9b
child 7411 efc75c2d3be9
child 7426 55b49cc1f33a
--- a/hedgewars/uScript.pas	Thu Jul 19 17:34:18 2012 -0400
+++ b/hedgewars/uScript.pas	Thu Jul 19 20:34:21 2012 -0400
@@ -983,8 +983,7 @@
             prevgear^.Active := false;
             prevgear^.State:= prevgear^.State and not gstHHDriven;
             prevgear^.Z := cHHZ;
-            RemoveGearFromList(prevgear);
-            InsertGearToList(prevgear);
+            prevgear^.Message:= prevgear^.Message or gmRemoveFromList or gmAddToList;
             
             SwitchCurrentHedgehog(gear^.Hedgehog);
             CurrentTeam:= CurrentHedgehog^.Team;
@@ -992,8 +991,7 @@
             gear^.State:= gear^.State or gstHHDriven;
             gear^.Active := true;
             gear^.Z := cCurrHHZ;
-            RemoveGearFromList(gear);
-            InsertGearToList(gear);
+            gear^.Message:= gear^.Message or gmRemoveFromList or gmAddToList;
             end
         end;
     lc_switchhog:= 0