# HG changeset patch # User unc0rr # Date 1369169415 -14400 # Node ID d1478ce0f2989335232e46cf023deebb6c822fe3 # Parent e84d42a4311c9eb08c65b677d3260474310cb4d6# Parent 1ae1b6017b27d144bd9eb33be86a045d03f8db2f merge diff -r e84d42a4311c -r d1478ce0f298 hedgewars/GSHandlers.inc --- a/hedgewars/GSHandlers.inc Wed May 22 00:49:37 2013 +0400 +++ b/hedgewars/GSHandlers.inc Wed May 22 00:50:15 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; diff -r e84d42a4311c -r d1478ce0f298 hedgewars/uConsts.pas --- a/hedgewars/uConsts.pas Wed May 22 00:49:37 2013 +0400 +++ b/hedgewars/uConsts.pas Wed May 22 00:50:15 2013 +0400 @@ -212,7 +212,8 @@ gstLoser = $00080000; gstHHGone = $00100000; gstInvisible = $00200000; - gstSubmersible = $00400000; + gstSubmersible = $00400000; + gstFrozen = $00800000; // gear messages gmLeft = $00000001;