Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2000:
[Freeciv-Dev] Re: Warning fixes for server/settlers.c
Home

[Freeciv-Dev] Re: Warning fixes for server/settlers.c

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Warning fixes for server/settlers.c
From: Jeff Mallatt <jjm@xxxxxxxxxxxx>
Date: Mon, 07 Aug 2000 08:43:18 -0400

At 2000/08/05 08:00 , Dirk Stoecker wrote:
>Joined ii,jj and rd,te variables as they are used linear and the pos values
>can be overwritten. Saves some stack space also (24*sizeof(int) = 96 byte
>on my machine).

I don't like using the same variable for different things.

>Here is a possible bug.
>
>The first one is related to ai_calc_pollution, where it read in line 510.
>  m = (m + best + 50) * 2;
>
>Function ai_calc_fallout is equal to this one, but uses pplayer argument as
>it preceeds that line with:
>
>  if (!pplayer->ai.control)
>    m = (m + best + 50) * 2;
>
>So either my remove of pplayer is correct, as it is not needed or the if
>must be added in ai_calc_pollution also and the pplayer argument is needed.

This is all intentional.  Don't remove pplayer from any of the ai_calc_*()
routines.

jjm




[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: Warning fixes for server/settlers.c, Jeff Mallatt <=