From be671999b228fe78405d1b08b923444559a00e28 Mon Sep 17 00:00:00 2001 From: Ihnatus Date: Sun, 3 Apr 2022 20:17:43 +0300 Subject: [PATCH] Don't kill a nation removing a gameloss unit in editor See OSDN#44274 Signed-off-by: Ihnatus --- server/unittools.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/unittools.c b/server/unittools.c index f1b01d0a0f..c5d60d9f54 100644 --- a/server/unittools.c +++ b/server/unittools.c @@ -1772,7 +1772,8 @@ static void server_remove_unit_full(struct unit *punit, bool transported, } /* check if this unit had UTYF_GAMELOSS flag */ - if (unit_has_type_flag(punit, UTYF_GAMELOSS) && unit_owner(punit)->is_alive) { + if (unit_has_type_flag(punit, UTYF_GAMELOSS) && unit_owner(punit)->is_alive + && ULR_EDITOR != reason) { notify_conn(game.est_connections, ptile, E_UNIT_LOST_MISC, ftc_server, _("Unable to defend %s, %s has lost the game."), unit_link(punit), -- 2.32.0