Re #313 (Split Windows installer) Make Network race work when only 1 track available, and it is not the XML-specified one
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@3404 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 5b8d7f92e5422525c048755bce6faab62de73917 Former-commit-id: a2d6572da01af3e5f29bd7b5e1d26ddea501d71f
This commit is contained in:
parent
f4e653c0f7
commit
ed281f7b77
2 changed files with 19 additions and 6 deletions
|
@ -18,10 +18,9 @@
|
|||
***************************************************************************/
|
||||
|
||||
|
||||
/*
|
||||
This file deals with the networking menus.
|
||||
Server sees a list of players and the client sees a list of other players.
|
||||
Should also allow choosing IP address, track, etc ...
|
||||
/* This file deals with the networking menus.
|
||||
The server sees a list of players and the client sees a list of other players.
|
||||
Should also allow choosing IP address, track, etc ...
|
||||
*/
|
||||
|
||||
#include <cstdlib>
|
||||
|
|
|
@ -320,10 +320,24 @@ reOnSaveRaceToConfigFile(void *pPrevMenu)
|
|||
int
|
||||
ReRacemanMenu()
|
||||
{
|
||||
// Special case of the online race
|
||||
// TODO: Integrate it better.
|
||||
// Special case of the online race, not yet migrated to using tgfdata.
|
||||
// TODO: Integrate better the networking menu system in the race config. menu system
|
||||
// (merge the ReNetworkClientConnectMenu and ReNetworkHostMenu into this race man menu,
|
||||
// after adding some more features / controls ? because they look similar).
|
||||
if (!strcmp(ReInfo->_reName, "Online Race"))
|
||||
{
|
||||
// Temporary, as long as the networking menu are not ported to tgfdata.
|
||||
|
||||
// Force any needed fix on the specified track for the race (may not exist)
|
||||
const GfTrack* pTrack = ReGetRace()->getTrack();
|
||||
GfLogDebug("Using track %s for Online Race", pTrack->getName().c_str());
|
||||
|
||||
// Synchronize ReInfo->params with ReGetRace() state, in case the track was fixed.
|
||||
if (ReGetRace()->isDirty())
|
||||
ReGetRace()->store(); // Save data to params.
|
||||
|
||||
// End of temporary.
|
||||
|
||||
if (GetNetwork())
|
||||
{
|
||||
if (GetNetwork()->IsConnected())
|
||||
|
|
Loading…
Reference in a new issue