# HG changeset patch # User nemo # Date 1314767834 14400 # Node ID 8972de340fa1135a97dbc7020fc53cb40d0a747f # Parent 4454aa0523e7debdba4e858a9e11397321e9566b adjust Z order so crosshairs are on top of hogs, grenades behind explosives diff -r 4454aa0523e7 -r 8972de340fa1 hedgewars/uGears.pas --- 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;