--- a/hedgewars/uIO.pas Sat Jun 01 00:27:23 2019 +0200
+++ b/hedgewars/uIO.pas Sun Jun 02 17:02:24 2019 +0200
@@ -39,7 +39,7 @@
procedure doPut(putX, putY: LongInt; fromAI: boolean);
implementation
-uses uConsole, uConsts, uVariables, uCommands, uUtils, uDebug, uLocale;
+uses uConsole, uConsts, uVariables, uCommands, uUtils, uDebug, uLocale, uSound;
const
cSendEmptyPacketTime = 1000;
@@ -512,6 +512,7 @@
with CurrentHedgehog^.Gear^,
CurrentHedgehog^ do
if (State and gstChooseTarget) <> 0 then
+ if ((((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_AttackInMove) <> 0) or ((State and gstMoving) = 0)) or ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_AttackingPut) = 0)) then
begin
if (Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NoTargetAfter) <> 0 then
isCursorVisible:= false;
@@ -543,6 +544,8 @@
if (Ammoz[CurAmmoType].Ammo.Propz and ammoprop_AttackingPut) <> 0 then
Message:= Message or (gmAttack and InputMask);
end
+ else
+ PlaySound(sndDenied)
else
if CurrentTeam^.ExtDriven then
OutError('Got /put while not being in choose target mode', false)