hedgewars/hwengine.pas
branchios-develop
changeset 13418 ba39a1d396c0
parent 13082 c213645ff848
child 13492 d23731fe84d4
--- a/hedgewars/hwengine.pas	Sun Jun 10 18:56:51 2018 +0200
+++ b/hedgewars/hwengine.pas	Sun Jun 10 19:12:26 2018 +0200
@@ -105,7 +105,7 @@
             RecountAllTeamsHealth;
             GameState:= gsGame;
             end;
-        gsConfirm, gsGame, gsChat:
+        gsConfirm, gsGame:
             begin
             // disable screenshot flash effect when about to make another screenshot
             if flagMakeCapture and (ScreenFade = sfFromWhite) then
@@ -180,7 +180,7 @@
         begin
             case event.type_ of
                 SDL_KEYDOWN:
-                    if GameState = gsChat then
+                    if isInChatMode then
                         begin
                     // sdl on iphone supports only ashii keyboards and the unicode field is deprecated in sdl 1.3
                         KeyPressChat(event.key.keysym);
@@ -188,10 +188,10 @@
                     else
                         if GameState >= gsGame then ProcessKey(event.key);
                 SDL_KEYUP:
-                    if (GameState <> gsChat) and (GameState >= gsGame) then
+                    if (not isInChatMode) and (GameState >= gsGame) then
                         ProcessKey(event.key);
 
-                SDL_TEXTINPUT: if GameState = gsChat then uChat.TextInput(event.text);
+                SDL_TEXTINPUT: if isInChatMode then uChat.TextInput(event.text);
 
                 SDL_WINDOWEVENT:
                     begin
@@ -332,6 +332,7 @@
     while LoadNextCameraPosition(newRealTicks, newGameTicks) do
     begin
         IPCCheckSock();
+        RealTicks:= newRealTicks;
         DoGameTick(newGameTicks - oldGameTicks);
         if GameState = gsExit then
             break;