---------- Original Message ----------------------------------
From: Trent Piepho <xyzzy at speakeasy.org>
Reply-To: vanilla-list at us.netrek.org
Date: Wed, 9 May 2001 00:16:41 -0700 (PDT)

>On Wed, 9 May 2001, Steve Sheldon wrote:
>> > On Tue, 8 May 2001, Steve Sheldon wrote:
>> > > Sounded simple, but I cannot find a reliable way to determine
>> > on the client
>> > > if a player is an observer or not.
>> >
>> > There is a player flag, PFOBSERV, that observers get.  Can't you
>> > check that?
>> 
>> Have tried that.  Doesn't appear to be set reliably.  It either takes a long
>> time to update, or perhaps it's only updating for the connecting player.
>> Haven't examined why that is.
>
>It looks like it's never sent.  The code that sends flags has a mask of flags
>that get sent, whoever created the obs code didn't update this mask, so the
>obs flag is never sent.  I can change this, and it shouldn't effect any
>clients negatively.  COW even has code to check the PFOBSERV flag, which is
>strange.  Maybe someone added that and never bothered to test 
it.

That sounds likely.

>I see it also has a bug where it checks if a player's status is equal to
>PFOBSERV, which doesn't make sense since status is something like PFREE,
>PALIVE, etc. 0 to 4, while PFOBSERV is a flag bit, 0x8000000.

Ack!

>How?  The status value of POBSERVE is never seen outside the server, so how
>could it effect any clients?  I would think the code always uses the name
>POBSERVE and not a literal 5.


I'd say the better solution is fix this flags thing with PFOBSERV then.

Based on what James says, it sounds like changing POBSERV would break more than it fixes.