Fix rotatemask (hedgehog info) key toggling team bars instead of changing hedgehog tags
authorWuzzy <almikes@aol.com>
Fri, 22 Sep 2017 18:46:28 +0200
changeset 12488 c19e5ece5b3f
parent 12487 dd9f079b1386
child 12489 f545ae26262f
Fix rotatemask (hedgehog info) key toggling team bars instead of changing hedgehog tags Pressing rotatemask toggled the team bars, but it was clearly indicatd otherwise in the controls menu. To change hog tags, you must have pressed rotatemask+precise which is not what users expect. New behaviour: - rotatemask changes hog tags - rotatemask+precise toggles team bars
hedgewars/uCommandHandlers.pas
--- a/hedgewars/uCommandHandlers.pas	Fri Sep 22 18:02:37 2017 +0200
+++ b/hedgewars/uCommandHandlers.pas	Fri Sep 22 18:46:28 2017 +0200
@@ -614,26 +614,28 @@
 procedure chRotateMask(var s: shortstring);
 begin
 s:= s; // avoid compiler hint
-// this is just for me, 'cause I thought it'd be fun.  using the old precise + switch to keep it out of people's way
+// RotateMask key + Switch + Precise: Toggle entire HUD
 if LocalMessage and (gmPrecise or gmSwitch) = (gmPrecise or gmSwitch) then
     begin
     if UIDisplay <> uiNone then
          UIDisplay:= uiNone
     else UIDisplay:= uiAll
     end
+// Rotate Mask key + Precise: Toggle team bars
 else if LocalMessage and gmPrecise = gmPrecise then
     begin
+    if UIDisplay <> uiNoTeams then
+         UIDisplay:= uiNoTeams
+    else UIDisplay:= uiAll
+    end
+// Rotate Mask key only: Change hedgehog tags
+else
+    begin
     if ((GameFlags and gfInvulnerable) = 0) then
         cTagsMask:= cTagsMasks[cTagsMask]
     else
         cTagsMask:= cTagsMasksNoHealth[cTagsMask]
     end
-else
-    begin
-    if UIDisplay <> uiNoTeams then
-         UIDisplay:= uiNoTeams
-    else UIDisplay:= uiAll
-    end
 end;
 
 procedure chSpeedup_p(var s: shortstring);