Complete.Org: Mailing Lists: Archives: freeciv-ai: August 2004:
[freeciv-ai] Re: aiair uses set_unit_activity() directly
Home

[freeciv-ai] Re: aiair uses set_unit_activity() directly

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Jason Dorje Short <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Cc: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] Re: aiair uses set_unit_activity() directly
From: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxxx>
Date: Tue, 31 Aug 2004 16:49:15 -0500 (CDT)

On Mon, 30 Aug 2004, Jason Dorje Short wrote:

> One idea is to change code in the handle_* functions from
> 
>    if (!normalize_map_pos(&x, &y)) return;
> 
> to
> 
>    if (!normalize_map_pos(&x, &y)) {
>      assert(pplayer->conn != NULL);
>      return;
>    }

Maybe it's easier to pass bool force_sanity to handle_* functions and do
    if (!normalize_map_pos(&x, &y)) {
      assert(!force_sanity);
      return;
    }

But also would be better to separate all sanity checks into separate 
functions in common so AI and server and client can use them



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