The online racing simulator
Searching in All forums
(75 results)
paXton
S3 licensed
seen this?

paXton
paXton
S3 licensed
Hi,

nice site!
Quote from Dygear :Speaking of this, I really need to get a ms2time function that does it's job. If there is minutes, then put in minutes, don't be lazy about it and use how many seconds ... any one have a function they are willing to share in PHP?

I don't understand exactly what you mean. It seems to look ok at your site.
Please give an example, if you still need help from another phpbeginner. 8)

paXton
LFSW wrong filename for reversed replays
paXton
S3 licensed
Hi Victor,

when I download a wr-replay of BL1R, for example http://www.lfsworld.net/get_spr.php?file=269&w=1, the file is named "Checkout_BL1_FZR_107830.spr" , but it should be "..._BL1R_FZR...".
The missing "R" seems to occur on all reversed tracks with all cars.

paXton
paXton
S3 licensed
no, not yet
paXton
S3 licensed
I only have this, figured out by myself: (without guarantee)

array('650', '651', '660', '661')
array('AS6', 'AS6R', 'AS7', 'AS7R')
array('Aston Grand Touring', 'Aston Grand Touring reversed', 'Aston North', 'Aston North reversed')

paXton
paXton
S3 licensed
hmmm, now it works here, too.
Victor seems to work on it.

thx, paXton
paXton
S3 licensed
for me, the version=1.2 doesn't change anything.

paXton
paXton
S3 licensed
great, that works. thank you.

paXton
relaymode dont work under wine
paXton
S3 licensed
Hi smith!

As reported before, stats runs fine under linux with wine.
Today I switched from server mode to relaymode, which seems to work fine under windows, too.
But on my linux box I get this error.
LFS stats! v1.34 (c) 2004-2005 Alexander 'smith' Rudakov (piercemind@gmail.com)
WARNING: relay server mode is still experimental and not supposed to be correct!
Connecting [isrelay.liveforspeed.net 47474 30000 pw ]
wine: Unhandled exception (thread 001e), starting debugger...
WineDbg starting on pid 0x1d
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x40120c3a).
In 32 bit mode.

I tried the same exe and stats.xml. On windows it runs, on linux it doesn't work.
I would be happy, if you could take a look at it.

Thx, paXton
paXton
S3 licensed
@all: thx for the quick answers.
I have to think about it, which technique fit my needs, or how acurate the results should be.

@Dygear: sorry, I understood not the meaning of all your posts, but I will complete the list later, too.

btw: is it right, that when a lfs dedi is relayed via the lfs relay server, the insim port cannot be used by another isim app?
paXton
S3 licensed
jepp, now I have seen it.
But there might be some problems when clicking too much on the cam buttons, so that the two-cam modus sometimes doesn't work here.
I try to figure it tomorrow or so, and will report. I don't know if it has to do with the fast zooming in/out bug.

paXton
paXton
S3 licensed
Quote from Frankmd :Here is v0.6 for you. Use it at own risk

It looks simple and works great. very nice.

But after some playing, I don't notice a difference between focus on one car and focus on two cars with the custom cam. Im not sure if it works here. On what should I look?

Maybe you could also implement a SPACE-keypress to cancel the shift-U settings on the screen while on customcam.

paXton
Racetracking via InSim
paXton
S3 licensed
Hi all!

For some days I play somewhat with Insim.

At the moment I'm a bit confused, how to build up a live ranking table/list with the actual position of each driver in a race.

When a race restarts, I get the starting positions out of the IS_REO packet. But how do I know the position of a driver after a few laps?
To know the actual lap, I can count the IS_LAP packets, and if the IS_LAP of driver x arrives before IS_LAP of driver y, I could know, that x is in front of y. But is this the right way?
I want to know which driver is in front of whom in every second, or perhaps in every sector.
Must I use current path node? But then I only know if someone has overtaken another, when his node is higher than the node of the overtaken car.

paXton
Last edited by paXton, .
paXton
S3 licensed
Quote from Dygear :Also, do you know of a way of getting rid of the Shift+U's heads up display? That on a movie would kinda kill it .

use SPACE, Shift-F doesn't work in Shift-U mode
paXton
S3 licensed
Quote from Frankmd :As for the release, my goal is to get something working before the next masters of endurance race.

Now, the first great season is over. How is about your development?
paXton
S3 licensed
Quote from the_angry_angel :For reference, you CAN run the LFS dedi on linux, with the following command,
nohup wine LFS.exe /cfg=setup.cfg > /dev/null & echo $! > lfs.pid

This makes it run on the background, any possible output is routed to /dev/null (afaik LFS doesnt echo anything to STDOUT anyway, but this is kind of a "just incase" thing), and the PID of the process is written to lfs.pid.

And IMO don't forget
/dedicated=nogfx

in the setup.cfg.

Pascal
paXton
S3 licensed
Quote from JogDive :Bad Laasphe ?? Marburg

jepp, BAD LA. City 8) :Handshake
paXton
S3 licensed
look here: http://www.lfsforum.net/showthread.php?p=44576#post44576
[COLOR=#000000][COLOR=#ff8000]// Code page indicators
// ^L = Latin 1
// ^G = Greek
// ^C = Cyrillic
// ^J = Japanese
// ^E = Central Europe
// ^T = Turkish
// ^B = Baltic[/COLOR][/COLOR]

Ciao... Pascal
paXton
S3 licensed
@Victor:
Quote from Victor :Kinda doubt it because the 4 bytes in a float have different meanings than the bytes in an int.

reading a float i have done like :
float File_FloatIn (FILE *fp) {
float Float;
byte *f_ptr = (byte *) &Float;
for (int x=0; x<4; x++) f_ptr[x] = fgetc (fp);

//printf ("READ FLOAT: %f\n", Float);

return Float;
}

that way you put all the 4 bytes of a float directly in an actual float without shifting with bits and all that.

jepp, my shifting was totally bullshit. thx


@Stuff:
Quote from Stuff :I made an example in VB6 and I also get 0 for every DirZ. Not sure about the path structure but I guess if we both get it, its intended.

Source.. use as you wish

:boing:ahhhh...thx. I've also worked on VB6 yesterday and get it working too, but your source looks much nicer and more complete, so I merge it with my next. 8)
paXton
S3 licensed
Quote from MonkOnHotTinRoof :
replace float dirX = ... with int tmpX = ..., then do
float dirX = *(float*)&tmpX;

that's it. thanks

But i always get dirZ=0 for every node. Perhaps i should check it with a hex editor.
parsing .pth with C or VB
paXton
S3 licensed
Hi!

I think i need some help for parsing the .pth-files.

I originally want to use them in VB6, but don't know how. So I modified a dirty C source from an earlier project to show the values, which are stored in the pth-files. But then the problems began.


#include "stdafx.h"


#include <cstdlib>

#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <ctime>

typedef struct {
int centreX; // fp
int centreY; // fp
int centreZ; // fp
float dirX; // float
float dirY; // float
float dirZ; // float
float limit_left; // outer limit
float limit_right; // outer limit
float drive_left; // road limit
float drive_right; // road limit
} LFSpth_node;


typedef struct {
char LFSPTH[6]; // do not read file if no match
char version; // 0 - do not read file if > 0
char revision; // 0 - do not read file if > 0
int num_nodes; // number
int finish_line; // number
LFSpth_node nodes; // NODE BLOCKS
} LFSpth;



/*
num unit offset description
--- ---- ------ -----------
HEADER BLOCK :
6 char 0 LFSPTH : do not read file if no match
1 byte 6 version : 0 - do not read file if > 0
1 byte 7 revision : 0 - do not read file if > 0
1 int 8 num nodes : number
1 int 12 finish line : number
......NODE BLOCKS

NODE BLOCK :
1 int 0 centre X : fp
1 int 4 centre Y : fp
1 int 8 centre Z : fp
1 float 12 dir X : float
1 float 16 dir Y : float
1 float 20 dir Z : float
1 float 24 limit left : outer limit
1 float 28 limit right : outer limit
1 float 32 drive left : road limit
1 float 36 drive right : road limit
*/




using namespace std;

//Vector, which contains the binary Data of Filename in char order
std::vector <unsigned char> input;


int main( int argc, char ** argv)
{
if (argc != 2) {
std::cerr << "usage: " << argv[0] << " file.pth\n";
exit(1);
}
char *Filename = argv[1];

//Temporary buffer
char buffer;
int buffercnt=0;

//Input Stream
std::ifstream filein;

//open Input stream in binary mode
filein.open(Filename,std::ios::binary);

if (!filein)
{
std::cout << "Error opening the file! Aborting...\n";
exit(1);
}

//Read file and fill buffer until EndOfFile
while (!filein.eof()) {

//read char
filein.get(buffer);
//insert char
input.push_back(buffer);

}
//close file
filein.close();

int offset=16;


char version=input[6];
char revision=input[7];
int num_nodes=input[8];
int finish_line=input[12];

std::string name;


std::cout << "Type:\t\t" << char(input[0]) << char(input[1]) << char(input[2]) << char(input[3]) << char(input[4]) << char(input[5]) << std::endl;
std::cout << "Version:\t" << int(version) << std::endl;
std::cout << "Revision:\t" << int(revision) << std::endl;
std::cout << "Nodes:\t\t" << int(num_nodes) << std::endl;
std::cout << "Finish Line:\t" << int(finish_line) << std::endl << std::endl;


for (int satz = 1; satz <= num_nodes; satz++) {

std::cout << "Node:\t\t\t" << satz << std::endl;

std::cout << "centre X:\t\t" << int(input[offset]) << std::endl;
std::cout << "centre Y:\t\t" << int(input[offset+4]) << std::endl;
std::cout << "centre Z:\t\t" << int(input[offset+8]) << std::endl;


float dirX = input[offset+12] << 24;
dirX += input[offset+13] << 16;
dirX += input[offset+14] << 8;
dirX += input[offset+15] ;

float dirY = input[offset+16];
dirY += input[offset+17] << 8;
dirY += input[offset+18] << 16;
dirY += input[offset+19] << 24;

float dirZ = input[offset+20];
dirZ += input[offset+21] << 8;
dirZ += input[offset+22] << 16;
dirZ += input[offset+23] << 24;

std::cout << "dir X:\t\t\t" << dirX << std::endl;
std::cout << "dir Y:\t\t\t" << dirY << std::endl;
std::cout << "dir Z:\t\t\t" << dirZ << std::endl;

std::cout << "limit left:\t\t" << float(input[offset+24]) << std::endl;
std::cout << "limit right:\t\t" << float(input[offset+28]) << std::endl;

std::cout << "drive left:\t\t" << float(input[offset+32]) << std::endl;
std::cout << "drive right:\t\t" << float(input[offset+36]) << std::endl << std::endl;


offset+=40;
}

return EXIT_SUCCESS;
}


I don't think, the float values are right. But i have no idea how to read them correctly. Is it right, that the "z direction" in BL1.pth is always zero?

I'll be very happy, if someone could show me a hint, how to do it.
Perhaps some code snip sets in VB6 or C.

As you see, I'm not very familiar with C or VB6. Years ago I programmed a lot of command line tools in AmigaE and MaxxonBasic, but now i feel like a noob. 8)

BTW: Many thx @RayOK for his VB6 examples.

Ciao... Pascal

PS: Sorry for my bad english.
paXton
S3 licensed
this one works. 8)

paXton
v1.33 don't work under wine
paXton
S3 licensed
hello smith!

thanks for the great program.

2 weeks ago i tried to get stats v1.32 working on our linux server to do live-stats.
and i wondered, it worked.
but after updating to v1.33 it won't work.
i allways get this output:
LFS stats! v1.33 (c) 2004-2005 Alexander 'smith' Rudakov (piercemind@gmail.com)
Connecting [127.0.0.1 29999 30000 ***pass***]
Error connecting to LFS: Sockets error 5

when i use the v1.32-exe, it works fine.

have you any idea what this could be?

ciao... paXton
paXton
S3 licensed
Hi!

Quote from Citywidemicke :I use this one and it work in S2

http://forum.rscnet.org/showthread.php?t=107113

which version will work with S2 Patch Q?
i tried the latest, but nothing happend...

Ciao... paXton
paXton
S3 licensed
wow, fantastic movie.
keep up the great work, Don.

paXton
FGED GREDG RDFGDR GSFDG