[freeciv-ai] (PR#10301) cachemap is way too big
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=10301 >
> [jdorje - Wed Sep 29 05:02:26 2004]:
> The bug here is pretty significant too. auto_settlers_player is called
> twice: once in auto_settlers_init and again in srv_main.
> ai_settler_init, which must be called before auto_settlers_player, is
> not called until after auto_settlers_init. Thus the autosettlers is run
> twice, and on the first run its cachemap is not initialized.
> So, in this patch:
> - I change the cachemap to be dynamically allocated. It is realloc'ed
> in ai_settlers_player.
> - I removed the first call to auto_settlers_player (the one in
> init_auto_settlers). Now the function is only called once, and it's
> done after ai_settler_init.
I don't have time to test, but it needs checking: Does this change
break human autosettlers?