Dynamite handler: Exit early when drowning
authorWuzzy <Wuzzy2@mail.ru>
Fri, 11 Oct 2019 18:56:50 +0200
changeset 15472 e1467bced64d
parent 15471 c788c38f238d
child 15473 b56c04fac6f9
Dynamite handler: Exit early when drowning
hedgewars/uGearsHandlersMess.pas
--- a/hedgewars/uGearsHandlersMess.pas	Fri Oct 11 18:52:11 2019 +0200
+++ b/hedgewars/uGearsHandlersMess.pas	Fri Oct 11 18:56:50 2019 +0200
@@ -2348,6 +2348,8 @@
     doStepFallingGear(Gear);
     AllInactive := false;
 
+    if (Gear^.State and gstDrowning) = 0) then
+        exit;
     if Gear^.Timer mod 166 = 0 then
         inc(Gear^.Tag);
     if Gear^.Timer = 1000 then // might need better timing