Fix hittig precise+rottags the first time when all tags started off showing health tag in gfInvulnerable
authorWuzzy <Wuzzy2@mail.ru>
Thu, 15 Feb 2018 21:47:31 +0100
changeset 13013 4234a18a082c
parent 13012 d82fec121f31
child 13014 9027961b3208
Fix hittig precise+rottags the first time when all tags started off showing health tag in gfInvulnerable
hedgewars/uCommandHandlers.pas
--- a/hedgewars/uCommandHandlers.pas	Thu Feb 15 21:39:10 2018 +0100
+++ b/hedgewars/uCommandHandlers.pas	Thu Feb 15 21:47:31 2018 +0100
@@ -649,7 +649,11 @@
 // Rotate Tags key only: Toggle all hog tags on and off
 else
     if ((cTagsMask and (htTeamName or htName or htHealth)) = 0) then
-        cTagsMask:= cPrevTagsMask
+        begin
+        cTagsMask:= cPrevTagsMask;
+        if ((GameFlags and gfInvulnerable) <> 0) then
+            cTagsMask:= cTagsMask and (not htHealth);
+        end
     else
         begin
         cPrevTagsMask:= cTagsMask;