End turn immediately if king of own team was killed
authorWuzzy <Wuzzy2@mail.ru>
Mon, 10 Dec 2018 02:40:27 +0100
changeset 14404 352ea82355ae
parent 14403 87562a68c41f
child 14405 9c7d5f595881
End turn immediately if king of own team was killed
hedgewars/uGearsHedgehog.pas
--- a/hedgewars/uGearsHedgehog.pas	Mon Dec 10 02:30:14 2018 +0100
+++ b/hedgewars/uGearsHedgehog.pas	Mon Dec 10 02:40:27 2018 +0100
@@ -1307,7 +1307,7 @@
 else if not isInMultiShoot then
     AllInactive:= false;
 
-if (TurnTimeLeft = 0) or (HHGear^.Damage > 0) or (LuaEndTurnRequested = true) then
+if (TurnTimeLeft = 0) or (HHGear^.Damage > 0) or (((GameFlags and gfKing) <> 0) and (not Hedgehog^.Team^.hasKing)) or (LuaEndTurnRequested = true) then
     begin
     if (Hedgehog^.CurAmmoType = amKnife) then
        LoadHedgehogHat(Hedgehog^, Hedgehog^.Hat);