# HG changeset patch # User Wuzzy # Date 1518645253 -3600 # Node ID 46ba3285449ab9987cdeb198f00c56621324e264 # Parent 22e032ab1cb73b1ce722f829173e3e3f665f62d9 Switch + Change hog tags now turns on and off all tags The previous state is remembered diff -r 22e032ab1cb7 -r 46ba3285449a ChangeLog.txt --- a/ChangeLog.txt Wed Feb 14 22:27:18 2018 +0100 +++ b/ChangeLog.txt Wed Feb 14 22:54:13 2018 +0100 @@ -8,7 +8,8 @@ + Show remaining ammo when using Birdy egg or RC Plane bomb + Add separate control for team chat (default: U) + Add separate control for changing hedgehog tags (default: Home) - + Hedgehog tag translucency is now changed with Precise + Change hedgehog tags key + + Hedgehog tag translucency is now changed with [Precise] + [Change hedgehog tags] + + Toggle all hedgehog tags at once with [Switch] + [Change hedgehog tags] * Fix time box being usable in Sudden Death with 0 health decrease * Fix chat input key being sometimes registered twice diff -r 22e032ab1cb7 -r 46ba3285449a README.md --- a/README.md Wed Feb 14 22:27:18 2018 +0100 +++ b/README.md Wed Feb 14 22:54:13 2018 +0100 @@ -75,7 +75,8 @@ These are lesser-known controls of Hedgewars, they are based on your configured controls: -* Precise + Toggle team bars: Toggle hedgehog tag translucency +* Precise + Change hedgehog tags: Toggle hedgehog tag translucency +* Switch + Change hedgehog tags: Turn all hedgehog tags on and off * Precise + Toggle team bars + Switch: Toggle HUD * Precise + Capture (screenshot key): Save current map + mask into Screenshot directory diff -r 22e032ab1cb7 -r 46ba3285449a hedgewars/uCommandHandlers.pas --- a/hedgewars/uCommandHandlers.pas Wed Feb 14 22:27:18 2018 +0100 +++ b/hedgewars/uCommandHandlers.pas Wed Feb 14 22:54:13 2018 +0100 @@ -631,13 +631,25 @@ cTagsMask:= cTagsMask or htTransparent else cTagsMask:= cTagsMask and (not htTransparent) -// Just the rotate tags key: Rotate hog tags +// Rotate Tags key + Switch: Toggle all tags on and off +else if LocalMessage and gmSwitch = gmSwitch then + if ((cTagsMask and (htTeamName or htName or htHealth)) = 0) then + cTagsMask:= cPrevTagsMask + else + begin + cPrevTagsMask:= cTagsMask; + cTagsMask:= cTagsMask and (not (htTeamName or htName or htHealth)) + end +// Rotate Tags key only: Rotate hog tags else + begin + cPrevTagsMask:= cTagsMask; if ((GameFlags and gfInvulnerable) = 0) then cTagsMask:= cTagsMasks[cTagsMask] else cTagsMask:= cTagsMasksNoHealth[cTagsMask] end; +end; procedure chSpeedup_p(var s: shortstring); begin diff -r 22e032ab1cb7 -r 46ba3285449a hedgewars/uVariables.pas --- a/hedgewars/uVariables.pas Wed Feb 14 22:27:18 2018 +0100 +++ b/hedgewars/uVariables.pas Wed Feb 14 22:54:13 2018 +0100 @@ -123,6 +123,7 @@ cSDCloudsNumber : LongWord; cTagsMask : byte; + cPrevTagsMask : byte; zoom : GLfloat; ZoomValue : GLfloat; @@ -2624,6 +2625,7 @@ {$ENDIF} cTagsMask:= htTeamName or htName or htHealth; + cPrevTagsMask:= cTagsMask; end; procedure initScreenSpaceVars();