The online racing simulator
Is_plp
(14 posts, started )
Is_plp
The IS_PLP packet is not sent when a driver enters the garage when at the "multiplayer lobby" screen. The IS_NLP gets fired as expected, but not the IS_PLP.
But why would you need the PLP Packet in the lobby screen?
So that you know when someone goes into the garage!

As an example, I have scripts that whenever you join, i.e. when the IS_NPL is sent, that check to see if you are in the right car and have the right handicaps. Those scripts are to stop if you a) spectate which you can tell when a IS_PLL packet and b) if you go to the garage/pits which is the IS_NPL packet.

Both work prefectly well when "in game", but when in the lobby screen you never get the IS_NPL packet so you don't know the player as entered the garage so the scripts continue because they haven't been told to stop.

Quote from GeForz :But why would you need the PLP Packet in the lobby screen?

But in the Lobby screen nobody is driving?
#5 - nikka
Quote from Hollywood :So that you know when someone goes into the garage!

As an example, I have scripts that whenever you join, i.e. when the IS_NPL is sent, that check to see if you are in the right car and have the right handicaps. Those scripts are to stop if you a) spectate which you can tell when a IS_PLL packet and b) if you go to the garage/pits

Uhm, why don't you just check the NPL packet, and then stop the script?
Because I don't want the script running while they are in the pits/garage menu... simple enough.

The NPL does not get fired until they leave the garage so that does not do any good as far as stopping scripts. Its the event that is used to start the scripts up.

Quote from nikka :Uhm, why don't you just check the NPL packet, and then stop the script?

And GeForz, it does not matter if they are driving or not; they still entered the pits/garage menu.
#7 - nikka
Quote from Hollywood :Because I don't want the script running while they are in the pits/garage menu... simple enough.

The NPL does not get fired until they leave the garage so that does not do any good as far as stopping scripts. Its the event that is used to start the scripts up.

OK. I don't know excactly what your script does or how it works so I really cant say how to solve it... but I'm pretty sure it could be solved without a "lobby screen" PLP packet.
No nikka, it can't.

Not having a PLP packet in the lobby screen is a InSim bug, period. All other connection packets, i.e. connection enter/leave, player enter/leave work as expected. The IS_PLP does not, therefore it is a bug.

Quote from nikka :OK. I don't know excactly what your script does or how it works so I really cant say how to solve it... but I'm pretty sure it could be solved without a "lobby screen" PLP packet.

Quote from Hollywood :No nikka, it can't.

Not having ca PLP packet in the lobby screen is a InSim bug, period. All other connection packets, i.e. connection enter/leave, player enter/leave work as expected. The IS_PLP does not, therefore it is a bug.

What I mean is: If a player is spectating (== not driving) you do not get a PLP packet when the spectating player goes into the pit screen. So why would you want a PLP packet for a driver sitting in the lobby (== not driving)?

And referring to your example:
Quote :As an example, I have scripts that whenever you join, i.e. when the IS_NPL is sent, that check to see if you are in the right car and have the right handicaps. Those scripts are to stop if you a) spectate which you can tell when a IS_PLL packet and b) if you go to the garage/pits which is the IS_NPL packet.

Why do they have to run alle the time between a NPL and a PLP packet? They don't change without a new NPL (exiting pits)?
Quote from Hollywood :No nikka, it can't.

Not having a PLP packet in the lobby screen is a InSim bug, period. All other connection packets, i.e. connection enter/leave, player enter/leave work as expected. The IS_PLP does not, therefore it is a bug.

Hm, bug or not, I don't know.. because as GeForz said, no PLP is sent when going from spectated to pit. I believe it's intentional, because "PLP" means a player keeps his position in race, but when spectated (or in "lobby screen"), there is no position to keep.

But a workaround: When the game goes to "lobby screen", the ISS_GAME bit in STA.Flags gets set to 0. (actually I thought the ISS_FRONT_END bit would get set, but it doesnt.. hm.. bug? Or what's the meaning of this bit?).
So you can detect the game going to "lobby screen" by looking at that bit, and then consider all drivers as pittet, because a NPL is sent when a player joins the game again. Would that work for you?
If you are spectated you do not have a player, so that makes sense. However, once you join (whether or not you are in the lobby or not) you have a player id. Therefore not getting the IS_NLP is a bug especially since when you do leave the pits/garage you get the IS_NPL packet (with of course the same player id).

ISS_FRONT_END is the main screen of the game, not the multiplayer lobby screen. It'd be nice if the status had a bool on it that let you know you were in the lobby screen.

And no, that doesn't work. Because the lobby screen is really when I want the scripts running so that when a player joins they get car and handicapped checked. That way when everyone is ready and the race starts, we know that everyone is in the right car with the right handicaps.


Quote from nikka :Hm, bug or not, I don't know.. because as GeForz said, no PLP is sent when going from spectated to pit. I believe it's intentional, because "PLP" means a player keeps his position in race, but when spectated (or in "lobby screen"), there is no position to keep.

But a workaround: When the game goes to "lobby screen", the ISS_GAME bit in STA.Flags gets set to 0. (actually I thought the ISS_FRONT_END bit would get set, but it doesnt.. hm.. bug? Or what's the meaning of this bit?).
So you can detect the game going to "lobby screen" by looking at that bit, and then consider all drivers as pittet, because a NPL is sent when a player joins the game again. Would that work for you?

Quote from Hollywood :If you are spectated you do not have a player, so that makes sense. However, once you join (whether or not you are in the lobby or not) you have a player id. Therefore not getting the IS_NLP is a bug especially since when you do leave the pits/garage you get the IS_NPL packet (with of course the same player id).

But you DO get a NPL in lobby screen! When you click the "join race" button, a NPL is sent...

Quote from Hollywood :ISS_FRONT_END is the main screen of the game, not the multiplayer lobby screen. It'd be nice if the status had a bool on it that let you know you were in the lobby screen.

Hm? If you are in the main screen you have left the server, and there is no way your app can detect that (since youre not connected to the server running the app anymore).. unless you are talking about a app running on your local computer (ISF_LOCAL), but I don't get that bit set then either.. actually, I have never been able to get that bit set, neither in local mode nor server mode... And I'm pretty sure that bit is supposed to mean youre in what you call "lobby screen", because if you read insim.h it sais
"#define ISS_FRONT_END 256 // entry screen"
and "entry screen" is what you call "lobby screen" (at least I think so).

Quote from Hollywood :And no, that doesn't work. Because the lobby screen is really when I want the scripts running so that when a player joins they get car and handicapped checked. That way when everyone is ready and the race starts, we know that everyone is in the right car with the right handicaps.

Well, if a player joins the race in "lobby/entry screen" you get a NPL.. so you can check that then. I don't see the problem, sorry
Quote from nikka :But you DO get a NPL in lobby screen! When you click the "join race" button, a NPL is sent...

Yes, thats what I said. You also get one when you leave the pits/garage.

Yes, I noticed. I wasn't really asking for help, I was making a note that the PLP packet was not being sent when someone enters the pits/garage while the game is at the multiplayer lobby screen. This is the issue.

Quote :
I don't see the problem, sorry

Quote from Hollywood :ISS_FRONT_END is the main screen of the game, not the multiplayer lobby screen. It'd be nice if the status had a bool on it that let you know you were in the lobby screen.

Aha. Tested some more, and you're absolutely right.. sorry I missed that one. I've totally misunderstood the meaning of "entry screen", I always thought "entry screen" was what you called "lobby screen"..

A lobby-screen flag for local apps would be nice too, indeed.
Alhough the ISS_GAME flag works for server apps.

Is_plp
(14 posts, started )
FGED GREDG RDFGDR GSFDG