Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Bug #881350

Client tries to load unit into enemy one instead of attacking it

Added by Alexandro Ignatiev about 2 years ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Category:
Client
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Bug in logic of
request_move_unit_direction() in client/control.c: if the destination tile is non-native, the client calls request_transport() and does anything else only if it fails. But this function in client/*/transportdlg.c checks only if there a unit type on the tile capable of transporting the unit, not if the unit actually can load into anything on the tile. For certain AttackNonNative units this situation leads to attempt boarding enemy ships instead of attacking them. Noticed by Wahazar

client-dont-board-unboardable.patch (5.27 KB) client-dont-board-unboardable.patch Alexandro Ignatiev, 2020-07-15 08:29 PM
2-6-client-dont-board-unboardable.patch (5.17 KB) 2-6-client-dont-board-unboardable.patch Alexandro Ignatiev, 2020-07-16 05:27 PM

History

#1 Updated by Alexandro Ignatiev about 2 years ago

A patch that should resolve it, at least works for 2.6 gtk3(.22) and qt

#2 Updated by Alexandro Ignatiev about 2 years ago

umm the could_unit_load already checks free place in the transport, and allied players we already have tested... But the other checks make some sense. (Btw, do I see recursively transported units of allies of my ally who are not my allies?..)

#3 Updated by Alexandro Ignatiev about 2 years ago

The simpler patch (for v.2.6), most of could_... logic is rarely different from can_..., keep current possibilities.

#4 Updated by Marko Lindqvist almost 2 years ago

I wonder if the check against non-allied tile should be added to transporter_for_unit_at() -> could_unit_load(). It already does transport tile checking to make sure that un-embarkable transport is in a city or native base.
Then the transportdlg code would only need to add check for not finding best_transport with transporter_for_unit_at().

Am I missing something?

#5 Updated by Marko Lindqvist over 1 year ago

  • Sprint/Milestone changed from 2.6.3 to 2.6.4

#6 Updated by Marko Lindqvist over 1 year ago

In later branches action enablers for boarding and attacking may have changed the situation. Can Sveinung have a look of this issue in general?

#7 Updated by Marko Lindqvist over 1 year ago

  • Assignee set to Sveinung Kvilhaugsvik
  • Sprint/Milestone changed from 2.6.4 to 2.6.5

#8 Updated by Marko Lindqvist about 1 year ago

Marko Lindqvist wrote:

Can Sveinung have a look of this issue in general?

Any progress?

#9 Updated by Marko Lindqvist about 1 year ago

  • Sprint/Milestone changed from 2.6.5 to 2.6.6

#10 Updated by Marko Lindqvist 8 months ago

  • Sprint/Milestone changed from 2.6.6 to 3.0.1

#11 Updated by Marko Lindqvist 4 months ago

  • Sprint/Milestone changed from 3.0.1 to 3.0.2

#12 Updated by Marko Lindqvist 2 months ago

  • Assignee deleted (Sveinung Kvilhaugsvik)
  • Sprint/Milestone changed from 3.0.2 to 3.0.3

#13 Updated by Marko Lindqvist about 2 months ago

Can Alexandro have a look how all this works in current branches?

#14 Updated by Alexandro Ignatiev about 2 months ago

Marko Lindqvist wrote:

Can Alexandro have a look how all this works in current branches?

Could not reproduce the bug in 3.0. Likely, it's gone.

#15 Updated by Marko Lindqvist about 2 months ago

  • Status changed from New to Closed
  • Assignee set to Marko Lindqvist

Alexandro Ignatiev wrote:

Marko Lindqvist wrote:

Can Alexandro have a look how all this works in current branches?

Could not reproduce the bug in 3.0. Likely, it's gone.

Thanks.

Closing.

Also available in: Atom PDF