hedgewars/uGearsHandlersRope.pas
changeset 13961 2568fa516733
parent 13468 f1d349a52bc7
child 13978 818969052920
equal deleted inserted replaced
13960:a857cd1cc3f0 13961:2568fa516733
    64     if ((HHGear^.State and gstHHDriven) = 0)
    64     if ((HHGear^.State and gstHHDriven) = 0)
    65     or (CheckGearDrowning(HHGear))
    65     or (CheckGearDrowning(HHGear))
    66     or (TestCollisionYwithGear(HHGear, 1) <> 0) then
    66     or (TestCollisionYwithGear(HHGear, 1) <> 0) then
    67         begin
    67         begin
    68         DeleteGear(Gear);
    68         DeleteGear(Gear);
    69         if (TestCollisionYwithGear(HHGear, 1) <> 0) and (GetAmmoEntry(HHGear^.Hedgehog^, amRope)^.Count >= 1) and ((Ammoz[HHGear^.Hedgehog^.CurAmmoType].Ammo.Propz and ammoprop_AltUse) <> 0) then
    69         if (TestCollisionYwithGear(HHGear, 1) <> 0) and (GetAmmoEntry(HHGear^.Hedgehog^, amRope)^.Count >= 1) and ((Ammoz[HHGear^.Hedgehog^.CurAmmoType].Ammo.Propz and ammoprop_AltUse) <> 0) and (HHGear^.Hedgehog^.MultiShootAttacks = 0) then
    70             HHGear^.Hedgehog^.CurAmmoType:= amRope;
    70             HHGear^.Hedgehog^.CurAmmoType:= amRope;
    71         isCursorVisible := false;
    71         isCursorVisible := false;
    72         ApplyAmmoChanges(HHGear^.Hedgehog^);
    72         ApplyAmmoChanges(HHGear^.Hedgehog^);
    73         exit
    73         exit
    74         end;
    74         end;
   449        ((WorldEdge = weBounce) and ((hwRound(Gear^.X) <= LeftX) or (hwRound(Gear^.X) >= RightX))) then
   449        ((WorldEdge = weBounce) and ((hwRound(Gear^.X) <= LeftX) or (hwRound(Gear^.X) >= RightX))) then
   450         begin
   450         begin
   451         HHGear^.State := HHGear^.State and (not (gstAttacking or gstHHJumping or gstHHHJump));
   451         HHGear^.State := HHGear^.State and (not (gstAttacking or gstHHJumping or gstHHHJump));
   452         HHGear^.Message := HHGear^.Message and (not gmAttack);
   452         HHGear^.Message := HHGear^.Message and (not gmAttack);
   453         DeleteGear(Gear);
   453         DeleteGear(Gear);
   454         if (GetAmmoEntry(HHGear^.Hedgehog^, amRope)^.Count >= 1) and ((Ammoz[HHGear^.Hedgehog^.CurAmmoType].Ammo.Propz and ammoprop_AltUse) <> 0) then
   454         if (GetAmmoEntry(HHGear^.Hedgehog^, amRope)^.Count >= 1) and ((Ammoz[HHGear^.Hedgehog^.CurAmmoType].Ammo.Propz and ammoprop_AltUse) <> 0) and (HHGear^.Hedgehog^.MultiShootAttacks = 0) then
   455             HHGear^.Hedgehog^.CurAmmoType:= amRope;
   455             HHGear^.Hedgehog^.CurAmmoType:= amRope;
   456         isCursorVisible := false;
   456         isCursorVisible := false;
   457         ApplyAmmoChanges(HHGear^.Hedgehog^);
   457         ApplyAmmoChanges(HHGear^.Hedgehog^);
   458         exit()
   458         exit()
   459         end;
   459         end;
   527                 begin
   527                 begin
   528                 State := State and (not gstAttacking);
   528                 State := State and (not gstAttacking);
   529                 Message := Message and (not gmAttack)
   529                 Message := Message and (not gmAttack)
   530                 end;
   530                 end;
   531         DeleteGear(Gear);
   531         DeleteGear(Gear);
   532         if (GetAmmoEntry(HHGear^.Hedgehog^, amRope)^.Count >= 1) and ((Ammoz[HHGear^.Hedgehog^.CurAmmoType].Ammo.Propz and ammoprop_AltUse) <> 0) then
   532         if (GetAmmoEntry(HHGear^.Hedgehog^, amRope)^.Count >= 1) and ((Ammoz[HHGear^.Hedgehog^.CurAmmoType].Ammo.Propz and ammoprop_AltUse) <> 0) and (HHGear^.Hedgehog^.MultiShootAttacks = 0) then
   533             HHGear^.Hedgehog^.CurAmmoType:= amRope;
   533             HHGear^.Hedgehog^.CurAmmoType:= amRope;
   534         isCursorVisible := false;
   534         isCursorVisible := false;
   535         ApplyAmmoChanges(HHGear^.Hedgehog^);
   535         ApplyAmmoChanges(HHGear^.Hedgehog^);
   536         exit;
   536         exit;
   537         end;
   537         end;