--- a/hedgewars/uGearsHandlersMess.pas Thu Nov 07 23:08:28 2013 -0500
+++ b/hedgewars/uGearsHandlersMess.pas Fri Nov 08 23:11:13 2013 -0500
@@ -208,7 +208,7 @@
if (gi^.Kind = gtHedgehog) then
begin
d := r - hwRound(Distance(gi^.X - x, gi^.Y - y));
- if (d > 1) and (not gi^.Invulnerable) and (GetRandom(2) = 0) then
+ if (d > 1) and ((gi^.Hedgehog^.Effects[heInvulnerable] = 0)) and (GetRandom(2) = 0) then
begin
if (CurrentHedgehog^.Gear = gi) then
PlaySoundV(sndOops, gi^.Hedgehog^.Team^.voicepack)
@@ -2826,7 +2826,7 @@
dmg:= dmgBase - max(hwRound(Distance(tdX, tdY)),gi^.Radius);
if (dmg > 1) then dmg:= ModifyDamage(min(dmg div 2, cakeDmg), gi);
if (dmg > 1) then
- if (CurrentHedgehog^.Gear = gi) and (not gi^.Invulnerable) then
+ if (CurrentHedgehog^.Gear = gi) and ((gi^.Hedgehog^.Effects[heInvulnerable] = 0)) then
gi^.State := gi^.State or gstLoser
else
gi^.State := gi^.State or gstWinner;
@@ -4734,7 +4734,7 @@
if (tmp^.Kind = gtHedgehog) or (tmp^.Kind = gtMine) or (tmp^.Kind = gtExplosives) then
begin
//tmp^.State:= tmp^.State or gstFlatened;
- if not tmp^.Invulnerable then
+ if (tmp^.Hedgehog^.Effects[heInvulnerable] = 0) then
ApplyDamage(tmp, CurrentHedgehog, tmp^.Health div 3, dsUnknown);
//DrawTunnel(tmp^.X, tmp^.Y - _1, _0, _0_5, cHHRadius * 6, cHHRadius * 3);
tmp2:= AddGear(hwRound(tmp^.X), hwRound(tmp^.Y), gtHammerHit, 0, _0, _0, 0);
@@ -5075,7 +5075,7 @@
while t <> nil do
begin
if (t^.Kind = gtHedgehog) and (t^.Hedgehog^.Team^.Clan = HH^.Team^.Clan) then
- t^.Invulnerable:= true;
+ t^.Hedgehog^.Effects[heInvulnerable]:= 1;
t:= t^.NextGear;
end;
end;