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 #764968

Players that start game in contact cannot meet if one is AI

Added by Jacob Nevins almost 3 years ago. Updated about 1 month ago.

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

0%

Estimated time:

Description

Originally reported on wiki by Robin Patterson:
https://freeciv.wikia.com/wiki/Forum:Bug_-_initial_dispersion_meets_other_nation's_unit

When you choose an initial dispersion greater than zero, you run the risk of having one of your units placed right next to a unit of another nation. When that happens, you are at war and cannot make peace - "Diplomacy - Meet" is clickable but it produces no diplomacy screen. So you are perpetually at war with that nation (until one or other of you is eliminated).
I hope someone can fix this bug. To see it in action, choose a small map and large number of nations and maximum dispersion (10).

I've reproduced the inability to get a treaty screen in a single-player game. I think the problem might be that AI already initiated diplomacy (offering a cease-fire) but it was too early for the client, or something; saving and reloading, the client pops up diplomacy dialogs.

History

#1 Updated by Jacob Nevins almost 3 years ago

At the time the client receives PACKET_DIPLOMACY_INIT_MEETING and calls popup_diplomacy_dialog(), can_client_issue_orders() is returning FALSE, because client_state() is still C_S_PREPARING, because PACKET_START_PHASE (which puts the client into C_S_RUNNING) isn't received until later.

(There are a number of things which seem to go wrong like this at game start -- messages that would normally appear on the Messages tab appearing in the chat log, etc. Does the client need to go to C_S_RUNNING earlier?)

#2 Updated by Jacob Nevins almost 3 years ago

If the server thinks there's already a treaty when the client sends it INIT_MEETING_REQ (which is what the "Meet" button does), via find_treaty(), it just does nothing (in handle_diplomacy_init_meeting_req()).

#3 Updated by Jacob Nevins almost 3 years ago

  • Subject changed from Players that start game in contact cannot meet to Players that start game in contact cannot meet if one is AI

#4 Updated by Jacob Nevins almost 3 years ago

I think the call stack for initiation of the problematic treaties will be

init_new_game
place_starting_unit
create_unit
create_unit_full
maybe_make_contact
make_contact
call_first_contact
dai_diplomacy_first_contact
dai_diplomacy_suggest

#5 Updated by Marko Lindqvist over 1 year ago

Server on the other hand is already in S_S_RUNNING, so this cannot, like I hoped, to be solved by moving initial contact establishment until server enters S_S_RUNNING.

#7 Updated by Marko Lindqvist about 1 month ago

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

Also available in: Atom PDF