Clear gmLeft/gmRight after using landspray/flamethrower to prevent accidental walking
authorWuzzy <Wuzzy2@mail.ru>
Sat, 27 Oct 2018 00:01:53 +0200
changeset 13998 23fb123bd70c
parent 13997 971693c921ed
child 13999 a24c4a051960
Clear gmLeft/gmRight after using landspray/flamethrower to prevent accidental walking
hedgewars/uGearsHandlersMess.pas
--- a/hedgewars/uGearsHandlersMess.pas	Sat Oct 27 00:17:43 2018 +0300
+++ b/hedgewars/uGearsHandlersMess.pas	Sat Oct 27 00:01:53 2018 +0200
@@ -5576,6 +5576,7 @@
 
     if (Gear^.Health = 0) or ((HHGear^.State and gstHHDriven) = 0) then
         begin
+        HHGear^.Message:= HHGear^.Message and (not (gmAttack or gmLeft or gmRight));
         HHGear^.State := HHGear^.State and (not gstNotKickable);
         StopSoundChan(Gear^.SoundChannel, 300);
         DeleteGear(Gear);
@@ -5661,7 +5662,7 @@
 
     if (Gear^.Health = 0) or ((HHGear^.State and gstHHDriven) = 0) or ((HHGear^.Message and gmAttack) <> 0) then
         begin
-        HHGear^.Message:= HHGear^.Message and (not gmAttack);
+        HHGear^.Message:= HHGear^.Message and (not (gmAttack or gmLeft or gmRight));
         HHGear^.State := HHGear^.State and (not gstNotKickable);
         StopSoundChan(gear^.SoundChannel);
         DeleteGear(Gear);