summaryrefslogtreecommitdiff
path: root/src/network/network_base.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-12-23 11:55:46 +0000
committerrubidium <rubidium@openttd.org>2008-12-23 11:55:46 +0000
commitf8f7febe41311ff3562c57a10672e3a62174104b (patch)
tree0e0f56357371c5504e04f2c93c6baebc89f00607 /src/network/network_base.h
parent52fb6b7d7cec0734fb341939adce5199eeca7db6 (diff)
downloadopenttd-f8f7febe41311ff3562c57a10672e3a62174104b.tar.xz
(svn r14725) -Change: make it clearer why (and that) MAX_CLIENTS isn't the amount of slots in the array, but one less as a dedicated server takes a slot too.
Diffstat (limited to 'src/network/network_base.h')
-rw-r--r--src/network/network_base.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/network/network_base.h b/src/network/network_base.h
index 225528852..e8171a027 100644
--- a/src/network/network_base.h
+++ b/src/network/network_base.h
@@ -23,16 +23,16 @@ struct NetworkClientInfo {
static NetworkClientInfo *GetNetworkClientInfo(int ci)
{
- extern NetworkClientInfo _network_client_info[MAX_CLIENT_INFO];
+ extern NetworkClientInfo _network_client_info[MAX_CLIENT_SLOTS];
return &_network_client_info[ci];
}
static inline bool IsValidNetworkClientInfoIndex(ClientIndex index)
{
- return (uint)index < MAX_CLIENT_INFO && GetNetworkClientInfo(index)->IsValid();
+ return (uint)index < MAX_CLIENT_SLOTS && GetNetworkClientInfo(index)->IsValid();
}
-#define FOR_ALL_CLIENT_INFOS_FROM(d, start) for (ci = GetNetworkClientInfo(start); ci != GetNetworkClientInfo(MAX_CLIENT_INFO); ci++) if (ci->IsValid())
+#define FOR_ALL_CLIENT_INFOS_FROM(d, start) for (ci = GetNetworkClientInfo(start); ci != GetNetworkClientInfo(MAX_CLIENT_SLOTS); ci++) if (ci->IsValid())
#define FOR_ALL_CLIENT_INFOS(d) FOR_ALL_CLIENT_INFOS_FROM(d, 0)
#endif /* ENABLE_NETWORK */