Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2002:
[Freeciv-Dev] do barbarians get science? (was: civserver segfault with n
Home

[Freeciv-Dev] do barbarians get science? (was: civserver segfault with n

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Freeciv Developers <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] do barbarians get science? (was: civserver segfault with new research system (PR#1221))
From: Reinier Post <rp@xxxxxxxxxx>
Date: Thu, 17 Jan 2002 11:34:11 +0100

On Thu, Jan 17, 2002 at 02:56:35AM -0500, Justin Moore wrote:

> matthews:~/compile/freeciv/common$ grep barbarian *.c | wc
>      19      90    1044
> matthews:~/compile/freeciv/common$ cd ../server/
> matthews:~/compile/freeciv/server$ grep barbarian *.c | wc
>     179    1000   11145
> matthews:~/compile/freeciv/server$

A hardcoded is_barbarian property is infinitely better than having no
barbarians at all.  It makes sense that it's the AI code which suffers most
from barbarians.

> I'm simply proposing to move the special case handling to a slightly more
> effective place (I think), given the current setup.  For a real nightmare,
> check out server/stdinhand.c.

stdinhand.c is the only part of the code I'm familiar with, it has a
lot of duplication but it's quite systematic.  Best of all: it only
has 3 barbarian tests :-)

> I think a total AI/server separation is
> futile given the codebase and other influencing factors.

It would take a while.
 
>    Seriously, though, where could one quickly and easily check and make
> sure a barbarian city (or anywhere else) wasn't producing any bulbs?

Don't.  Make a ailevel-related variable ai_science_want, set it to 0
for barbarians, and use it in ai_manage_taxes:

  http://www.freeciv.org/lxr/source/ai/aihand.c?v=cvs#L145

-- 
Reinier


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