Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2002:
[Freeciv-Dev] Re: stop ai from building useless buildings (2) (PR#1362)
Home

[Freeciv-Dev] Re: stop ai from building useless buildings (2) (PR#1362)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: stop ai from building useless buildings (2) (PR#1362)
From: Markus Linnala <maage@xxxxxxxxx>
Date: 07 Apr 2002 14:01:49 +0300
Reply-to: Markus Linnala <maage@xxxxxxxxx>

"Per I. Mathisen" <Per.Inge.Mathisen@xxxxxxxxxxx> writes:

From: server/mapgen.c
/**************************************************************************
 Assign continent numbers to all tiles.
 Numbers 1 and 2 are reserved for polar continents if
 map.generator != 0; otherwise are not special.
 Also sets map.num_continents (note 0 is ocean, and continents
 have numbers 1 to map.num_continents _inclusive_).
 Note this is not used by generators>1 at map creation
 time, as these assign their own continent numbers.
**************************************************************************/

> diff -u3NrX /home/perrin/freeciv/diff_ignore freeciv/ai/advdomestic.c 
> freeciv-phased/ai/advdomestic.c
> --- freeciv/ai/advdomestic.c  Mon Mar 25 23:26:02 2002
> +++ freeciv-phased/ai/advdomestic.c   Fri Apr  5 22:17:10 2002
> @@ -31,6 +32,179 @@

> +  pplayer->ai.eval_continents = 
> +      fc_calloc(map.num_continents, sizeof(bool));

This should be

> +  pplayer->ai.eval_continents = 
> +      fc_calloc(map.num_continents + 1, sizeof(bool));

-- 
//Markus


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