--- a/hedgewars/uGears.pas Wed Aug 31 00:58:48 2011 -0400
+++ b/hedgewars/uGears.pas Wed Aug 31 01:17:14 2011 -0400
@@ -217,7 +217,6 @@
gear^.doStep:= doStepHandlers[Kind];
gear^.CollisionIndex:= -1;
gear^.Timer:= Timer;
-gear^.Z:= cUsualZ;
gear^.FlightTime:= 0;
gear^.uid:= Counter;
gear^.SoundChannel:= -1;
@@ -225,6 +224,8 @@
gear^.nImpactSounds:= 0;
// Define ammo association, if any.
gear^.AmmoType:= GearKindAmmoTypeMap[Kind];
+if Ammoz[Gear^.AmmoType].Ammo.Propz and ammoprop_NeedTarget <> 0 then gear^.Z:= cHHZ+1
+else gear^.Z:= cUsualZ;
if CurrentHedgehog <> nil then
begin
@@ -371,7 +372,8 @@
gear^.Elasticity:= _0_4;
gear^.Friction:= _0_995;
gear^.Density:= _6;
- gear^.Health:= cBarrelHealth
+ gear^.Health:= cBarrelHealth;
+ gear^.Z:= cHHZ-1
end;
gtDEagleShot: begin
gear^.Radius:= 1;