diff -r 95d59fad8699 -r f6074540bab2 hedgewars/GSHandlers.inc --- a/hedgewars/GSHandlers.inc Tue May 21 11:32:42 2013 -0400 +++ b/hedgewars/GSHandlers.inc Tue May 21 16:13:32 2013 -0400 @@ -5109,17 +5109,6 @@ LastDamage:= nil; X:= Hedgehog^.Gear^.X; Y:= Hedgehog^.Gear^.Y; - //unfreeze all semifrozen hogs - make this generic hog cleanup -(* - iter := GearsList; - while iter <> nil do - begin - if (iter^.Kind = gtHedgehog) and - (iter^.Hedgehog^.Effects[heFrozen] and $FF = 0) then - iter^.Hedgehog^.Effects[heFrozen]:= 0; - iter:= iter^.NextGear - end -*) end; end; @@ -5134,7 +5123,7 @@ const iceRadius = 32; const iceHeight = 40; var - HHGear: PGear; + HHGear, iter: PGear; landRect: TSDL_Rect; ndX, ndY: hwFloat; i, j, t, gX, gY: LongInt; @@ -5204,6 +5193,28 @@ landRect.w := min(2*iceRadius, LAND_WIDTH - landRect.x - 1); landRect.h := min(2*iceRadius, LAND_HEIGHT - landRect.y - 1); UpdateLandTexture(landRect.x, landRect.w, landRect.y, landRect.h, true); + + // Freeze nearby mines/explosives/cases too + iter := GearsList; + while iter <> nil do + begin + if ((iter^.Kind = gtExplosives) or (iter^.Kind = gtCase) or (iter^.Kind = gtMine)) and + (abs(Gear^.X.Round-target.x)+abs(Gear^.Y.Round-target.y)+2 nil then + vg^.Scale:= 0.5; + PlaySound(sndVaporize); + Gear^.Health := 0; + Gear^.Damage := 0; + Gear^.State := Gear^.State and (not gstAttacking) + end + end; + iter:= iter^.NextGear + end; // FillRoundInLandWithIce(Target.X, Target.Y, iceRadius); SetAllHHToActive;