diff options
author | rubidium <rubidium@openttd.org> | 2007-10-14 19:48:48 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-10-14 19:48:48 +0000 |
commit | 41b3c86d8eaf406ad496f7a47154e55344824762 (patch) | |
tree | a52cf19b5380bc2d5985bdb5d72e5390aca2dce0 /src | |
parent | 835a9670af57436c165718c6df1d86020b862c14 (diff) | |
download | openttd-41b3c86d8eaf406ad496f7a47154e55344824762.tar.xz |
(svn r11260) -Codechange: replace a magic number by a less magic enumified constant. Patch by ammler.
Diffstat (limited to 'src')
-rw-r--r-- | src/console_cmds.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp index 7030d9a8e..22047aaa6 100644 --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -593,10 +593,8 @@ DEF_CONSOLE_CMD(ConServerInfo) DEF_CONSOLE_HOOK(ConHookValidateMaxClientsCount) { - /* XXX - hardcoded, string limiation -- TrueLight - * XXX - also see network.c:NetworkStartup ~1356 */ - if (_network_game_info.clients_max > 10) { - _network_game_info.clients_max = 10; + if (_network_game_info.clients_max > MAX_CLIENTS) { + _network_game_info.clients_max = MAX_CLIENTS; IConsoleError("Maximum clients out of bounds, truncating to limit."); } |