#44416: Number of units reported killed is wrong when unreachable units were on the tile. Open Date: 2022-04-18 13:49 Last Update: 2022-05-04 07:06 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/44416 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=44416 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2022-05-04 07:06 Updated by: cazfi * Milestone Update from (None) to 3.0.2 * Component Update from (None) to Server --------------------------------------------------------------------- Ticket Status: Reporter: lexxie9952 Owner: (None) Type: Bugs Status: Open Priority: 5 - Medium MileStone: 3.0.2 Component: Server Severity: 5 - Medium Resolution: None --------------------------------------------------------------------- Ticket details: this bug is in unittools.c line 2283: https://github.com/freeciv/freeciv/blob/c638e472ea3e99c08e22caf7e6abae89649618ee/server/unittools.c#L2283 The solution to this bug is easy. Everywhere else we check TWO conditions, e.g. line 2313 if (pplayers_at_war(pvictor, vplayer) && is_unit_reachable_at(vunit, pkiller, deftile)) But on line 2283 we only check if pplayers_at_war and not if the unit is reachable. Not surprisingly then, any unreachable units on the tile get counted as killed when it is reported "You killed the whatever and x other units". x is wrongly inflated by exactly how many unreachable units were on that tile. -- 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/44416 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=44416