forked from speed-dreams/speed-dreams-code
Fixed #381 (glitches on car + camera stuck to player's)
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@3485 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: dd54859537e64b6f9f2f99cd7aac3dd68288e2cc Former-commit-id: 1d8befabdefe3e01bb77037400341a77363db348
This commit is contained in:
parent
6ca13ffd97
commit
4142d50a91
4 changed files with 22 additions and 19 deletions
|
@ -395,7 +395,7 @@ ReRaceRealStart(void)
|
|||
// Initalize cars graphics.
|
||||
if (ReInfo->_displayMode == RM_DISP_MODE_NORMAL) {
|
||||
RaceEngine::self().userInterface().addLoadingMessage("Loading cars ...");
|
||||
RaceEngine::self().userInterface().loadCarsGraphics(ReInfo->s);
|
||||
ReInitCarGraphics();
|
||||
}
|
||||
|
||||
if (GetNetwork())
|
||||
|
|
|
@ -81,11 +81,6 @@ ReTrackInit(void)
|
|||
|
||||
reTrackDump(ReInfo->track, 0);
|
||||
|
||||
// TODO: Remove (old graphics setup, and anyway : not needed ?)
|
||||
// Make the graphics engine aware of the possibly changed track.
|
||||
// if (ReInfo->_reGraphicItf.inittrack)
|
||||
// ReInfo->_reGraphicItf.inittrack(ReInfo->track);
|
||||
|
||||
return 0;
|
||||
}//ReTrackInit
|
||||
|
||||
|
@ -418,9 +413,6 @@ reTrackUpdatePhysics(void)
|
|||
int
|
||||
ReTrackShutdown(void)
|
||||
{
|
||||
// TODO: Remove (old graphics setup)
|
||||
// if (ReInfo->_reGraphicItf.shutdowntrack)
|
||||
// ReInfo->_reGraphicItf.shutdowntrack();
|
||||
RaceEngine::self().userInterface().unloadTrackGraphics();
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -612,6 +612,9 @@ public:
|
|||
//! Constructor.
|
||||
reMainUpdater(reSituationUpdater* pSituUpdater);
|
||||
|
||||
//! Initialize the graphics engine about cars.
|
||||
void initCarGraphics(void);
|
||||
|
||||
//! Return from pit menu
|
||||
void onBackFromPitMenu(tCarElt *car);
|
||||
|
||||
|
@ -668,6 +671,18 @@ reMainUpdater::reMainUpdater(reSituationUpdater* pSituUpdater)
|
|||
#endif
|
||||
}
|
||||
|
||||
void reMainUpdater::initCarGraphics(void)
|
||||
{
|
||||
RaceEngine::self().userInterface().loadCarsGraphics(_pReInfo->s);
|
||||
}
|
||||
|
||||
void reMainUpdater::onBackFromPitMenu(tCarElt *car)
|
||||
{
|
||||
_pSituationUpdater->updateCarPitCmd(car->index, &car->pitcmd);
|
||||
|
||||
RaceEngine::self().userInterface().activateGameScreen();
|
||||
}
|
||||
|
||||
void reMainUpdater::captureScreen(void)
|
||||
{
|
||||
char filename[256];
|
||||
|
@ -679,14 +694,6 @@ void reMainUpdater::captureScreen(void)
|
|||
RaceEngine::self().userInterface().captureRaceScreen(filename);
|
||||
}
|
||||
|
||||
|
||||
void reMainUpdater::onBackFromPitMenu(tCarElt *car)
|
||||
{
|
||||
_pSituationUpdater->updateCarPitCmd(car->index, &car->pitcmd);
|
||||
|
||||
RaceEngine::self().userInterface().activateGameScreen();
|
||||
}
|
||||
|
||||
int reMainUpdater::operator()(void)
|
||||
{
|
||||
// Note: In reMainUpdater, we should not read/write ReInfo (only _pReInfo).
|
||||
|
@ -827,6 +834,11 @@ void ReInitUpdaters()
|
|||
GfSchedConfigureEventLog("raceupdate", "physics", 10000, 0.0);
|
||||
}
|
||||
|
||||
void ReInitCarGraphics(void)
|
||||
{
|
||||
mainUpdater->initCarGraphics();
|
||||
}
|
||||
|
||||
void ReAccelerateTime(double fMultFactor)
|
||||
{
|
||||
ReInfo->_reTimeMult *= fMultFactor;
|
||||
|
|
|
@ -27,8 +27,7 @@
|
|||
#define _RACEUPDATE_H_
|
||||
|
||||
extern void ReInitUpdaters();
|
||||
// TODO: Remove (old graphics setup): code moved into ReRaceRealStart
|
||||
//extern void ReInitCarGraphics();
|
||||
extern void ReInitCarGraphics();
|
||||
extern void ReShutdownUpdaters();
|
||||
|
||||
extern void ReAccelerateTime(double fMultFactor);
|
||||
|
|
Loading…
Reference in a new issue