For lazy people who dont want to click in the link in my above post, this is what nikka wrote:
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.
It would be nice if we could be able to know what cars are under yellow. Right now its possible to know which car is causing it, but not which are under.
Would be useful to enforce 'no passing under yellow' rules, among other things.
EDIT:
- Add session start time to IS_STA, as datetime (8 bytes), or new requestable packet (IS_SSN, session info), though a lot of info would be already included in IS_STA.
Last edited by BurnOut69, .
Reason : Added session start info suggestion
Oh yes, it would be very easy to add, and I guess you make this assumption based on your total ignorance of LFS internal structure and/or programming?
Every time I see someone saying "add this I bet it takes 5 minutes" I find it 'funny', only Scawen knows what it takes and if it was very easy or it would take 5 minutes it would be already in, dont you think?
EDIT: On topic, +1 for the idea of a list of favourite servers.
I tried parsing the same replay with the same insim engine but in an app without UI and it seems to work properly, so I think the problem is definitely in my side, and that the bottleneck happens when the UI updater cant keep with the amount of packets received.
I'll keep testing and post here if I discover something wrong.
Thanks for your reply, re-reading my msg I wasnt very informative: it is LFS who is showing that message in big red letters, not my program, so theres not much I can do AFAIK.
Process is:
- Start my program (C#)
- Start LFS and open the insim port
- Go to replay/mpr/select a replay with lots of action (27 drivers)
- Everything seems to be working for about 45 seconds
- LFS shows INSIM ERROR: WOULD BLOCK - My app times out and LFS frame rate drops to 5, I have to restart both LFS and my program.
I assume Scawen is showing the exception message as last resort in the case of unexpected socket exceptions, but I'd love to know if its my program who is causing it and why
OK, I understand it now: you want to track the position of every car at any given moment, so the standings dancing at the end of the race in the scenario you described would mess up your positions chart.
How about this: Even if you get MCIs before RES, you have the MCI.node in which the car is, so you can check if the current node is after the finish line. In that case you would just ignore that position info.
Right, I wouldnt rely on that either, specially with UDP. But keep in mind that I was talking about locking the position with the ResultNum of the IS_RES packet, thats the guaranteed confirmed position of the car, so there shouldnt be a problem locking position with that value
Well, to keep getting MCIs every X milliseconds only to be discarded seem like a waste of bandwidth and CPU for me. Yes, its no big deal to solve the problem, but even better than solving a problem is not having it