fix health crate collision
authorsheepluva
Sun, 16 Nov 2014 17:07:13 +0100
changeset 10506 325f7bb60580
parent 10505 03894bfb8bf3
child 10507 ed5df9cd251f
fix health crate collision
hedgewars/uConsts.pas
hedgewars/uGears.pas
hedgewars/uGearsUtils.pas
share/hedgewars/Data/Graphics/FirstAid.png
--- a/hedgewars/uConsts.pas	Sun Nov 16 00:57:05 2014 +0300
+++ b/hedgewars/uConsts.pas	Sun Nov 16 17:07:13 2014 +0100
@@ -302,6 +302,8 @@
     posCaseExplode = $00000010;
     posCasePoison  = $00000020;
 
+    cCaseHealthRadius = 14;
+
     // hog tag mask
     //htNone        = $00;
     htTeamName    = $01;
--- a/hedgewars/uGears.pas	Sun Nov 16 00:57:05 2014 +0300
+++ b/hedgewars/uGears.pas	Sun Nov 16 17:07:13 2014 +0100
@@ -749,6 +749,8 @@
         HealthCrate:
             begin
             FollowGear^.Pos := posCaseHealth;
+            // health crate is smaller than the other crates
+            FollowGear^.Radius := cCaseHealthRadius;
             FollowGear^.Health := content;
             AddCaption(GetEventString(eidNewHealthPack), cWhiteColor, capgrpAmmoInfo);
             end;
@@ -787,6 +789,8 @@
         HealthCrate:
             begin
             FollowGear^.Pos := FollowGear^.Pos + posCaseHealth;
+            // health crate is smaller than the other crates
+            FollowGear^.Radius := cCaseHealthRadius;
             AddCaption(GetEventString(eidNewHealthPack), cWhiteColor, capgrpAmmoInfo);
             end;
         AmmoCrate:
--- a/hedgewars/uGearsUtils.pas	Sun Nov 16 00:57:05 2014 +0300
+++ b/hedgewars/uGearsUtils.pas	Sun Nov 16 17:07:13 2014 +0100
@@ -1306,6 +1306,8 @@
     FollowGear:= AddGear(0, 0, gtCase, 0, _0, _0, 0);
     FollowGear^.Health:= cHealthCaseAmount;
     FollowGear^.Pos:= posCaseHealth;
+    // health crate is smaller than the other crates
+    FollowGear^.Radius := cCaseHealthRadius;
     AddCaption(GetEventString(eidNewHealthPack), cWhiteColor, capgrpAmmoInfo);
     end
 else if (t<a+h) then
Binary file share/hedgewars/Data/Graphics/FirstAid.png has changed