Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2000:
[Freeciv-Dev] diplomatic states bug
Home

[Freeciv-Dev] diplomatic states bug

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] diplomatic states bug
From: Thue Janus Kristensen <thue@xxxxxxx>
Date: Sun, 28 May 2000 21:10:48 +0200

Hmm.

A players state array should be
MAX_NUM_PLAYERS+MAX_NUM_BARBARIANS
not MAX_NUM_PLAYERS as it is now.
I am not sure excactly how, but this caused corruption of the player unit
list in one case, and various other strange bugs. (the unit list is just
after the state array in the player struct).
Also, the reconfiguring of states at the removal of a player was one off.
When I made that I must have been cheated by the renumbering of embassies,
which were also one off :) (this bug comes all the way from 1.10)

Since the removal of players can leave a struct with values behind that
can be used later when a player is split in a revolution or a barbarian
player is created I also made sure to reset the state info in these cases.
I also noted that embassies were not removed when a barbarian player was
created, which I also corrected. (Maybe we should call init_player() in
these cases?)

-Thue

Attachment: dipl_oups.diff
Description: Text Data


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] diplomatic states bug, Thue Janus Kristensen <=