Restrict girder placement in other land objects, too
authorWuzzy <Wuzzy2@mail.ru>
Tue, 06 Aug 2019 23:33:08 +0200
changeset 15324 b761efebe3c4
parent 15323 9299f43ba0ec
child 15325 b043b5d5219a
Restrict girder placement in other land objects, too
ChangeLog.txt
hedgewars/uCollisions.pas
--- a/ChangeLog.txt	Tue Aug 06 23:47:02 2019 +0300
+++ b/ChangeLog.txt	Tue Aug 06 23:33:08 2019 +0200
@@ -41,6 +41,7 @@
  * Fix jump key not being ignored after placing girder or target
  * Fix buggy hog when hog took damage during "idle" phase in kamikaze attack
  * Fix movement stopping when activating flying saucer after long jump
+ * Girder/rubber can no longer be placed inside moving hogs and land objects
 
 Styles and schemes:
  + The Specialists: Unlock game scheme
--- a/hedgewars/uCollisions.pas	Tue Aug 06 23:47:02 2019 +0300
+++ b/hedgewars/uCollisions.pas	Tue Aug 06 23:33:08 2019 +0200
@@ -1056,7 +1056,8 @@
 
     while Gear <> nil do
         begin
-        if (Gear^.Kind = gtAirMine) or ((Gear^.Kind = gtHedgehog) and (Gear^.CollisionIndex = 0)) then
+        if (Gear^.Kind in [gtCase, gtExplosives, gtTarget, gtKnife, gtMine, gtAirMine, gtSMine]) or
+            ((Gear^.Kind = gtHedgehog) and (Gear^.CollisionIndex = 0)) then
             begin
             gx:= hwRound(Gear^.X);
             gy:= hwRound(Gear^.Y);