Complete.Org: Mailing Lists: Archives: freeciv-ai: September 2004:
[freeciv-ai] (PR#10301) cachemap is way too big
Home

[freeciv-ai] (PR#10301) cachemap is way too big

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [freeciv-ai] (PR#10301) cachemap is way too big
From: "Guest" <rt-guest@xxxxxxxxxxx>
Date: Wed, 29 Sep 2004 14:21:35 -0700
Reply-to: rt@xxxxxxxxxxx

<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.
> 
> jason
> 
I don't have time to test, but it needs checking: Does this change
break human autosettlers?


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