The online racing simulator
Searching in All forums
(9 results)
:)
LePimpMyRoller
S2 licensed
Sure it's very well done.
It's my technical play instinct . But you don't have an answer to my question, i fear :/.
IS_LAP packet issue
LePimpMyRoller
S2 licensed
I have some problems with the IS_LAP structure in my C# InSim-Application.
I get wrong laptimes from LFS.
For the 1st lap of a race i get for LTime and ETime a value around 16100 to 16800 (or so)
for each racer. On the other Laps there are the values for LTime not much different but for
ETime they look correct (ex. 1st Lap was 50 secs and the 2nd around 46, i think around 96000
look ok).
I tried it on several tracks, only with AI, as singleplayer with and without AI ... it's still
the same wrong values.
I also tried on my both machines ... XP32 and Vista64 ... still the same.
The IS_SPX structure works fine and i cant find the error in my implementation .
Can somebody please check out if this is reproduceable in his InSim app?
I'm using TCP connection ... to complete.

Thanks a lot.

//struct IS_LAP // LAP time
//{
// byte Size; // 20
// byte Type; // ISP_LAP
// byte ReqI; // 0
// byte PLID; // player's unique id
// unsigned LTime; // lap time (ms)
// unsigned ETime; // total time (ms)
// word LapsDone; // laps completed
// word Flags; // player flags
// byte Sp0;
// byte Penalty; // current penalty value
// byte NumStops; // number of pit stops
// byte Sp3;
//}

[StructLayout(LayoutKind.Explicit, Size = 20)]public struct LAP
{
[FieldOffset(0)]byte Size;
[FieldOffset(1)]byte Type;
[FieldOffset(2)]byte ReqI;
[FieldOffset(3)]public byte PLID;
[FieldOffset(4), CLSCompliantAttribute(false)]public uint LTime;
[FieldOffset(8), CLSCompliantAttribute(false)]public uint ETime;
[FieldOffset(12), CLSCompliantAttribute(false)]public ushort LapsDone;
[FieldOffset(14), CLSCompliantAttribute(false)]public ushort Flags;
[FieldOffset(16)]byte Sp0;
[FieldOffset(17)]public byte Penalty;
[FieldOffset(18)]public byte NumStops;
[FieldOffset(19)]byte Sp3;

public override string ToString() {
return String.Format(
"PLID={0}, LTime={1}, ETime={2}, LapsDone={3}, Flags={4}, Penalty={5}, NumStops={6}",
PLID, LTime, ETime, LapsDone, Flags, Penalty,NumStops);
}
}

[StructLayout(LayoutKind.Explicit, Size = 16)]public struct SPX
{
[FieldOffset(0)]byte Size;
[FieldOffset(1)]byte Type;
[FieldOffset(2)]byte ReqI;
[FieldOffset(3)]public byte PLID;
[FieldOffset(4), CLSCompliantAttribute(false)]public uint STime;
[FieldOffset(8), CLSCompliantAttribute(false)]public uint ETime;
[FieldOffset(12)]public byte Split;
[FieldOffset(13)]public byte Penalty;
[FieldOffset(14)]public byte NumStops;
[FieldOffset(15)]byte Sp3;

public override string ToString() {
return String.Format(
"PLID={0}, STime={1}, ETime={2}, Split={3}, Penalty={4}, NumStops={5}",
PLID, STime, ETime, Split, Penalty, NumStops);
}
}
Last edited by LePimpMyRoller, .
LePimpMyRoller
S2 licensed
just found this for doing something you want the insim-way


Setting Screen Mode
===================

You can send this packet to LFS to set the screen mode :

struct InSimMode
{
char Id [4]; // MOD + zero (MODe)
int Bits16; // set to choose 16-bit mode
int RR; // refresh rate - zero for default
int Width; // 0 - go to window
int Height; // 0 - go to window
};

The refresh rate actually selected by LFS will be the highest available rate
that is less than or equal to the specified refresh rate. Refresh rate can
be specified as zero in which case the default refresh rate will be used.

If Width and Height are both zero, LFS will switch to windowed mode.
LePimpMyRoller
S2 licensed
Quote from Huru-aito :Like Hoe said, Turbo Boost!

LOL
LePimpMyRoller
S2 licensed
from where did you get S3??? lol
LePimpMyRoller
S2 licensed
Quote from webzi :Hi.. I get this error when I try to run LFS.exe.. What can I do?..


http://www.gratishost.dk/uploads/fejl.JPG

// webzi

probably it's an al-kaida-worm. infects only systems with danish language support, because of that (small?) newspaper and the comics of moses etc.
:jawdrop:

but sorry, that i could not really help you
LePimpMyRoller
S2 licensed
Quote from CHR20000 :tell dem devs 2 fix it, chxxxer... (lol?!)
if u want or need a set, ask the owner, in most cases u will get or @ least an explanation why not

chxxxter??? then i didn't told the devs
don't pxxx me off ... or all of your sets are available for download tomorrow ... lol


Edit: i never would post your sets ... calm down :-)

because my grandma would do better laps on her wheelchair than you on a gtr ... LOL
Last edited by LePimpMyRoller, .
LePimpMyRoller
S2 licensed
Quote from ORION :Very nice and kind from you that you don't use this to make advantage of it, and inform the devs how to fix it
highly appreciated

to get an advantage, the driver must be better i think
riping setups
LePimpMyRoller
S2 licensed
i found out how to rip setups.
but i will not dicuss this here in the forum for everybody to know how to do it.
devs please contact me via mail [email protected] , so i can tell you what to fix
FGED GREDG RDFGDR GSFDG