hedgewars/uGears.pas
branch0.9.14.1
changeset 4314 8c7f9de9a978
parent 4253 160f987a5d9f
child 4332 c55cb3bcab1e
equal deleted inserted replaced
4311:636122c968ce 4314:8c7f9de9a978
   133 procedure HHSetWeapon(Gear: PGear); forward;
   133 procedure HHSetWeapon(Gear: PGear); forward;
   134 procedure doStepCase(Gear: PGear); forward;
   134 procedure doStepCase(Gear: PGear); forward;
   135 
   135 
   136 function GetLaunchX(at: TAmmoType; dir: LongInt; angle: LongInt): LongInt;
   136 function GetLaunchX(at: TAmmoType; dir: LongInt; angle: LongInt): LongInt;
   137 begin
   137 begin
       
   138     GetLaunchX:= 0
       
   139 (*
   138     if (Ammoz[at].ejectX <> 0) or (Ammoz[at].ejectY <> 0) then
   140     if (Ammoz[at].ejectX <> 0) or (Ammoz[at].ejectY <> 0) then
   139         GetLaunchX:= sign(dir) * (8 + hwRound(AngleSin(angle) * Ammoz[at].ejectX) + hwRound(AngleCos(angle) * Ammoz[at].ejectY))
   141         GetLaunchX:= sign(dir) * (8 + hwRound(AngleSin(angle) * Ammoz[at].ejectX) + hwRound(AngleCos(angle) * Ammoz[at].ejectY))
   140     else
   142     else
   141         GetLaunchX:= 0
   143         GetLaunchX:= 0
       
   144 *)
   142 end;
   145 end;
   143 
   146 
   144 function GetLaunchY(at: TAmmoType; angle: LongInt): LongInt;
   147 function GetLaunchY(at: TAmmoType; angle: LongInt): LongInt;
   145 begin
   148 begin
       
   149     GetLaunchY:= 0
       
   150 (*
   146     if (Ammoz[at].ejectX <> 0) or (Ammoz[at].ejectY <> 0) then
   151     if (Ammoz[at].ejectX <> 0) or (Ammoz[at].ejectY <> 0) then
   147         GetLaunchY:= hwRound(AngleSin(angle) * Ammoz[at].ejectY) - hwRound(AngleCos(angle) * Ammoz[at].ejectX) - 2
   152         GetLaunchY:= hwRound(AngleSin(angle) * Ammoz[at].ejectY) - hwRound(AngleCos(angle) * Ammoz[at].ejectX) - 2
   148     else
   153     else
   149         GetLaunchY:= 0
   154         GetLaunchY:= 0
       
   155 *)
   150 end;
   156 end;
   151 
   157 
   152 {$INCLUDE "GSHandlers.inc"}
   158 {$INCLUDE "GSHandlers.inc"}
   153 {$INCLUDE "HHHandlers.inc"}
   159 {$INCLUDE "HHHandlers.inc"}
   154 
   160