hedgewars/uGame.pas
changeset 3902 3aac7ca07b0e
parent 3663 8c28abf427f5
child 3904 22e4d74240e5
equal deleted inserted replaced
3900:5fe24180fc72 3902:3aac7ca07b0e
    24 procedure DoGameTick(Lag: LongInt);
    24 procedure DoGameTick(Lag: LongInt);
    25 
    25 
    26 ////////////////////
    26 ////////////////////
    27    implementation
    27    implementation
    28 ////////////////////
    28 ////////////////////
    29 uses uMisc, uConsts, uKeys, uTeams, uIO, uAI, uGears, uScript;
    29 uses uMisc, uConsts, uKeys, uTeams, uIO, uAI, uGears, uScript, uSound;
    30 
    30 
    31 procedure DoGameTick(Lag: LongInt);
    31 procedure DoGameTick(Lag: LongInt);
    32 var i: LongInt;
    32 var i: LongInt;
    33 begin
    33 begin
    34 if isPaused then exit;
    34 if isPaused then exit;
    63                gmtSave: begin
    63                gmtSave: begin
    64                         RestoreTeamsFromSave;
    64                         RestoreTeamsFromSave;
    65                         SetBinds(CurrentTeam^.Binds);
    65                         SetBinds(CurrentTeam^.Binds);
    66                         //CurrentHedgehog^.Gear^.Message:= 0; <- produces bugs with further save restoring and demos
    66                         //CurrentHedgehog^.Gear^.Message:= 0; <- produces bugs with further save restoring and demos
    67                         isSoundEnabled:= isSEBackup;
    67                         isSoundEnabled:= isSEBackup;
    68                         GameType:= gmtLocal
    68                         if isSoundEnabled then playMusic;
       
    69                         GameType:= gmtLocal;
       
    70                         InitIPC;
    69                         end;
    71                         end;
    70                end
    72                end
    71           else ProcessGears
    73           else ProcessGears
    72        end;
    74        end;
    73     inc(i)
    75     inc(i)