Incidencia #44416

Number of units reported killed is wrong when unreachable units were on the tile.

Abrir Fecha: 2022-04-18 19:49 Última actualización: 2022-05-22 09:05

Informador:
Propietario:
Tipo:
Estado:
Cerrado
Componente:
Prioridad:
5 - Medium
Gravedad:
5 - Medium
Resolución:
Fixed
Fichero:
1

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 History (3/5 Histories)

2022-04-18 19:49 Updated by: lexxie9952
  • New Ticket "Number of units reported killed is wrong when unreachable units were on the tile." created
2022-05-04 13:06 Updated by: cazfi
  • Hito Update from (Ninguno) to 3.0.2 (cerrado)
  • Componente Update from (Ninguno) to Server
2022-05-08 12:25 Updated by: cazfi
  • Propietario Update from (Ninguno) to cazfi
  • Resolución Update from Ninguno to Accepted
2022-05-22 09:05 Updated by: cazfi
  • Estado Update from Open to Cerrado
  • Resolución Update from Accepted to Fixed

Editar

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Entrar