hedgewars/CCHandlers.inc
changeset 2568 e654cbfb23ba
parent 2428 6800f8aa0184
child 2570 7093e3413594
--- a/hedgewars/CCHandlers.inc	Tue Oct 20 17:55:11 2009 +0000
+++ b/hedgewars/CCHandlers.inc	Tue Oct 20 21:20:47 2009 +0000
@@ -670,7 +670,11 @@
 procedure chRotateMask(var s: shortstring);
 const map: array[0..7] of byte = (7,4,0,1,2,3,0,5);
 begin
-cTagsMask:= map[cTagsMask]
+inc(cTagsMaskIndex);
+if cTagsMaskIndex > High(cTagsMasks) then cTagsMaskIndex:= Low(cTagsMasks);
+
+// HACK: skip "health only" if all hogs are invulnerable
+if ((GameFlags and gfInvulnerable) <> 0) and ((cTagsMasks[cTagsMaskIndex] and not htTransparent) = htHealth) then chRotateMask(s);
 end;
 
 procedure chAddTrigger(var s: shortstring);