Stop messages without possible desync on load from save
authorunc0rr
Wed, 05 Sep 2012 02:11:51 +0400
changeset 7670 9485b88f6a44
parent 7669 a85e1c167b69
child 7671 43f38923bc6e
Stop messages without possible desync on load from save
hedgewars/uGame.pas
--- a/hedgewars/uGame.pas	Tue Sep 04 13:18:26 2012 +0200
+++ b/hedgewars/uGame.pas	Wed Sep 05 02:11:51 2012 +0400
@@ -26,7 +26,9 @@
 ////////////////////
     implementation
 ////////////////////
-uses uInputHandler, uTeams, uIO, uAI, uGears, uSound, uMobile, uVisualGears, uTypes, uVariables{$IFDEF SDL13}, uTouch{$ENDIF};
+uses uInputHandler, uTeams, uIO, uAI, uGears, uSound, uMobile, 
+    uVisualGears, uTypes, uVariables, uCommands, uConsts
+    {$IFDEF SDL13}, uTouch{$ENDIF};
 
 procedure DoGameTick(Lag: LongInt);
 var i: LongInt;
@@ -88,7 +90,7 @@
                 gmtSave: begin
                         RestoreTeamsFromSave;
                         SetBinds(CurrentTeam^.Binds);
-                        //CurrentHedgehog^.Gear^.Message:= 0; <- produces bugs with further save restoring and demos
+                        StopMessages(gmLeft or gmRight or gmUp or gmDown);
                         ResetSound;   // restore previous sound state
                         PlayMusic;
                         GameType:= gmtLocal;