--- a/ChangeLog.txt Sun Jun 23 16:14:27 2019 +0200
+++ b/ChangeLog.txt Mon Jun 24 11:25:15 2019 +0200
@@ -40,6 +40,7 @@
* Fix hog floating when switching to moving hog
* Fix jump key not being ignored after placing girder or target
* Explode hog instantly when taking damage while dying
+ * Fix buggy hog when hog took damage during "idle" phase in kamikaze attack
Styles and schemes:
+ The Specialists: Unlock game scheme
--- a/hedgewars/uGearsHandlersMess.pas Sun Jun 23 16:14:27 2019 +0200
+++ b/hedgewars/uGearsHandlersMess.pas Mon Jun 24 11:25:15 2019 +0200
@@ -3614,9 +3614,20 @@
end;
procedure doStepKamikazeIdle(Gear: PGear);
+var HHGear: PGear;
begin
AllInactive := false;
dec(Gear^.Timer);
+ HHGear := Gear^.Hedgehog^.Gear;
+ if (HHGear = nil) or (HHGear^.Damage <> 0) then
+ begin
+ if (HHGear <> nil) then
+ AfterAttack;
+ ClearHitOrder();
+ ClearProximityCache();
+ DeleteGear(Gear);
+ exit;
+ end;
if Gear^.Timer = 0 then
begin
Gear^.Pos := 1;