hedgewars/uGearsUtils.pas
changeset 15151 6b7d92fa4912
parent 15057 1a754860b0e5
child 15152 5dc3e3f1c0f9
equal deleted inserted replaced
15150:d47122a0e4b4 15151:6b7d92fa4912
  1859 
  1859 
  1860 function IsHogFacingLeft(Gear: PGear): boolean;
  1860 function IsHogFacingLeft(Gear: PGear): boolean;
  1861 var sign: LongInt;
  1861 var sign: LongInt;
  1862 begin
  1862 begin
  1863     sign:= hwSign(Gear^.dX);
  1863     sign:= hwSign(Gear^.dX);
  1864     if ((Gear^.State and gstHHHJump) <> 0) and (Gear^.Hedgehog^.Effects[heArtillery] = 0) then
  1864     if (CurAmmoGear <> nil) and (CurAmmoGear^.Kind = gtParachute) then
       
  1865         IsHogFacingLeft:= CurAmmoGear^.Tag = -1
       
  1866     else if ((Gear^.State and gstHHHJump) <> 0) and (Gear^.Hedgehog^.Effects[heArtillery] = 0) then
  1865         IsHogFacingLeft:= sign > 0
  1867         IsHogFacingLeft:= sign > 0
  1866     else
  1868     else
  1867         IsHogFacingLeft:= sign < 0;
  1869         IsHogFacingLeft:= sign < 0;
  1868 end;
  1870 end;
  1869 
  1871