Page 1 of 1
non-native attack failed
Posted: Tue Jul 14, 2020 11:17 am
by Wahazar
I have ruleset with unit class, which has "AttackNonNative", "AttFromNonNative" flags (freeciv 2.6).
This unit can be transported, but sometimes attack from transport board doesn't work, there is following message in console instead:
Code: Select all
1: in request_transport() [transportdlg.c::104]: assertion 'unit_list_get(potential_transports, 0) == best_transport' failed.
What can be a reason of such behavior?
Re: non-native attack failed
Posted: Wed Jul 15, 2020 7:05 am
by Ignatus
Likely, the client tries to board the ememy instead of attacking it. This is strange, control.c code calls request_transport() only if the destination move tile has unlivable terrain. What client do you use?
Re: non-native attack failed
Posted: Wed Jul 15, 2020 10:14 am
by Alien Valkyrie
Ignatus wrote:This is strange, control.c code calls request_transport() only if the destination move tile has unlivable terrain.
If I understand this correctly, that's precisely the case – an attack
from a non-native tile
against another non-native tile.
Re: non-native attack failed
Posted: Wed Jul 15, 2020 11:56 am
by Wahazar
Ignatus wrote:Likely, the client tries to board the ememy instead of attacking it. This is strange, control.c code calls request_transport() only if the destination move tile has unlivable terrain. What client do you use?
Both Qt and Gtk has this effect.
Yes, attacking unit (turret) have no livelable terrain at all (it can't move by itself, only by transport), so it attack from unlivable at unlivable.
Re: non-native attack failed
Posted: Wed Jul 15, 2020 1:44 pm
by Ignatus
Ah yes, now I understand. Yes, it's a bug in client logic.
HRM#881350
Re: non-native attack failed
Posted: Wed Jul 15, 2020 7:41 pm
by Wahazar
Another issue (maybe related) is that it is not possible to use goto to attack unit on non-native tile.
Re: non-native attack failed
Posted: Wed Jul 15, 2020 8:46 pm
by Ignatus
Put a patch on HRM. In my test, it worked. I hope it does not break other stuff where request_transport is called
