Make sticky mines fall off the map when frozen
authorWuzzy <almikes@aol.com>
Sat, 22 Apr 2017 18:12:58 +0200
changeset 12305 6486a012987e
parent 12304 6b25d117a904
child 12306 46e1e25fec5e
Make sticky mines fall off the map when frozen
ChangeLog.txt
hedgewars/uGearsHandlersMess.pas
--- a/ChangeLog.txt	Sat Apr 22 18:00:57 2017 +0200
+++ b/ChangeLog.txt	Sat Apr 22 18:12:58 2017 +0200
@@ -10,7 +10,7 @@
 
 Game engine:
  + New weapon: rubber duck
- + Freezer can now freeze sticky mines
+ + Freezer can now freeze sticky mines (they get disabled and fall into the water)
  + Improved hedgehog spawns on maps that lack land mass or free space
  + AI hedgehogs can now use Bee and Vampirism
  + Divided Teams mode will now work with more than 2 teams (Hint: you probably want to set world edges to "wrap" in such games)
--- a/hedgewars/uGearsHandlersMess.pas	Sat Apr 22 18:00:57 2017 +0200
+++ b/hedgewars/uGearsHandlersMess.pas	Sat Apr 22 18:12:58 2017 +0200
@@ -6066,9 +6066,10 @@
                                 iter^.Damage := 0;
                                 iter^.State := iter^.State and (not gstAttacking)
                                 end
-                            else if iter^.Kind = gtSMine then // disabe sticky mine
+                            else if iter^.Kind = gtSMine then // disabe sticky mine and drop it into the water
                                 begin
                                 iter^.State:= iter^.State or gstFrozen;
+                                iter^.CollisionMask:= 0;
                                 vg:= AddVisualGear(hwRound(iter^.X) - 2  + Random(4), hwRound(iter^.Y) - 2 - Random(2), vgtSmoke);
                                 if vg <> nil then
                                     vg^.Scale:= 0.4;