Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2001:
[Freeciv-Dev] Re: Reproducable core dump (PR#1051)
Home

[Freeciv-Dev] Re: Reproducable core dump (PR#1051)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx, freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Reproducable core dump (PR#1051)
From: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Date: Thu, 29 Nov 2001 13:43:53 +0000 (GMT)

 --- jdorje@xxxxxxxxxxxxxxxxxxxxx wrote: 
> Gregory Berkolaiko wrote:
> > 
> > Exactly.
> > But Raimar is right, it would be good to make it a constant,
> something
> > AIR_ASSUMES_UNKNOWN_SAFE
> > and
> > AIR_ASSUMES_FOGGED_SAFE
> 
> 
> I'm not too happy with adding constants up in a header file that will 
> only be used in this one function.  If it's the preferred way to do 
> things, though, I'll do it.  Where would the enumeration be placed?

I got the impression that Raimar favours the idea of adding constants. 
So maybe just to please him ;)

Jokes aside, these same constants would be used in
find_the_shortest_path, maybe in some other places too, dunno yet.

> > We should also introduce a check for ai.control: if the plane is
> > controlled by AI (which doesn't happen now but will be surely added
> at
> > some point), it wouldn't care if the tile is not seen -- AI cheats
> and
> > peeks under fog.
> > But for that we should also introduce a constant
> > AI_SEES_ALL
> > and later it should probably become a variable in struct player.
> 
> 
> This I disagree with.  True, the current AI cheats by looking under the
> fog of war, but isn't that something to fix rather than promote?

if we strip AI of this cheat it will become pathetically stupid I am
afraid.

> If you must go this route, one idea would be to add a new server 
> variable, aicheats, that is user-settable.  Enabling it would up the 
> difficulty.  But I don't think any of the AI's (no matter how
> difficult) should cheat by default.

Tony says look up ai_handicap()
Raimar says see
  http://www.freeciv.org/lxr/source/common/player.h?v=cvs#L32
what can I add?  only that I think H_MAP looks to be the correct one,
but the comment there is not that clear...

[..]
> The implementation of the function is unnecessarily verbose, but since 
> it's so short anyway I don't consider that a problem.  The important 
> thing is that the logic be clear.  Should I shorten it into one long 
> "if" statement?

as you wish

> If AIR_ASSUMES_UNKNOWN_SAFE is used, how can we differentiate between 
> land and sea tiles?

1. I don't think we should differentiate.  Too much bother for something
that isn't neccesarily good.
2. It would be quite difficult to tell whether an unknown tile is land or
sea.

> > /* Planes _always_ use SINLGE_MOVE a time so here we can just use 1
> > instead of SINGLE_MOVE */
> 
> Wait, is SINGLE_MOVE 1 for planes?  Should I use that instead?

SINGLE_MOVE is 3 for everyone.
you can use SINGLE_MOVE but you would have to multiply map_distance by
SINGLE_MOVE too then.  Which is a completely unnecessary operation.


> I'll make another patch as soon as we decide these issues.

Sure.  Are you in the States btw?  You mail-checking times are weird.

G.


__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page from News and Sport to Email and 
Music Charts
http://uk.my.yahoo.com


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