summaryrefslogtreecommitdiff
path: root/src/network/network.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-01-13 21:51:53 +0000
committerrubidium <rubidium@openttd.org>2008-01-13 21:51:53 +0000
commit9ac26e1bf11b5e402d94c0f1f60b8a8ac616a4c2 (patch)
treedd6399ac3bc9f7813081a7cd37da6055249af718 /src/network/network.cpp
parentdf12937f1995379203542e220fc121f558aafed1 (diff)
downloadopenttd-9ac26e1bf11b5e402d94c0f1f60b8a8ac616a4c2.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.cpp12
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;