diff options
author | rubidium <rubidium@openttd.org> | 2008-01-13 21:51:53 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-01-13 21:51:53 +0000 |
commit | 392d59f6a9d895710ff619ebe980e960b673bca7 (patch) | |
tree | dd6399ac3bc9f7813081a7cd37da6055249af718 /src/network/network.cpp | |
parent | 3ca95f2a85d2347f28424a479fa3323f4a86bca7 (diff) | |
download | openttd-392d59f6a9d895710ff619ebe980e960b673bca7.tar.xz |
(svn r11840) -Codechange: split network.h so not everything in there needs to be included when wanting to know whether we are a server.
Diffstat (limited to 'src/network/network.cpp')
-rw-r--r-- | src/network/network.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/network/network.cpp b/src/network/network.cpp index 72cd515e8..1cd128181 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -3,8 +3,6 @@ #include "../stdafx.h" #include "network_data.h" -extern const char _openttd_revision[]; - #ifdef ENABLE_NETWORK #include "../openttd.h" @@ -40,6 +38,10 @@ extern const char _openttd_revision[]; #include "table/strings.h" bool _network_reload_cfg; +bool _network_server; ///< network-server is active +bool _network_available; ///< is network mode available? +bool _network_dedicated; ///< are we a dedicated server? +bool _network_advertise; ///< is the server advertising to the master server? /* Check whether NETWORK_NUM_LANDSCAPES is still in sync with NUM_LANDSCAPE */ assert_compile((int)NETWORK_NUM_LANDSCAPES == (int)NUM_LANDSCAPE); @@ -1202,8 +1204,7 @@ static void NetworkHandleLocalQueue() if (_frame_counter > cp->frame) { // If we reach here, it means for whatever reason, we've already executed // past the command we need to execute. - DEBUG(net, 0, "Trying to execute a packet in the past!"); - assert(0); + error("[net] Trying to execute a packet in the past!"); } // We can execute this command @@ -1469,3 +1470,6 @@ bool IsNetworkCompatibleVersion(const char *other) } #endif /* ENABLE_NETWORK */ + +/* NOTE: this variable needs to be always available */ +PlayerID _network_playas; |