Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: Dangerous danger2
Home

[Freeciv-Dev] Re: Dangerous danger2

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Paul Zastoupil <paulz@xxxxxxxxxxxx>
Cc: rf13@xxxxxxxxxxxxxxxxxxxxxx, Paul Zastoupil <paulz@xxxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Dangerous danger2
From: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Date: Fri, 19 Oct 2001 22:41:02 -0400

That is what it is ... spam.

The AI panic feelings grow exponentially when estimating danger. It
is not a particularly brilliant algorithm.

But it really doesn't matter, after a certain point it can't scream
any louder and just continues. The "warning" rather than error, is
just telling you that screams were muffled to stop overflow.

It is likely that it threw all its money at building a CITY_WALLS or
in this case COASTAL with no units inside to act as multiplier, or 
something equally stupid. But that is another problem :-).

Cheers,
RossW
=====

At 09:54 AM 01/10/19 -0700, Paul Zastoupil wrote:
>On Fri, Oct 19, 2001 at 09:22:31AM +0200, Raimar Falke wrote:
>> On Thu, Oct 18, 2001 at 05:51:20PM -0700, Paul Zastoupil wrote:
>> > I was playing out a long game (yes, I was actually playing a game of
>> > Freeciv) and I got a bunch of server spam:
>> > Dangerous danger2 (%d) in %s.  Beware of overflow.
>> > 
>> > Its from "ai/advmilitary.c" line 377 of 1101
>> > 
>> > int danger2 = 0; /* linear for walls */
>> > <lots of stuff>
>> > if (!igwall) danger2 += v * m / dist;
>> > <lots of stuff>
>> > if (!igwall) danger2 += v * m / dist;
>> > <lots of stuff>
>> > if (danger2 < 0 || danger2 > 1<<24) /* I hope never to see this! */
>> >   freelog(LOG_ERROR, "Dangerous danger2 (%d) in %s.  Beware of
overflow.",
>> >   danger2, pcity->name);
>> > 
>> > 
>> > I didn't really research it much more than that (come on, I know better
>> > than to go digging in the AI code).  Anyone still alive that understands
>> > this code?
>> 
>> As it says it is a check for overflow.
>> 
>> > Save game is available upon request.
>> 
>> If it is reproduceable from the savegame, post it here or mail it to
>> me.
>
>ftp://ftp.freeciv.org/freeciv/incoming/dangerous.gz
>
>Connect as Elros and start.
>
>-- 
>Paul Zastoupil
>
>



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