diff -r e8539e429ae3 -r d6a0a38407c8 hedgewars/uGears.pas --- a/hedgewars/uGears.pas Sun Jan 09 21:36:51 2011 +0300 +++ b/hedgewars/uGears.pas Sun Jan 09 21:37:45 2011 +0300 @@ -558,6 +558,8 @@ Gear^.Damage:= t; if ((not SuddenDeathDmg and (cWaterOpacity < $FF)) or (SuddenDeathDmg and (cWaterOpacity < $FF))) and (hwRound(Gear^.Y) < cWaterLine + 256) then spawnHealthTagForHH(Gear, t); + + // should be CurrentHedgehog, but hedgehog of the last gear which caused damage to this hog uStats.HedgehogDamaged(Gear, CurrentHedgehog^.Gear) end; @@ -1028,7 +1030,8 @@ spawnHealthTagForHH(CurrentHedgehog^.Gear, tmpDmg); end; end; - end; + end else // not gtHedgehog + Gear^.Hedgehog:= Attacker^.Hedgehog; inc(Gear^.Damage, Damage); ScriptCall('onGearDamage', Gear^.UID, Damage); end;