Use different group to not erase messages, restore gear deletion on hog damage.
authornemo
Sun, 21 Jun 2009 15:41:07 +0000
changeset 2180 6c5a339f8e28
parent 2179 839472821b4d
child 2181 26d3b13ee553
Use different group to not erase messages, restore gear deletion on hog damage.
hedgewars/GSHandlers.inc
hedgewars/uConsts.pas
--- a/hedgewars/GSHandlers.inc	Sun Jun 21 15:36:50 2009 +0000
+++ b/hedgewars/GSHandlers.inc	Sun Jun 21 15:41:07 2009 +0000
@@ -2212,7 +2212,7 @@
     dec(Gear^.Health, fuel div 5)
     end;
 if Gear^.Health < 0 then Gear^.Health:= 0;
-if (GameTicks and $3F) = 0 then AddCaption('Fuel: '+inttostr(round(Gear^.Health/20))+'%', $FFFFFF, capgrpMessage);
+if (GameTicks and $3F) = 0 then AddCaption('Fuel: '+inttostr(round(Gear^.Health/20))+'%', $FFFFFF, capgrpAmmostate);
 
 //AddCaption(inttostr(round(Gear^.Health/20))+'% : '+inttostr(round(Gear^.Timer/1000)), $FFFFFF, capgrpMessage);
 
@@ -2224,6 +2224,7 @@
 doStepHedgehogMoving(HHGear);
 
 if  (Gear^.Health = 0)
+    or (HHGear^.Damage <> 0)
 	or CheckGearDrowning(HHGear)
 	or ((Gear^.Message and gm_Attack) <> 0) then
 	begin
--- a/hedgewars/uConsts.pas	Sun Jun 21 15:36:50 2009 +0000
+++ b/hedgewars/uConsts.pas	Sun Jun 21 15:41:07 2009 +0000
@@ -105,7 +105,7 @@
 	THWFont = (fnt16, fntBig, fntSmall);
 
 	TCapGroup = (capgrpGameState, capgrpAmmoinfo, capgrpVolume,
-			capgrpMessage);
+			capgrpMessage, capgrpAmmostate);
 
 	TStatInfoType = (siGameResult, siMaxStepDamage, siMaxStepKills, siKilledHHs,
 			siClanHealth);