# HG changeset patch # User Wuzzy # Date 1557945637 -7200 # Node ID 2d5f1dc637da72e6fde58ba230810df69388e982 # Parent da7eb3414e02595d1c47205713bf450c1faf771f Fix sndBoring being placed if ending turn during multi-shoot via skip command For example: - AI hog shoots once with shotgun - AI hog ends turn via ParseCommand("skip") diff -r da7eb3414e02 -r 2d5f1dc637da hedgewars/uGearsHedgehog.pas --- a/hedgewars/uGearsHedgehog.pas Wed May 15 19:43:53 2019 +0200 +++ b/hedgewars/uGearsHedgehog.pas Wed May 15 20:40:37 2019 +0200 @@ -1314,7 +1314,7 @@ if TagTurnTimeLeft = 0 then TagTurnTimeLeft:= TurnTimeLeft; TurnTimeLeft:= 0; - if (GameOver = false) and ((GameFlags and gfInfAttack) = 0) and ((HHGear^.State and gstAttacked) = 0) and (HHGear^.Damage = 0) and (LuaNoEndTurnTaunts = false) then + if (GameOver = false) and ((GameFlags and gfInfAttack) = 0) and ((HHGear^.State and gstAttacked) = 0) and (HHGear^.Damage = 0) and (LuaNoEndTurnTaunts = false) and (uStats.getIsTurnSkipped() = false) then begin AddVoice(sndBoring, Hedgehog^.Team^.voicepack); if (GameFlags and gfInfAttack = 0) then diff -r da7eb3414e02 -r 2d5f1dc637da hedgewars/uStats.pas --- a/hedgewars/uStats.pas Wed May 15 19:43:53 2019 +0200 +++ b/hedgewars/uStats.pas Wed May 15 20:40:37 2019 +0200 @@ -42,6 +42,7 @@ procedure HedgehogDamaged(Gear: PGear; Attacker: PHedgehog; Damage: Longword; killed: boolean); procedure TargetHit; procedure Skipped; +function getIsTurnSkipped: boolean; procedure TurnStats; procedure TurnReaction; procedure TurnStatsReset; @@ -191,6 +192,11 @@ isTurnSkipped:= true end; +function getIsTurnSkipped: boolean; +begin +getIsTurnSkipped:= isTurnSkipped; +end; + procedure TurnStats; var i, t: LongInt; c: Longword;