Implemented the real server
This commit is contained in:
1 parent
931236bec0
commit
075750442f
22 files changed
+1130
-44
No files matched your search
+17
-4
@@ -23,6 +23,12 @@
|
||||
#include "AudioPlayerAsync.h"
|
||||
#include "game_server/InternalGameServer.h"
|
||||
#include "game_server/LocalGameServerHost.h"
|
||||
#include "game_server/GameServerRouter.h"
|
||||
#include "game_server/GameServerHostRouter.h"
|
||||
#if defined(NETWORK)
|
||||
#include "game_server/WebsocketGameClient.h"
|
||||
#include "game_server/RemoteGameServerHost.h"
|
||||
#endif
|
||||
namespace FRG {
|
||||
|
||||
struct LocationConfig;
|
||||
@@ -84,11 +90,18 @@ namespace FRG {
|
||||
|
||||
private:
|
||||
InternalGameServer internalGameServer;
|
||||
LocalGameServerHost gameServerHost;
|
||||
LocalGameServerHost localGameServerHost;
|
||||
#if defined(NETWORK)
|
||||
std::unique_ptr<WebsocketGameClient> websocketGameClient;
|
||||
std::unique_ptr<RemoteGameServerHost> remoteGameServerHost;
|
||||
#endif
|
||||
GameServerRouter gameServer;
|
||||
GameServerHostRouter gameServerHost;
|
||||
bool remoteCampaignActive = false;
|
||||
|
||||
public:
|
||||
IGameServer& server() { return internalGameServer; }
|
||||
const IGameServer& server() const { return internalGameServer; }
|
||||
IGameServer& server() { return gameServer; }
|
||||
const IGameServer& server() const { return gameServer; }
|
||||
|
||||
MenuManager menuManager;
|
||||
|
||||
@@ -131,7 +144,7 @@ namespace FRG {
|
||||
|
||||
Location* currentLocation() const;
|
||||
std::shared_ptr<const GameSnapshot> stateSnapshot() const {
|
||||
return internalGameServer.snapshot();
|
||||
return gameServer.snapshot();
|
||||
}
|
||||
|
||||
void saveGame(int slot);
|
||||
|
||||
Reference in new issue
Block a user