hedgewars/CCHandlers.inc
changeset 324 f4c109c82a0c
parent 312 c36d0b34ac3d
child 351 29bc9c36ad5f
equal deleted inserted replaced
323:ea947f2c3d2f 324:f4c109c82a0c
    16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
    16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
    17  *)
    17  *)
    18 
    18 
    19 function CheckNoTeamOrHH: boolean;
    19 function CheckNoTeamOrHH: boolean;
    20 begin
    20 begin
    21 Result:= (CurrentTeam=nil) or (CurrentTeam.Hedgehogs[CurrentTeam.CurrHedgehog].Gear = nil);
    21 Result:= (CurrentTeam = nil) or (CurrentTeam.Hedgehogs[CurrentTeam.CurrHedgehog].Gear = nil);
    22 {$IFDEF DEBUGFILE}
    22 {$IFDEF DEBUGFILE}
    23 if Result then
    23 if Result then
    24    if CurrentTeam = nil then AddFileLog('CONSOLE: CurTeam = nil')
    24    if CurrentTeam = nil then AddFileLog('CONSOLE: CurTeam = nil')
    25                         else AddFileLog('CONSOLE: CurTeam <> nil, Gear = nil')
    25                         else AddFileLog('CONSOLE: CurTeam <> nil, Gear = nil')
    26 {$ENDIF}
    26 {$ENDIF}
    27 end;
    27 end;
    28 ////////////////////////////////////////////////////////////////////////////////
    28 ////////////////////////////////////////////////////////////////////////////////
    29 procedure chQuit(var s: shortstring);
    29 procedure chQuit(var s: shortstring);
    30 begin
    30 begin
       
    31 SendIPC('Q');
    31 GameState:= gsExit
    32 GameState:= gsExit
    32 end;
    33 end;
    33 
    34 
    34 procedure chCheckProto(var s: shortstring);
    35 procedure chCheckProto(var s: shortstring);
    35 var i, c: integer;
    36 var i, c: integer;