hedgewars/uUtils.pas
changeset 4403 0dfe26f48ec1
parent 4398 36d7e4b6ca81
child 4437 05192cdbce9b
equal deleted inserted replaced
4402:54a78ec6aac4 4403:0dfe26f48ec1
    38 procedure AddFileLog(s: shortstring);
    38 procedure AddFileLog(s: shortstring);
    39 {$ENDIF}
    39 {$ENDIF}
    40 
    40 
    41 function CheckNoTeamOrHH: boolean; inline;
    41 function CheckNoTeamOrHH: boolean; inline;
    42 
    42 
       
    43 function  GetLaunchX(at: TAmmoType; dir: LongInt; angle: LongInt): LongInt;
       
    44 function  GetLaunchY(at: TAmmoType; angle: LongInt): LongInt;
       
    45 
    43 procedure initModule;
    46 procedure initModule;
    44 procedure freeModule;
    47 procedure freeModule;
    45 
    48 
    46 function  GetLaunchX(at: TAmmoType; dir: LongInt; angle: LongInt): LongInt;
       
    47 function  GetLaunchY(at: TAmmoType; angle: LongInt): LongInt;
       
    48 
    49 
    49 implementation
    50 implementation
    50 uses typinfo, Math, uConsts, uVariables, SysUtils;
    51 uses typinfo, Math, uConsts, uVariables, SysUtils;
    51 
    52 
    52 var
    53 var
   285     else
   286     else
   286         GetLaunchY:= 0
   287         GetLaunchY:= 0
   287 end;
   288 end;
   288 
   289 
   289 function CheckNoTeamOrHH: boolean;
   290 function CheckNoTeamOrHH: boolean;
   290 var bRes: boolean;
       
   291 begin
   291 begin
   292 CheckNoTeamOrHH:= (CurrentTeam = nil) or (CurrentHedgehog^.Gear = nil);
   292 CheckNoTeamOrHH:= (CurrentTeam = nil) or (CurrentHedgehog^.Gear = nil);
   293 end;
   293 end;
   294 
   294 
   295 procedure initModule;
   295 procedure initModule;