hedgewars/uCommandHandlers.pas
changeset 12997 f06660523198
parent 12990 8dd95c095882
child 12998 22e032ab1cb7
--- a/hedgewars/uCommandHandlers.pas	Wed Feb 14 20:57:45 2018 +0100
+++ b/hedgewars/uCommandHandlers.pas	Wed Feb 14 21:28:44 2018 +0100
@@ -26,7 +26,7 @@
 procedure freeModule;
 
 implementation
-uses uCommands, uTypes, uVariables, uIO, uDebug, uConsts, uScript, uUtils, SDLh, uWorld, uRandom, uCaptions
+uses uCommands, uTypes, uVariables, uIO, uDebug, uConsts, uScript, uUtils, SDLh, uWorld, uRandom, uCaptions, uConsole
     , uVisualGearsList, uGearsHedgehog
      {$IFDEF USE_VIDEO_RECORDING}, uVideoRec {$ENDIF};
 
@@ -614,13 +614,6 @@
          UIDisplay:= uiNone
     else UIDisplay:= uiAll
     end
-else if LocalMessage and gmPrecise = gmPrecise then
-    begin
-    if ((GameFlags and gfInvulnerable) = 0) then
-        cTagsMask:= cTagsMasks[cTagsMask]
-    else
-        cTagsMask:= cTagsMasksNoHealth[cTagsMask]
-    end
 else
     begin
     if UIDisplay <> uiNoTeams then
@@ -629,6 +622,15 @@
     end
 end;
 
+procedure chRotateTags(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+if ((GameFlags and gfInvulnerable) = 0) then
+    cTagsMask:= cTagsMasks[cTagsMask]
+else
+    cTagsMask:= cTagsMasksNoHealth[cTagsMask]
+end;
+
 procedure chSpeedup_p(var s: shortstring);
 begin
 s:= s; // avoid compiler hint
@@ -822,6 +824,7 @@
     RegisterVariable('spectate', @chFastUntilLag   , false);
     RegisterVariable('capture' , @chCapture      , true );
     RegisterVariable('rotmask' , @chRotateMask   , true );
+    RegisterVariable('rottags' , @chRotateTags   , true );
     RegisterVariable('rdriven' , @chTeamLocal    , false);
     RegisterVariable('map'     , @chSetMap       , false);
     RegisterVariable('theme'   , @chSetTheme     , false);