Fix some consistency issues with change hog tags control
authorWuzzy <Wuzzy2@mail.ru>
Wed, 14 Feb 2018 23:03:35 +0100
changeset 13006 876b1ef83191
parent 13005 c5529aabdda9
child 13007 0e333d66eec1
Fix some consistency issues with change hog tags control
README.md
hedgewars/uCommandHandlers.pas
--- a/README.md	Wed Feb 14 22:56:32 2018 +0100
+++ b/README.md	Wed Feb 14 23:03:35 2018 +0100
@@ -75,8 +75,8 @@
 These are lesser-known controls of Hedgewars, they are based on your
 configured controls:
 
-* Precise + Change hedgehog tags: Toggle hedgehog tag translucency
-* Switch + Change hedgehog tags: Turn all hedgehog tags on and off
+* Precise + Change hedgehog tags: Turn all hedgehog tags on and off
+* Switch + Change hedgehog tags: Toggle hedgehog tag translucency
 * Precise + Toggle team bars + Switch: Toggle HUD
 * Precise + Capture (screenshot key): Save current map + mask into Screenshot directory
 
--- a/hedgewars/uCommandHandlers.pas	Wed Feb 14 22:56:32 2018 +0100
+++ b/hedgewars/uCommandHandlers.pas	Wed Feb 14 23:03:35 2018 +0100
@@ -628,9 +628,15 @@
 // Rotate Tags key + Switch: Toggle translucency only
 if LocalMessage and gmSwitch = gmSwitch then
     if ((cTagsMask and htTransparent) = 0) then
-        cTagsMask:= cTagsMask or htTransparent
+        begin
+        cTagsMask:= cTagsMask or htTransparent;
+        cPrevTagsMask:= cPrevTagsMask or htTransparent
+        end
     else
-        cTagsMask:= cTagsMask and (not htTransparent)
+        begin
+        cTagsMask:= cTagsMask and (not htTransparent);
+        cPrevTagsMask:= cPrevTagsMask and (not htTransparent)
+        end
 // Rotate Tags key + Precise: Toggle all tags on and off
 else if LocalMessage and gmPrecise = gmPrecise then
     if ((cTagsMask and (htTeamName or htName or htHealth)) = 0) then