forked from speed-dreams/speed-dreams-code
fixed race time problem that causes network play to work incorrectly
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@2556 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 410197fc82386ecac5b9d6e3af954741271f193c Former-commit-id: 4a07d1ee4f1490063fa2a3f7234f29a4fb5a42b7
This commit is contained in:
parent
366a5eb78f
commit
c8e0787392
2 changed files with 9 additions and 1 deletions
|
@ -1019,7 +1019,8 @@ ReOneStep(double deltaTimeIncrement)
|
||||||
|
|
||||||
if (s->currentTime < -2.0)
|
if (s->currentTime < -2.0)
|
||||||
{
|
{
|
||||||
sprintf(buf,"Race will start in %i seconds", -s->currentTime);
|
int t = -s->currentTime;
|
||||||
|
sprintf(buf,"Race will start in %i seconds", t);
|
||||||
ReRaceBigMsgSet(buf, 1.0);
|
ReRaceBigMsgSet(buf, 1.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,6 +124,9 @@ ReStateManage(void)
|
||||||
mode = ReRaceStart();
|
mode = ReRaceStart();
|
||||||
if (GetNetwork())
|
if (GetNetwork())
|
||||||
{
|
{
|
||||||
|
float f = GfTimeClock();
|
||||||
|
float rs = GetNetwork()->GetRaceStartTime();
|
||||||
|
ReInfo->s->currentTime = GfTimeClock() - GetNetwork()->GetRaceStartTime();
|
||||||
GetNetwork()->RaceInit(ReInfo->s);
|
GetNetwork()->RaceInit(ReInfo->s);
|
||||||
GetNetwork()->SetRaceActive(true);
|
GetNetwork()->SetRaceActive(true);
|
||||||
}
|
}
|
||||||
|
@ -136,7 +139,11 @@ ReStateManage(void)
|
||||||
|
|
||||||
case RE_STATE_NETWORK_WAIT:
|
case RE_STATE_NETWORK_WAIT:
|
||||||
if (!WaitForNetwork())
|
if (!WaitForNetwork())
|
||||||
|
{
|
||||||
ReInfo->_reState = RE_STATE_RACE;
|
ReInfo->_reState = RE_STATE_RACE;
|
||||||
|
ReSetRaceBigMsg("");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (GetNetwork())
|
if (GetNetwork())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue