The online racing simulator
Determining whether you are spectating [SOLVED]
I'm trying to determine whether my client is spectating or not and all I figure out is a roundabout way of tracking connections and players and it still requires non-insim knowledge about the client. This goes hand in hand that State doesn't just tell you your playerId or connectionId either.

Basically, all I can figure is that if I know my playername, i can request all playerinfo and also listen for players joining. If i see myself listed or joining, that's my playerId and i'm not spectating. If i see that playerId leaving, I know i'm spectating now.

Of course, there's the catch-22, that i can't find out my playername without knowing my playerId or connectionId.

Is there some information I'm overlooking?

If no one else has a solution, I'd would like to request that IS_STA uses one of it's Spare's to report the connectionId and/or playerId
I don't think IS_STA packet is connection or player based, its server based rather.

Can you request a single player's info?

In my testing whenever a player spectates, an IS_PLL packet is sent. If the connection has not received an IS_CPL packet then its still connected to the server, so therefore is spectating.

Perhaps an IS_SPC packet that says when a connection spectates could be sent?
Quote from Hollywood :I don't think IS_STA packet is connection or player based, its server based rather.

Can you request a single player's info?

In my testing whenever a player spectates, an IS_PLL packet is sent. If the connection has not received an IS_CPL packet then its still connected to the server, so therefore is spectating.

Perhaps an IS_SPC packet that says when a connection spectates could be sent?

IS_STA is LFS instance based, which could be either a server or a client. All tracking packages are sent by all LFS instances, i.e. if i start up lfs, connect to it locally and then connect to the server, i still get all race tracking packages, so i can't tell if that IS_PLL is me or someone else

An IS_SPC wouldn't help, since i still wouldn't know my connection Id.
#4 - Mako.
May I please ask just what you guys are talking about???
You don't need to know your id or playername to "see yourself joining".

struct IS_NPL // New PLayer joining race (if PLID already exists, then leaving pits)
{
...
byte PType; // bit 0 : female / [B]bit 1 : AI / bit 2 : remote[/B]
...
};

Said that. You know your connection ID (and player/username!) by looking at the NCN Packets which you can request and which also have a remote-flag
Quote from GeForz :
struct IS_NPL // New PLayer joining race (if PLID already exists, then leaving pits)
{
...
byte PType; // bit 0 : female / [B]bit 1 : AI / bit 2 : remote[/B]
...
};

Said that. You know your connection ID (and player/username!) by looking at the NCN Packets which you can request and which also have a remote-flag

Doh. I completely forgot about that flag, and yes it works exactly as advertised. Thanks!
Quote from Mako. :May I please ask just what you guys are talking about???

I was trying to write some InSim code that could tell me whether my current client was in the race or spectating, which can be done if you know your connectionID and you look to see if you find yourself (and not as an AI) in the player roster. I just couldn't figure out how to get my connectionId until GeForz reminded me about the remote flag in IS_NCN.

FGED GREDG RDFGDR GSFDG