- Update Shadow's driver
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@6809 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: d3432ff21278923135b38b4041f0612e476f9937 Former-commit-id: a1a0828360b471b86ced0d96ed10ce7508a326d8
This commit is contained in:
parent
5b3c1bc9c7
commit
a86d50629e
3 changed files with 25 additions and 15 deletions
|
@ -231,6 +231,11 @@ static void* MergeParamFile( void* hParams, const char* fileName )
|
||||||
GFPARM_MMODE_RELSRC | GFPARM_MMODE_RELDST);
|
GFPARM_MMODE_RELSRC | GFPARM_MMODE_RELDST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TDriver::SetShared( Shared* pShared )
|
||||||
|
{
|
||||||
|
m_pShared = pShared;
|
||||||
|
}
|
||||||
|
|
||||||
//==========================================================================*
|
//==========================================================================*
|
||||||
|
|
||||||
//==========================================================================*
|
//==========================================================================*
|
||||||
|
@ -603,7 +608,7 @@ void TDriver::InitTrack( tTrack* pTrack, void* pCarHandle, void** ppCarParmHandl
|
||||||
oCarHasESP = true;
|
oCarHasESP = true;
|
||||||
*/
|
*/
|
||||||
START_HOLD_LINE_TIME = GfParmGetNum(hCarParm, SECT_PRIV, PRV_STARTLINE, 0, 5.0f);
|
START_HOLD_LINE_TIME = GfParmGetNum(hCarParm, SECT_PRIV, PRV_STARTLINE, 0, 5.0f);
|
||||||
m_pShared = new Shared();
|
//m_pShared = new Shared();
|
||||||
|
|
||||||
MyTrack::SideMod sideMod;
|
MyTrack::SideMod sideMod;
|
||||||
sideMod.side = -1;
|
sideMod.side = -1;
|
||||||
|
|
|
@ -188,6 +188,8 @@ public:
|
||||||
TDriver(int index); // Constructor
|
TDriver(int index); // Constructor
|
||||||
~TDriver(); // Destructor
|
~TDriver(); // Destructor
|
||||||
|
|
||||||
|
void SetShared( Shared* pShared );
|
||||||
|
|
||||||
void InitTrack(tTrack* track, void* carHandle, void** carParmHandle, tSituation* s);
|
void InitTrack(tTrack* track, void* carHandle, void** carParmHandle, tSituation* s);
|
||||||
void NewRace(tCarElt* car, tSituation* s );
|
void NewRace(tCarElt* car, tSituation* s );
|
||||||
void Drive(tSituation* s);
|
void Drive(tSituation* s);
|
||||||
|
|
|
@ -44,6 +44,8 @@ using ::std::pair;
|
||||||
// The "SHADOW" logger instance
|
// The "SHADOW" logger instance
|
||||||
GfLogger* PLogSHADOW = 0;
|
GfLogger* PLogSHADOW = 0;
|
||||||
|
|
||||||
|
static Shared s_shared;
|
||||||
|
|
||||||
// TORCS interface
|
// TORCS interface
|
||||||
static void initTrack(int index, tTrack* track, void *carHandle, void **carParmHandle, tSituation *s);
|
static void initTrack(int index, tTrack* track, void *carHandle, void **carParmHandle, tSituation *s);
|
||||||
static void newRace(int index, tCarElt* car, tSituation *s);
|
static void newRace(int index, tCarElt* car, tSituation *s);
|
||||||
|
@ -260,6 +262,7 @@ static int InitFuncPt(int index, void *pt)
|
||||||
static void initTrack(int index, tTrack* track, void *carHandle,
|
static void initTrack(int index, tTrack* track, void *carHandle,
|
||||||
void **carParmHandle, tSituation *s)
|
void **carParmHandle, tSituation *s)
|
||||||
{
|
{
|
||||||
|
driver[index]->SetShared( &s_shared );
|
||||||
driver[index]->InitTrack(track, carHandle, carParmHandle, s);
|
driver[index]->InitTrack(track, carHandle, carParmHandle, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue