hedgewars/uUtils.pas
changeset 4398 36d7e4b6ca81
parent 4385 f679ffa2dc8c
child 4403 0dfe26f48ec1
--- a/hedgewars/uUtils.pas	Sun Nov 21 09:37:48 2010 -0500
+++ b/hedgewars/uUtils.pas	Sun Nov 21 17:48:58 2010 +0300
@@ -38,6 +38,8 @@
 procedure AddFileLog(s: shortstring);
 {$ENDIF}
 
+function CheckNoTeamOrHH: boolean; inline;
+
 procedure initModule;
 procedure freeModule;
 
@@ -284,6 +286,11 @@
         GetLaunchY:= 0
 end;
 
+function CheckNoTeamOrHH: boolean;
+var bRes: boolean;
+begin
+CheckNoTeamOrHH:= (CurrentTeam = nil) or (CurrentHedgehog^.Gear = nil);
+end;
 
 procedure initModule;
 {$IFDEF DEBUGFILE}{$IFNDEF IPHONEOS}var i: LongInt;{$ENDIF}{$ENDIF}