# HG changeset patch # User Wuzzy # Date 1554763514 -7200 # Node ID bbec6b28d072d4fa2ed7051419783d0d8aceb566 # Parent 8015a6e4ca3c510fda7d55d5eb8537f1c9e82d71 Fix bugs when entering speech bubble commands during hog placement phase diff -r 8015a6e4ca3c -r bbec6b28d072 ChangeLog.txt --- a/ChangeLog.txt Tue Apr 09 00:06:53 2019 +0300 +++ b/ChangeLog.txt Tue Apr 09 00:45:14 2019 +0200 @@ -79,6 +79,7 @@ * Fix airplane line being drawn above many HUD elements * Suppress “ is gone.” message at end of game * Fix game engine ignoring appropriate number formatting of user language + * Fix buggy behaviour when entering speech bubble command in hog placement phase Frontend: + Restructure credits diff -r 8015a6e4ca3c -r bbec6b28d072 hedgewars/uChat.pas --- a/hedgewars/uChat.pas Tue Apr 09 00:06:53 2019 +0300 +++ b/hedgewars/uChat.pas Tue Apr 09 00:45:14 2019 +0200 @@ -366,7 +366,7 @@ // default to current hedgehog (if own) or first hedgehog if SpeechHogNumber = 0 then begin - if not CurrentTeam^.ExtDriven then + if (not CurrentTeam^.ExtDriven) and (not CurrentHedgehog^.Unplaced) then SpeechHogNumber:= CurrentTeam^.CurrHedgehog + 1 else SpeechHogNumber:= 1; diff -r 8015a6e4ca3c -r bbec6b28d072 hedgewars/uGears.pas --- a/hedgewars/uGears.pas Tue Apr 09 00:06:53 2019 +0300 +++ b/hedgewars/uGears.pas Tue Apr 09 00:45:14 2019 +0200 @@ -1308,7 +1308,7 @@ if (x < 4) and (TeamsArray[t] <> nil) then begin // if team matches current hedgehog team, default to current hedgehog - if (i = 0) and (CurrentHedgehog <> nil) and (CurrentHedgehog^.Team = TeamsArray[t]) then + if (i = 0) and (CurrentHedgehog <> nil) and (CurrentHedgehog^.Team = TeamsArray[t]) and (not CurrentHedgehog^.Unplaced) then hh:= CurrentHedgehog else begin @@ -1317,7 +1317,7 @@ c:= 0; while (j <= cMaxHHIndex) and (hh = nil) do begin - if (TeamsArray[t]^.Hedgehogs[j].Gear <> nil) then + if (TeamsArray[t]^.Hedgehogs[j].Gear <> nil) and (not TeamsArray[t]^.Hedgehogs[j].Unplaced) then begin inc(c); if (i=0) or (i=c) then diff -r 8015a6e4ca3c -r bbec6b28d072 hedgewars/uGearsRender.pas --- a/hedgewars/uGearsRender.pas Tue Apr 09 00:06:53 2019 +0300 +++ b/hedgewars/uGearsRender.pas Tue Apr 09 00:45:14 2019 +0200 @@ -241,7 +241,7 @@ repeat hh:= @TeamsArray[t]^.Hedgehogs[i]; inc(i); - if (hh <> nil) and (hh^.Gear <> nil) then + if (hh <> nil) and (hh^.Gear <> nil) and (not hh^.Unplaced) then begin inc(c); HHGear:= hh^.Gear;