Show subtle heal effect for healing hogs in health reset mode
authorWuzzy <Wuzzy2@mail.ru>
Fri, 09 Feb 2018 12:08:12 +0100
changeset 12943 b075ad6112c9
parent 12942 a84a05719454
child 12944 0112ef349ddc
Show subtle heal effect for healing hogs in health reset mode
ChangeLog.txt
hedgewars/uGears.pas
--- a/ChangeLog.txt	Fri Feb 09 11:30:04 2018 +0100
+++ b/ChangeLog.txt	Fri Feb 09 12:08:12 2018 +0100
@@ -4,6 +4,7 @@
 Game:
  + New weapon: Minigun
  + Change weapon icons: Mudball, air mine
+ + Add visual effect when hogs heal in "reset health" mode
  * Fix time box being usable in Sudden Death with 0 health decrease
  * Fix chat input key being sometimes registered twice
 
--- a/hedgewars/uGears.pas	Fri Feb 09 11:30:04 2018 +0100
+++ b/hedgewars/uGears.pas	Fri Feb 09 12:08:12 2018 +0100
@@ -542,7 +542,10 @@
         t^.PortalCounter:= 0;
         if ((GameFlags and gfResetHealth) <> 0) and (t^.Kind = gtHedgehog) and (t^.Health < t^.Hedgehog^.InitialHealth) then
             begin
+            i:= t^.Hedgehog^.InitialHealth - t^.Health;
             t^.Health:= t^.Hedgehog^.InitialHealth;
+            if i > 0 then
+                HHHeal(t^.Hedgehog, i, false, $00FF0040);
             RenderHealth(t^.Hedgehog^);
             end;
         t:= t^.NextGear