#44284: Client sends packages when the player has lost Open Date: 2022-04-06 23:42 Last Update: 2022-04-07 23:08 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/44284 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=44284 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2022-04-07 23:08 Updated by: ihnatus Comment: Let's look into the code: if AI kills a king, it normally happens in phase beginning within first_activities AI callback that is followed by k_d_p(). If a user action (incl. player's own movement that causes auto-attack) kills a king, that happens within server_packet_input() that is also finalized with k_d_p(). If some tc happening misfortune kills the king, there is k_d_p() at phase end and a very special thing must happen to bypass it, we hardly have such one in standard rulesets (a sea bridge the king stays on is spontaneously removed?). But when we call a Lua callback, it may happen any moment without phase start, user input or turn end In fact, how much do we need the gap between killing a gameloss unit and k_d_p? Likely, only few code requires players involved to stay alive, and we just must test any city existence after we have called any Lua. Maybe in newer versions we should switch to an immediate kill_player() call. --------------------------------------------------------------------- Ticket Status: Reporter: ihnatus Owner: (None) Type: Bugs Status: Open Priority: 5 - Medium MileStone: 3.0.2 Component: General Severity: 5 - Medium Resolution: None --------------------------------------------------------------------- Ticket details: Spotted when a script kills in any way a gameloss unit. Before #44274, also happened when you remove a king in editor, after #44273, may be triggered by edit.player_lose() method. It might happen in some other situation and client ignorance/server package warning may be not the only bug effect, since marking players with PSTATUS_DYING and calling kill_dying_players() are distant and things happen between them. -- Ticket information of Freeciv project Freeciv Project is hosted on OSDN Project URL: https://osdn.net/projects/freeciv/ OSDN: https://osdn.net URL for this Ticket: https://osdn.net/projects/freeciv/ticket/44284 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=44284