The online racing simulator
Quote from Dygear :As I get deep and deeper into this, I'm seeing some of the power, and some of the problems with this setup. First off the problems. Where as I can provide it with a set of points, do I have to provide the inside edge first, then the outside?Should I make sure that I supply the left side of the road, then the right side should it be the other way around when the track is in reverse? Does any of this matter really?

Well, going one way, the left boundary is the outer one, going the other way round, it's the right one ... to complicate things even more this changes at a section like in FE Gold ... but for a simple check if a car is on the track, it shouldn't really matter because to be on the track you will ALWAYS be within one polygon (the outer, whichever that may be) and out of the other one (the inner). If you are out of both, you are always on the outside of the track, if you are inside both you are always on the inside ...
So at the end of the day, it does not matter what order I feed the points into the function.
... as long as you don't mix up left with right
So I'm curious ... is it working?
I've been getting hammer at work, and in life for the past month. I work as a Paramedic and I live in New York, on Long Island and we just had Hurricane Irene where we had to evacuate some hospitals and nursing homes so that was a week of hell. Then my good friend is the CCU in critical condition so I've been spending a few nights there.

But I'm sure this will work, I've just not had the chance to do this yet.

I was also reprogramming much of this PTH parser, because I wanted to provide much more power to it. So once that is released here, it should be quite a bit better to use, and make it quite a bit easier to handle.
I've completly lost my train of though on this, but I've uploaded the changes to the PTH parser within PRISM, and I would ask that you take a look at that, along with the LVS plugin.
Either I'm a bit blind, or you are missing a function/method:
Call to undefined method Node::toPointRoad() in LVS.php on line 35
Quote from avetere :Either I'm a bit blind, or you are missing a function/method:
Call to undefined method Node::toPointRoad() in LVS.php on line 35

Your not. I've not made that function yet.
This thread is pending an update, I do have a newer version that vic made. I also have a pth to png converter that I'll also include in this version.
Is there possibility to check what sector is that node in?
Should be easy given the .pth file header defines the position or nodes of the sectors IIRC.

FILE DESCRIPTION :
==================

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

PTH does'nt have them

Maybe some one have list of sector node number for each track?
It's been a while, but is this information not available from InSim?
shhhh. Don't tell anyone!
Quote :
class IS_RST extends Struct // Race STart
{
const PACK = 'CCCxCCCCa6CCvvvvvv';
const UNPACK = 'CSize/CType/CReqI/CZero/CRaceLaps/CQualMins/CNumP/CTiming/a6Track/CWeather/CWind/vFlags/vNumNodes/vFinish/vSplit1/vSplit2/vSplit3';

protected $Size = 28; # 28
protected $Type = ISP_RST; # ISP_RST
public $ReqI = TRUE; # 0 unless this is a reply to an TINY_RST request
protected $Zero = NULL;

public $RaceLaps; # 0 if qualifying
public $QualMins; # 0 if race
public $NumP; # number of players in race
public $Timing; # lap timing (see below)

public $Track; # short track name
public $Weather;
public $Wind;

public $Flags; # race flags (must pit, can reset, etc - see below)
public $NumNodes; # total number of nodes in the path
public $Finish; # node index - finish line
public $Split1; # node index - split 1
public $Split2; # node index - split 2
public $Split3; # node index - split 3
}; function IS_RST() { return new IS_RST; }

It's here!
2

FGED GREDG RDFGDR GSFDG