Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2003:
[Freeciv-Dev] (PR#3524) another look at the goto_dest problem
Home

[Freeciv-Dev] (PR#3524) another look at the goto_dest problem

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#3524) another look at the goto_dest problem
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 15 Jul 2003 09:00:32 -0700
Reply-to: rt@xxxxxxxxxxxxxx

[jdorje - Wed Feb 26 08:50:45 2003]:

> This patch aims to just fix the initialization problem.  It introduces 
> wrapper macros: set_goto_dest, clear_goto_dest, is_goto_dest_set, 
> goto_dest_x, and goto_dest_y.  These can be used to save a little bit of 
> code, but more importantly to avoid having to change all the callers 
> when the goto_dest structure changes.

Here's an updated and slightly changed version of the patch.

I've moved the asserts into the goto_dest_x and goto_dest_y macros. 
This makes things easier for callers.  I also cleaned up the
ai_manage_ferryboat bits a little.

Under the patch an autogame is faster but savegames differ.  This is to
be expected - since we no longer take goto actions when there is no goto
target some bugs should be fixed and less execution is necessary.

Overall I think this is a big step forward.  Making it clear when there
is a goto destination and when there isn't is a substantial improvement
for the goto code.  Up until now it's just been guessing.  And the
assertions introduced may help to catch many future bugs.  In short, I'd
really like to see this go in.

jason

Attachment: is_goto_dest_set-3.diff
Description: is_goto_dest_set-3.diff


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