2021-12-05 17:54:36 +00:00
|
|
|
#pragma once
|
|
|
|
|
2023-12-31 06:26:49 +00:00
|
|
|
#include <string>
|
2021-12-05 17:54:36 +00:00
|
|
|
#include <random>
|
2024-01-02 03:50:00 +00:00
|
|
|
#include <csignal>
|
2021-12-05 17:54:36 +00:00
|
|
|
|
|
|
|
class dServer;
|
2023-10-21 23:31:55 +00:00
|
|
|
class Logger;
|
2021-12-05 17:54:36 +00:00
|
|
|
class InstanceManager;
|
|
|
|
class dChatFilter;
|
|
|
|
class dConfig;
|
|
|
|
class RakPeerInterface;
|
2022-11-01 18:21:26 +00:00
|
|
|
class AssetManager;
|
2021-12-05 17:54:36 +00:00
|
|
|
struct SystemAddress;
|
2023-07-15 20:56:33 +00:00
|
|
|
class EntityManager;
|
2023-07-17 22:55:33 +00:00
|
|
|
class dZoneManager;
|
2023-11-19 01:33:52 +00:00
|
|
|
class PlayerContainer;
|
2021-12-05 17:54:36 +00:00
|
|
|
|
|
|
|
namespace Game {
|
2024-01-02 03:50:00 +00:00
|
|
|
using signal_t = volatile std::sig_atomic_t;
|
2023-10-21 23:31:55 +00:00
|
|
|
extern Logger* logger;
|
2021-12-05 17:54:36 +00:00
|
|
|
extern dServer* server;
|
|
|
|
extern InstanceManager* im;
|
|
|
|
extern dChatFilter* chatFilter;
|
|
|
|
extern dConfig* config;
|
|
|
|
extern std::mt19937 randomEngine;
|
|
|
|
extern RakPeerInterface* chatServer;
|
2022-11-01 18:21:26 +00:00
|
|
|
extern AssetManager* assetManager;
|
2021-12-05 17:54:36 +00:00
|
|
|
extern SystemAddress chatSysAddr;
|
2024-01-02 03:50:00 +00:00
|
|
|
extern signal_t lastSignal;
|
2023-07-15 20:56:33 +00:00
|
|
|
extern EntityManager* entityManager;
|
2023-07-17 22:55:33 +00:00
|
|
|
extern dZoneManager* zoneManager;
|
2023-11-19 01:33:52 +00:00
|
|
|
extern PlayerContainer playerContainer;
|
2023-12-31 06:26:49 +00:00
|
|
|
extern std::string projectVersion;
|
2024-01-02 03:50:00 +00:00
|
|
|
|
|
|
|
inline bool ShouldShutdown() {
|
|
|
|
return lastSignal != 0;
|
|
|
|
}
|
|
|
|
void OnSignal(int signal);
|
2022-07-28 13:39:57 +00:00
|
|
|
}
|