wesnoth-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Wesnoth-dev] Problems with droid


From: ott
Subject: Re: [Wesnoth-dev] Problems with droid
Date: Tue, 28 Jun 2005 14:54:13 +0200
User-agent: Mutt/1.5.6i

On Mon, Jun 27, 2005 at 10:56:20AM -0400, John McNabb wrote:
> I am not sure when exactly this was put
> into place, thus breaking the ability to do an AI walkthrough.

According to cvs annotate and cvs diff, this code was introduced in April
2004, playlevel.cpp 1.107, and your droid code was working early 2005,
so perhaps this particular section of code is not wholly responsible
for breaking droid mode.

Droid controllers should not be regarded as observers, so the change
seems to make sense anyhow.

> My only concern is that it might break multiplayer
> observors somehow
> 
> -                       if(i->is_human()) {
> +                       if(i->is_human() || i->is_persistent()) {

At first glance, is_ai() would seem to be the right test instead of
is_persistent().  Your code in playturn.cpp that handles the "droid"
command uses make_ai() to set the same variable that is checked
by is_ai().  In addition, is_human() seems to imply is_persistent()
so the above should perhaps just be if(i->is_persistent()), though I'm
not sure exactly when is_persistent() will be set to true.

For reference for the archives, if the WML key "persistent" is "1" it
will stay "1", but the only way it can be set to "1" is through the
controller being human or through a WML file.  See the forum thread
http://www.wesnoth.org/forum/viewtopic.php?t=3944 where this was
originally discussed.

-- address@hidden




reply via email to

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