equal
deleted
inserted
replaced
52 begin |
52 begin |
53 Gear^.Message:= Gear^.Message and not gmSlot; |
53 Gear^.Message:= Gear^.Message and not gmSlot; |
54 ammoidx:= 0; |
54 ammoidx:= 0; |
55 if ((Gear^.State and (gstAttacking or gstAttacked)) <> 0) or |
55 if ((Gear^.State and (gstAttacking or gstAttacked)) <> 0) or |
56 (TargetPoint.X <> NoPointX) or |
56 (TargetPoint.X <> NoPointX) or |
57 ((MultiShootAttacks > 0) and ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NoRoundEndHint) = 0)) or |
57 ((MultiShootAttacks > 0) and ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NoRoundEnd) = 0)) or |
58 ((Gear^.State and gstHHDriven) = 0) then exit; |
58 ((Gear^.State and gstHHDriven) = 0) then exit; |
59 ChangeAmmo:= true; |
59 ChangeAmmo:= true; |
60 |
60 |
61 while (ammoidx < cMaxSlotAmmoIndex) and (Ammo^[slot, ammoidx].AmmoType <> CurAmmoType) do inc(ammoidx); |
61 while (ammoidx < cMaxSlotAmmoIndex) and (Ammo^[slot, ammoidx].AmmoType <> CurAmmoType) do inc(ammoidx); |
62 |
62 |
63 if ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NoRoundEndHint) <> 0) and (MultiShootAttacks > 0) then OnUsedAmmo(PHedgehog(Gear^.Hedgehog)^); |
63 if ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NoRoundEnd) <> 0) and (MultiShootAttacks > 0) then OnUsedAmmo(PHedgehog(Gear^.Hedgehog)^); |
64 |
64 |
65 MultiShootAttacks:= 0; |
65 MultiShootAttacks:= 0; |
66 Gear^.Message:= Gear^.Message and not (gmLJump or gmHJump); |
66 Gear^.Message:= Gear^.Message and not (gmLJump or gmHJump); |
67 |
67 |
68 if Ammoz[CurAmmoType].Slot = slot then |
68 if Ammoz[CurAmmoType].Slot = slot then |
362 isInMultiShoot:= true |
362 isInMultiShoot:= true |
363 end |
363 end |
364 else |
364 else |
365 begin |
365 begin |
366 OnUsedAmmo(CurrentHedgehog^); |
366 OnUsedAmmo(CurrentHedgehog^); |
367 if ((Ammoz[a].Ammo.Propz and ammoprop_NoRoundEndHint) = 0) and ((GameFlags and gfInfAttack) = 0) then |
367 if ((Ammoz[a].Ammo.Propz and ammoprop_NoRoundEnd) = 0) and ((GameFlags and gfInfAttack) = 0) then |
368 TurnTimeLeft:= Ammoz[a].TimeAfterTurn; |
368 TurnTimeLeft:= Ammoz[a].TimeAfterTurn; |
369 if ((Ammoz[a].Ammo.Propz and ammoprop_NoRoundEndHint) = 0) then State:= State or gstAttacked; |
369 if ((Ammoz[a].Ammo.Propz and ammoprop_NoRoundEnd) = 0) then State:= State or gstAttacked; |
370 if (Ammoz[a].Ammo.Propz and ammoprop_NoRoundEndHint) <> 0 then ApplyAmmoChanges(CurrentHedgehog^) |
370 if (Ammoz[a].Ammo.Propz and ammoprop_NoRoundEnd) <> 0 then ApplyAmmoChanges(CurrentHedgehog^) |
371 end; |
371 end; |
372 end |
372 end |
373 else |
373 else |
374 begin |
374 begin |
375 OnUsedAmmo(CurrentHedgehog^); |
375 OnUsedAmmo(CurrentHedgehog^); |
821 Gear^.Message:= Gear^.Message and not gmLJump |
821 Gear^.Message:= Gear^.Message and not gmLJump |
822 end; |
822 end; |
823 |
823 |
824 if (CurAmmoGear = nil) |
824 if (CurAmmoGear = nil) |
825 or ((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_AltAttack) <> 0) |
825 or ((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_AltAttack) <> 0) |
826 or ((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_NoRoundEndHint) <> 0) then |
826 or ((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_NoRoundEnd) <> 0) then |
827 begin |
827 begin |
828 if ((Gear^.Message and gmSlot) <> 0) then |
828 if ((Gear^.Message and gmSlot) <> 0) then |
829 if ChangeAmmo(Gear) then ApplyAmmoChanges(Hedgehog^); |
829 if ChangeAmmo(Gear) then ApplyAmmoChanges(Hedgehog^); |
830 |
830 |
831 if ((Gear^.Message and gmWeapon) <> 0) then HHSetWeapon(Gear); |
831 if ((Gear^.Message and gmWeapon) <> 0) then HHSetWeapon(Gear); |