Display invuln icon in gfInvulnerable mode
authorWuzzy <Wuzzy2@mail.ru>
Fri, 11 Oct 2019 13:33:56 +0200
changeset 15484 b9b48e8b5ec4
parent 15483 19e987301674
child 15485 421da44ff218
Display invuln icon in gfInvulnerable mode
hedgewars/uWorld.pas
--- a/hedgewars/uWorld.pas	Thu Oct 10 00:40:39 2019 +0200
+++ b/hedgewars/uWorld.pas	Fri Oct 11 13:33:56 2019 +0200
@@ -1550,9 +1550,13 @@
         end;
     end
     // in gfInvulnerable mode ...
-    else if (CurrentHedgehog^.Effects[heResurrectable] <> 0) then
-        // show halo for resurrectable hog
-        DrawSprite(sprHaloHud, (cScreenWidth div 2 - CurrentHedgehog^.HealthTagTex^.w - t - 2), i, 0);
+    else
+        begin
+        DrawSprite(sprInvulnHud, cScreenWidth div 2 - 28, i, 0);
+        if (CurrentHedgehog^.Effects[heResurrectable] <> 0) then
+            // show halo for resurrectable hog
+            DrawSprite(sprHaloHud, cScreenWidth div 2 - 30, i - SpritesData[sprHaloHud].Height + 1, 0);
+        end;
     end
 else
     cDemoClockFPSOffsetY:= 0;