[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]
[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
is_goto_dest_set-3.diff
Description: is_goto_dest_set-3.diff
- [Freeciv-Dev] (PR#3524) another look at the goto_dest problem,
Jason Short <=
|
|