Bug #853 Network Race - Client now sees changes to track from server
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@5747 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: f6e5b463b49a95baafd9121c58a610126b41dc7d Former-commit-id: 087f10c54a23032a1db6336bb81ccb2c32672a4e
This commit is contained in:
parent
8dd34fc80e
commit
8b51369b4f
1 changed files with 8 additions and 1 deletions
|
@ -34,6 +34,8 @@
|
|||
#include <raceman.h>
|
||||
#include <robot.h>
|
||||
#include <race.h>
|
||||
#include <racemanagers.h>
|
||||
#include <tracks.h>
|
||||
#include <cars.h>
|
||||
#include <drivers.h>
|
||||
#include <network.h>
|
||||
|
@ -300,10 +302,11 @@ UpdateNetworkPlayers()
|
|||
}
|
||||
NetGetServer()->UnlockServerData();
|
||||
} else {
|
||||
#if 1
|
||||
// Client XML files already written to disk - this works but is not the best solution....
|
||||
GfDrivers::self()->reload();
|
||||
tRmInfo* reInfo = LmRaceEngine().inData();
|
||||
LmRaceEngine().race()->load(LmRaceEngine().race()->getManager(), true);
|
||||
#endif
|
||||
}
|
||||
|
||||
//Update track info
|
||||
|
@ -315,6 +318,10 @@ UpdateNetworkPlayers()
|
|||
sprintf(buf, "%s", strTrackName.c_str());
|
||||
GfuiLabelSetText(racemanMenuHdle,g_trackHd,buf);
|
||||
|
||||
//Store current track - client needs this
|
||||
GfTrack* PCurTrack = GfTracks::self()->getTrackWithName(buf);
|
||||
LmRaceEngine().race()->getManager()->setEventTrack(0, PCurTrack);
|
||||
|
||||
int laps = (int)GfParmGetNum(reInfo->params, reInfo->_reName,"laps", "", 1);
|
||||
sprintf(buf, "%i", laps);
|
||||
GfuiLabelSetText(racemanMenuHdle,g_lapsHd,buf);
|
||||
|
|
Loading…
Reference in a new issue