Prevent crates from being collected twice
authorWuzzy <Wuzzy2@mail.ru>
Fri, 24 May 2019 22:07:44 +0200
changeset 15048 35932896ce84
parent 15047 586ebee9de41
child 15049 76003912e31d
Prevent crates from being collected twice
ChangeLog.txt
hedgewars/uGearsHedgehog.pas
--- a/ChangeLog.txt	Fri May 24 21:47:20 2019 +0200
+++ b/ChangeLog.txt	Fri May 24 22:07:44 2019 +0200
@@ -26,6 +26,7 @@
  * Use player-chosen team identity in campaigns and singleplayer missions
  * Fix player-chosen teams ignoring custom team controls in campaigns
  * Fix broken behaviour of airborne attacks when placed near bounce world edge
+ * Fix crate sometimes collected twice when switching to hedgehog that touches it
  * Deny placement of airborne attack in “impossible” places in maps with bounce world edge
  * Deny placement of piano beyond bounce world edge
  * Fix laser sight not working properly when it starts out of map bounds
--- a/hedgewars/uGearsHedgehog.pas	Fri May 24 21:47:20 2019 +0200
+++ b/hedgewars/uGearsHedgehog.pas	Fri May 24 22:07:44 2019 +0200
@@ -785,6 +785,7 @@
     healthBoost: LongInt;
 begin
 if Gear^.State and gstFrozen <> 0 then exit;
+if Gear^.Message and gmDestroy <> 0 then exit;
 
 Gear^.Message:= gmDestroy;
 if (Gear^.Pos and posCaseExplode) <> 0 then