hedgewars/uCommandHandlers.pas
branchtransitional_engine
changeset 16004 2146cb7be36f
parent 15929 128ace913837
parent 15984 6a985a680c44
equal deleted inserted replaced
15958:772a43d88e6b 16004:2146cb7be36f
    25 procedure initModule;
    25 procedure initModule;
    26 procedure freeModule;
    26 procedure freeModule;
    27 
    27 
    28 implementation
    28 implementation
    29 uses uCommands, uTypes, uVariables, uIO, uDebug, uConsts, uScript, uUtils, SDLh, uWorld, uRandom, uCaptions
    29 uses uCommands, uTypes, uVariables, uIO, uDebug, uConsts, uScript, uUtils, SDLh, uWorld, uRandom, uCaptions
    30     , uVisualGearsList, uGearsHedgehog
    30     , uVisualGearsList, uGearsHedgehog, uChat
    31      {$IFDEF USE_VIDEO_RECORDING}, uVideoRec {$ENDIF};
    31      {$IFDEF USE_VIDEO_RECORDING}, uVideoRec {$ENDIF};
    32 
    32 
    33 var cTagsMasks : array[0..15] of byte = (7, 0, 0, 0, 0, 4, 5, 6, 15, 8, 8, 8, 8, 12, 13, 14);
    33 var cTagsMasks : array[0..15] of byte = (7, 0, 0, 0, 0, 4, 5, 6, 15, 8, 8, 8, 8, 12, 13, 14);
    34     cTagsMasksNoHealth: array[0..15] of byte = (3, 0, 1, 2, 0, 0, 0, 0, 11, 8, 9, 10, 8, 8, 8, 8);
    34     cTagsMasksNoHealth: array[0..15] of byte = (3, 0, 1, 2, 0, 0, 0, 0, 11, 8, 9, 10, 8, 8, 8, 8);
    35 
    35 
    47 
    47 
    48 procedure chQuit(var s: shortstring);
    48 procedure chQuit(var s: shortstring);
    49 begin
    49 begin
    50     s:= s; // avoid compiler hint
    50     s:= s; // avoid compiler hint
    51     if (GameState = gsGame) then
    51     if (GameState = gsGame) then
    52     begin
    52         begin
    53         isInChatMode:= false;
    53         CloseChat;
    54         GameState:= gsConfirm;
    54         GameState:= gsConfirm;
    55     end
    55         end
    56     else begin
    56     else
    57         if GameState = gsConfirm then
    57         if GameState = gsConfirm then
       
    58             begin
    58             GameState:= gsGame;
    59             GameState:= gsGame;
    59     end;
    60             RestoreChat;
    60 
    61             end;
    61     updateCursorVisibility;
    62     updateCursorVisibility;
    62 end;
    63 end;
    63 
    64 
    64 procedure chForceQuit(var s: shortstring);
    65 procedure chForceQuit(var s: shortstring);
    65 begin
    66 begin