Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2001:
[Freeciv-Dev] Re: Buggy Diplomatic State (PR#1146)
Home

[Freeciv-Dev] Re: Buggy Diplomatic State (PR#1146)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxx, Raimar Falke <rf13@xxxxxxxxxxxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Buggy Diplomatic State (PR#1146)
From: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Date: Thu, 20 Dec 2001 14:19:05 +0000 (GMT)

 --- Jason Short <vze2zq63@xxxxxxxxxxx> wrote: 
> Gregory Berkolaiko wrote:
> >
> >My opinion: delete the lines and see what breaks.
> >My bet: nothing breaks.
> >
> BTW: the patch works for me, too.  However, I am concerned about 
> removing lines that claim to need to stay :-).
> 
> >Can you trace a particular line in CVS somehow?
> >
> "cvs annotate savegame.c"

thanks.  it works but is not documented in man cvs.  damn I hate that!

> This shows that these lines were introduced by Thue on January 4th, 
> 2001.  The CVS log says:
> 
> "Make a small modification to the savegame handling so that loading and
> saving various parts of a game is conditional. This is usefull for a
> map editor."

True.  Further research reveals that on January 4th it was just
reformatting change.  The lines existed in this form from 1.1 revision
into which they were transported from gamehand.c ( function game_load()
).
In gamehand.c these lines were made into what they are in revision 1.80
with message
=======================
revision 1.80
date: 2000/08/03 15:16:44;  author: jjm;  state: Exp;  lines: +18 -5
Changed way in which AIs are forced into War at save-game load time.  No
longer call neutralize_ai_player() (calls handle_player_cancel_pact()),
which caused possible revolutions and called myrand() too early.
Bug reported by David Pfitzner <dwp@xxxxxxxxxxxxxx>.
=======================
Before 1.80 "forcing AI into war" was done in the form of
neutralize_ai_player() (which is still-existing function btw).

This neutralize_ai_player was introduced in 
----------------------------
revision 1.73
date: 2000/06/09 13:26:16;  author: thue;  state: Exp;  lines: +5 -0
Creates the DS_NO_CONTACT state. Treated like DS_WAR for AI purposes.
Moves DS_NEUTRAL from players_at_war to players_non_attack, ie you must
declaire war before you can attack.
Every time
-a unit moves
-a unit is created
-a city is created
it is checked if there is made contact. Each turn we also try to make
contact via the marco polo wonder.
----------------------------

So we can try contacting Thue or just delete the lines.

Quite a lot of research for a subject that unimportant...


I did more testing of the patch.
Saving, restoring, initialising of the game works fine.  Loading pre-made
maps works fine.  As a further bonus, you can hack the savegame and put a
couple of AIs into alliance and they will stay this way!

I really think these lines got to go...

G.

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com


[Prev in Thread] Current Thread [Next in Thread]