Moves the declaration of "lobbyclient" to netplay.cpp/h as it should not be part of the lobby library.
parent
c7497bf005
commit
e66fa5ffb1
|
@ -20,11 +20,6 @@
|
||||||
|
|
||||||
#include "netlobby.h"
|
#include "netlobby.h"
|
||||||
|
|
||||||
/**
|
|
||||||
* Variables
|
|
||||||
*/
|
|
||||||
Lobby::Client lobbyclient;
|
|
||||||
|
|
||||||
namespace Lobby
|
namespace Lobby
|
||||||
{
|
{
|
||||||
Client::Client()
|
Client::Client()
|
||||||
|
@ -57,7 +52,7 @@ namespace Lobby
|
||||||
isAuthenticated_ = false;
|
isAuthenticated_ = false;
|
||||||
|
|
||||||
// and disconnect.
|
// and disconnect.
|
||||||
lobbyclient.disconnect();
|
disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
RETURN_CODES Client::addGame(char** result, const uint32_t port, const uint32_t maxPlayers,
|
RETURN_CODES Client::addGame(char** result, const uint32_t port, const uint32_t maxPlayers,
|
||||||
|
|
|
@ -184,6 +184,4 @@ namespace Lobby
|
||||||
|
|
||||||
} // namespace Lobby
|
} // namespace Lobby
|
||||||
|
|
||||||
extern Lobby::Client lobbyclient;
|
|
||||||
|
|
||||||
#endif // #ifndef _netlobby_h
|
#endif // #ifndef _netlobby_h
|
||||||
|
|
|
@ -156,6 +156,9 @@ char VersionString[VersionStringSize] = "master, netcode 4.1012";
|
||||||
static int NETCODE_VERSION_MAJOR = 4;
|
static int NETCODE_VERSION_MAJOR = 4;
|
||||||
static int NETCODE_VERSION_MINOR = 1012;
|
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)
|
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);
|
return (NETCODE_VERSION_MAJOR == game_version_major && NETCODE_VERSION_MINOR == game_version_minor);
|
||||||
|
|
|
@ -251,6 +251,8 @@ extern bool netPlayersUpdated;
|
||||||
extern int mapDownloadProgress;
|
extern int mapDownloadProgress;
|
||||||
extern char iptoconnect[PATH_MAX]; // holds IP/hostname from command line
|
extern char iptoconnect[PATH_MAX]; // holds IP/hostname from command line
|
||||||
|
|
||||||
|
extern Lobby::Client lobbyclient;
|
||||||
|
|
||||||
// ////////////////////////////////////////////////////////////////////////
|
// ////////////////////////////////////////////////////////////////////////
|
||||||
// functions available to you.
|
// functions available to you.
|
||||||
extern int NETinit(bool bFirstCall); // init
|
extern int NETinit(bool bFirstCall); // init
|
||||||
|
|
Loading…
Reference in New Issue