Moves the declaration of "lobbyclient" to netplay.cpp/h as it should not be part of the lobby library.

master
Rene Jochum 2011-04-29 14:22:29 +02:00
parent c7497bf005
commit e66fa5ffb1
4 changed files with 6 additions and 8 deletions

View File

@ -20,11 +20,6 @@
#include "netlobby.h"
/**
* Variables
*/
Lobby::Client lobbyclient;
namespace Lobby
{
Client::Client()
@ -57,7 +52,7 @@ namespace Lobby
isAuthenticated_ = false;
// and disconnect.
lobbyclient.disconnect();
disconnect();
}
RETURN_CODES Client::addGame(char** result, const uint32_t port, const uint32_t maxPlayers,

View File

@ -184,6 +184,4 @@ namespace Lobby
} // namespace Lobby
extern Lobby::Client lobbyclient;
#endif // #ifndef _netlobby_h

View File

@ -156,6 +156,9 @@ char VersionString[VersionStringSize] = "master, netcode 4.1012";
static int NETCODE_VERSION_MAJOR = 4;
static int NETCODE_VERSION_MINOR = 1012;
// The Lobby Client - declared external in netplay.h
Lobby::Client lobbyclient;
bool NETisCorrectVersion(uint32_t game_version_major, uint32_t game_version_minor)
{
return (NETCODE_VERSION_MAJOR == game_version_major && NETCODE_VERSION_MINOR == game_version_minor);

View File

@ -251,6 +251,8 @@ extern bool netPlayersUpdated;
extern int mapDownloadProgress;
extern char iptoconnect[PATH_MAX]; // holds IP/hostname from command line
extern Lobby::Client lobbyclient;
// ////////////////////////////////////////////////////////////////////////
// functions available to you.
extern int NETinit(bool bFirstCall); // init