hedgewars/uGearsHandlersRope.pas
changeset 12700 16fcd59295e3
parent 12695 28210d2a9a36
child 12819 3fc7569c1203
equal deleted inserted replaced
12699:608db0fb90f0 12700:16fcd59295e3
    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 (HHGear^.Hedgehog^.CurAmmoType <> amRope) 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) then
    70             SetWeapon(amRope);
    70             SetWeapon(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 (HHGear^.Hedgehog^.CurAmmoType <> amRope) then
   454         if (GetAmmoEntry(HHGear^.Hedgehog^, amRope)^.Count >= 1) and ((Ammoz[HHGear^.Hedgehog^.CurAmmoType].Ammo.Propz and ammoprop_AltUse) <> 0) then
   455             SetWeapon(amRope);
   455             SetWeapon(amRope);
   456         exit()
   456         exit()
   457         end;
   457         end;
   458 
   458 
   459     DeleteCI(HHGear);
   459     DeleteCI(HHGear);
   543                 begin
   543                 begin
   544                 State := State and (not gstAttacking);
   544                 State := State and (not gstAttacking);
   545                 Message := Message and (not gmAttack)
   545                 Message := Message and (not gmAttack)
   546                 end;
   546                 end;
   547         DeleteGear(Gear);
   547         DeleteGear(Gear);
   548         if GetAmmoEntry(HHGear^.Hedgehog^, TAmmoType(amRope))^.Count >= 1 then
   548         if (GetAmmoEntry(HHGear^.Hedgehog^, amRope)^.Count >= 1) and ((Ammoz[HHGear^.Hedgehog^.CurAmmoType].Ammo.Propz and ammoprop_AltUse) <> 0) then
   549             SetWeapon(amRope);
   549             SetWeapon(amRope);
   550         exit;
   550         exit;
   551         end;
   551         end;
   552     if CheckGearDrowning(HHGear) then DeleteGear(Gear)
   552     if CheckGearDrowning(HHGear) then DeleteGear(Gear)
   553 end;
   553 end;