hedgewars/uGame.pas
changeset 11532 bf86c6cb9341
parent 11046 47a8c19ecb60
child 11539 c22d292e7266
equal deleted inserted replaced
11531:d1cf1ff6cabb 11532:bf86c6cb9341
    26 ////////////////////
    26 ////////////////////
    27     implementation
    27     implementation
    28 ////////////////////
    28 ////////////////////
    29 uses uInputHandler, uTeams, uIO, uAI, uGears, uSound, uLocale, uCaptions,
    29 uses uInputHandler, uTeams, uIO, uAI, uGears, uSound, uLocale, uCaptions,
    30      uTypes, uVariables, uCommands, uConsts, uVisualGearsList, uUtils
    30      uTypes, uVariables, uCommands, uConsts, uVisualGearsList, uUtils
    31      {$IFDEF USE_TOUCH_INTERFACE}, uTouch{$ENDIF};
    31      {$IFDEF USE_TOUCH_INTERFACE}, uTouch{$ENDIF}, uDebug;
    32 
    32 
    33 procedure DoGameTick(Lag: LongInt);
    33 procedure DoGameTick(Lag: LongInt);
    34 var i,j : LongInt;
    34 var i,j : LongInt;
    35     s: ansistring;
    35     s: ansistring;
    36 begin
    36 begin
    38     exit;
    38     exit;
    39 
    39 
    40 if (not CurrentTeam^.ExtDriven) then
    40 if (not CurrentTeam^.ExtDriven) then
    41     begin
    41     begin
    42     NetGetNextCmd; // its for the case of receiving "/say" message
    42     NetGetNextCmd; // its for the case of receiving "/say" message
       
    43     if not allOK then exit;
    43     isInLag:= false;
    44     isInLag:= false;
    44     FlushMessages(Lag)
    45     FlushMessages(Lag)
    45     end;
    46     end;
    46 
    47 
    47 if GameType <> gmtRecord then
    48 if GameType <> gmtRecord then
    97         {$IFDEF USE_TOUCH_INTERFACE}ProcessTouch;{$ENDIF}
    98         {$IFDEF USE_TOUCH_INTERFACE}ProcessTouch;{$ENDIF}
    98         end
    99         end
    99     else
   100     else
   100         begin
   101         begin
   101         NetGetNextCmd;
   102         NetGetNextCmd;
       
   103         if not allOK then exit;
       
   104 
   102         if isInLag then
   105         if isInLag then
   103             case GameType of
   106             case GameType of
   104                 gmtNet: begin
   107                 gmtNet: begin
   105                         // update health bars and the wind indicator
   108                         // update health bars and the wind indicator
   106                         AddVisualGear(0, 0, vgtTeamHealthSorter);
   109                         AddVisualGear(0, 0, vgtTeamHealthSorter);