hedgewars/uGame.pas
branchwebgl
changeset 8330 aaefa587e277
parent 8204 9a6030d96273
child 8446 c18ba8726f5a
equal deleted inserted replaced
8116:d24257910f8d 8330:aaefa587e277
    24 procedure DoGameTick(Lag: LongInt);
    24 procedure DoGameTick(Lag: LongInt);
    25 
    25 
    26 ////////////////////
    26 ////////////////////
    27     implementation
    27     implementation
    28 ////////////////////
    28 ////////////////////
    29 uses uInputHandler, uTeams, uIO, uAI, uGears, uSound, uMobile, 
    29 uses uInputHandler, uTeams, uIO, uAI, uGears, uSound,
    30     uVisualGears, uTypes, uVariables, uCommands, uConsts
    30     uVisualGears, uTypes, uVariables, uCommands, uConsts
    31     {$IFDEF USE_TOUCH_INTERFACE}, uTouch{$ENDIF};
    31     {$IFDEF USE_TOUCH_INTERFACE}, uTouch{$ENDIF};
    32 
    32 
    33 procedure DoGameTick(Lag: LongInt);
    33 procedure DoGameTick(Lag: LongInt);
    34 var i: LongInt;
    34 var i: LongInt;
    46     if Lag > 100 then
    46     if Lag > 100 then
    47         Lag:= 100
    47         Lag:= 100
    48     else if (GameType = gmtSave) or (fastUntilLag and (GameType = gmtNet)) then
    48     else if (GameType = gmtSave) or (fastUntilLag and (GameType = gmtNet)) then
    49         Lag:= 2500;
    49         Lag:= 2500;
    50 
    50 
    51     if (GameType = gmtDemo) then 
    51     if (GameType = gmtDemo) then
    52         if isSpeed then
    52         if isSpeed then
    53             begin
    53             begin
    54             i:= RealTicks-SpeedStart;
    54             i:= RealTicks-SpeedStart;
    55             if i < 2000 then Lag:= Lag*5
    55             if i < 2000 then Lag:= Lag*5
    56             else if i < 4000 then Lag:= Lag*10
    56             else if i < 4000 then Lag:= Lag*10
    94                         PlayMusic;
    94                         PlayMusic;
    95                         GameType:= gmtLocal;
    95                         GameType:= gmtLocal;
    96                         AddVisualGear(0, 0, vgtTeamHealthSorter);
    96                         AddVisualGear(0, 0, vgtTeamHealthSorter);
    97                         AddVisualGear(0, 0, vgtSmoothWindBar);
    97                         AddVisualGear(0, 0, vgtSmoothWindBar);
    98                         {$IFDEF IPHONEOS}InitIPC;{$ENDIF}
    98                         {$IFDEF IPHONEOS}InitIPC;{$ENDIF}
    99                         uMobile.SaveLoadingEnded();
    99                         with mobileRecord do
       
   100                             if SaveLoadingEnded <> nil then
       
   101                                 SaveLoadingEnded();
   100                         end;
   102                         end;
   101                 end
   103                 end
   102         else ProcessGears
   104         else ProcessGears
   103         end;
   105         end;
   104     inc(i)
   106     inc(i)