hedgewars/uUtils.pas
changeset 12317 b81a1d1497c4
parent 12197 98824a464230
child 12621 d972b31f8881
equal deleted inserted replaced
12316:d09eba2e1dd8 12317:b81a1d1497c4
   534 end;
   534 end;
   535 
   535 
   536 
   536 
   537 function GetLaunchX(at: TAmmoType; dir: LongInt; angle: LongInt): LongInt;
   537 function GetLaunchX(at: TAmmoType; dir: LongInt; angle: LongInt): LongInt;
   538 begin
   538 begin
       
   539 GetLaunchX:= 0
       
   540 (*
   539     if (Ammoz[at].ejectX <> 0) or (Ammoz[at].ejectY <> 0) then
   541     if (Ammoz[at].ejectX <> 0) or (Ammoz[at].ejectY <> 0) then
   540         GetLaunchX:= sign(dir) * (8 + hwRound(AngleSin(angle) * Ammoz[at].ejectX) + hwRound(AngleCos(angle) * Ammoz[at].ejectY))
   542         GetLaunchX:= sign(dir) * (8 + hwRound(AngleSin(angle) * Ammoz[at].ejectX) + hwRound(AngleCos(angle) * Ammoz[at].ejectY))
   541     else
   543     else
   542         GetLaunchX:= 0
   544         GetLaunchX:= 0 *)
   543 end;
   545 end;
   544 
   546 
   545 function GetLaunchY(at: TAmmoType; angle: LongInt): LongInt;
   547 function GetLaunchY(at: TAmmoType; angle: LongInt): LongInt;
   546 begin
   548 begin
       
   549 GetLaunchY:= 0
       
   550 (*
   547     if (Ammoz[at].ejectX <> 0) or (Ammoz[at].ejectY <> 0) then
   551     if (Ammoz[at].ejectX <> 0) or (Ammoz[at].ejectY <> 0) then
   548         GetLaunchY:= hwRound(AngleSin(angle) * Ammoz[at].ejectY) - hwRound(AngleCos(angle) * Ammoz[at].ejectX) - 2
   552         GetLaunchY:= hwRound(AngleSin(angle) * Ammoz[at].ejectY) - hwRound(AngleCos(angle) * Ammoz[at].ejectX) - 2
   549     else
   553     else
   550         GetLaunchY:= 0
   554         GetLaunchY:= 0*)
   551 end;
   555 end;
   552 
   556 
   553 function CheckNoTeamOrHH: boolean;
   557 function CheckNoTeamOrHH: boolean;
   554 begin
   558 begin
   555 CheckNoTeamOrHH:= (CurrentTeam = nil) or (CurrentHedgehog^.Gear = nil);
   559 CheckNoTeamOrHH:= (CurrentTeam = nil) or (CurrentHedgehog^.Gear = nil);