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.
Just in case you didn't know, there is a bug in the compcar struct when a player is in pit, so you shouldnt rely on the compcar.Info alone.. http://www.lfsforum.net/showthread.php?t=28061
Hey all, old thread, but I got the excact same problem..
If I send SCH 'h' to LFS, it turns on my right indicator.. but when I press 'h' in LFS, the history list is enabled/disabled, just as it's supposed to do. To turn on the right indicator, I have to press '8'... (and yes, I know the SCH 'h' is recieved as a 'h' in LFS, cause if I open the chat window before I send it I can see a 'h' being written)
The same for all other keys I try to send... they are recieved correctly in LFS, but are interpreted totally wrong. Is it just me, or is something very wrong?
Well, if it is supposed to be controlled by an admin (or two..), then why just don't use the /p_?? command to give a penalty, or /spectate to spectate him? Or ban or kick him as speedway said.
Just FYI: This algorithm didn't work for me at all, dunno why.
But I searched the net and found this algorithm.. (look at "Code Sample"). The "polygon" in my case is simply a rectangle (the car).
This seems to be spot on... tested with the UF1, and it's close to 90% perfect, the reason why it's not 100% is because it's hard to find the excact length and width of the car, and where the "centre" x,y of the car (reported by mci) is. I assumed it was in the middle of the car, but not sure if that's right
Anyways, for my app this is good enough. I was looking for a way to detect contact between UF1 at relative slow speeds, and that's what I got. So I'm happy.. for now
But does anyone know the excact length and width of all or some cars? And where the centre point of the cars are located? I've only figured out the UF1, and the length seems to be 2,84 meters and width 1,47 meters, but I doubt these are the excact figures.
But there is one big problems with using the "rectangle-overlap-detection" method only, and that is the rate of the MCI packets. With shortest delay (50 ms) and 32 cars on track (4 packets between each cars MCI), you get a 200 ms interval between one cars MCI... so when cars are moving fast, a lot of things can happen in 200 ms that this method wont detect.
Also there could in theory be up to 100 ms between two close cars' MCI packets, so even though you detect overlapping rectangles, it doesn'h have to mean contact, it's just one car chasing another at high speed.
(and, but not that important, car sizes are not constant, a crashed car for example could be shorter than a repaired one)
So in addition to this method I guess I have to look at change in velocity and direction (as sdether mentioned), and maybe use that when cars are moving fast, and rectangle-overlapping for slow moving cars?
But thanks for pointing me in the right direction, more ideas and thoughts are more than welcome
I'm working on an insim app where I have to find a way to detect a collision or contact between cars. I assume this can be done by looking at mci packets and calculating distance between cars (using X and Y), but that will (for several reasons) never be 100% accurate (or at least thats what I think...).
I hate to re-invent the wheel, so have any of you done something like this already, and would like to share this with me?
Or would anyone of you like to help me out with this? Any ideas are more than welcome.
Or maybe even Scawen would be so nice to add a insim packet that notifies you when there is contact between two cars?
When a player is in pit (PLP), his MCI CompCar struct is set to 0, including Info byte.
So, if his CompCar is CCI_FIRST or CCI_LAST, this info is missing.
(yes, this one caused some brain twisting... )
Edit: Not entire struct is set to 0, PLID is still intact.
I'm really glad you took time to read, and understand, my post before replying...
So just because it's a feature YOU don't need, you're against it? It wouldn't hurt, would it?
Edit: WOOOW! a bit of pre-weekend-grumpyness there, Nikka? Go home, have a beer and relax in the sun!
(but i wont edit my reply cause I still think your post was rather stupid)
Usualy when my team is practicing for some event, we like to do it in qual-mode, cause then it's easier to keep track of each others best lap.
BUT. Maximum qual time is 60 minutes, and that is sometimes not enough. So my wish would be to either:
show the best lap time of each driver when in practice mode (just like in qual)
or:
have "unlimited" (or at least much longer than an hour) qualification length.
The former makes most sense, the latter is easier for Mr. Roberts to implement i guess. But either work.
Today (May 31st) it's 2 years since some morons raced in S1 demo, and thought it might be fun to put the tag "[noobs]" in front of their names. Since then more morons have come and gone, but the hard core of true noobs still remains.. (and the rest is history, yada yada yada)
Sooo, big party tonight! Bring your car, a sixpack of (non-alcoholic) beer, and obviously a NICE birthday present.
Starting in the "[noobs] jump!"-server at 20:00 CEST / 18:00UTC, and you'll never know where it goes from there. But expect some banger racing, ai challenge, some semi-serious racing at the classic [noobs]-combos, and more.
Well, I told you about my app. I just need an alternative way of handling stuff when a user is in a screen where buttons are invisible, so I need to know when the user is in such a screen.
And no, I don't expect people to "hang around" in these screens, I just want to cover every possible situation.
BTW, a typo in insim.txt (W28):
Should be "IS_BTC and IS_BTT" i guess.
Speaking of, I don't quite see the point with ReqI in button packets. ClickID is the identifier you should keep track of anyways, or am I missing something?
I need some way of knowing whether I'm in a screen where I can draw buttons or not (no use of drawing buttons if they're not visible).
Is this possible using excisting insim functionality?
Well, what i'm working on right now is an insim messenger client (will maybe make it a jabber client later if i'll ever bother).
I was planning to use the buttons to display people who are online (in messenger), so you can click the button to say something to someone, and also use buttons as a list of active conversations to make it easier to handle multiple ongoing conversations.
Obviously, it would be nice if you could chat with people when not connected (or in single player)... if someone say something to you when you're in the list-of-games-screen, it would not be very user friendly if you'll have to hurry up and join a host so you can reply...
But if it's just me, please don't hold back X for this.. I know you have alot of (more) important things to do. But anyways, thats why I need it
Before I knew the buttons were comming I was looking for a decent and non-messy way of solving this (handling multiple conversations and initiating conversations), and the buttons was a gift from above for my app.
But in my local computer-app (IS_BTN UCID=0), buttons are only visible when connected to a server, not in main menu, connection list screen and so on.. hopefully it's not intended to be this way since IS_MSL's for example are visible everywhere.
Edit: and uhm, shouldn't the buttons disappear when you close your insim app?
Edit again: omg, the thing with clicking the button to open a text input box... it's just awsome! Just what my app needed!
Edit III: would it be possible to add a "char TextCaption[20]" or something to IS_BTN to change the caption in the input box from "Edit" to something else?
MST ignore the '\n'-character, will MSL do the same? (will save some bandwith when you want to print many short lines if you can just send one MSL with \n in it)
And uhm, not sure if you have confirmed this (yes I did search), but will the programmable buttons be in X already?
And uhm (crap, stop the uhm'ing and behave like a grownup nikka!), I had a crazy idea.. how bout making separate text input boxes for /i and /o messages, you know, simular to the 't' input box? For example, you press.. uhm (doh!) 'i', a text input box appears, and the message you enter is sent to insim as a III.. and same for MSO_O ('o' or something) (maybe these text input boxes should be default disabled and have to be enabled via insim to stop confusing people if they hit the wrong key when they wanna type a message and writes it in the wrong text box).
Maybe this will just cause a lot of confusion. I dunno. Just a thought.
And speaking of IS_III, W24's insim.txt have a typo... I guess IS_III's Type should be ISP_III, not ISP_MSO (the comment).