diff options
author | truelight <truelight@openttd.org> | 2005-07-17 13:34:19 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2005-07-17 13:34:19 +0000 |
commit | 658f9cb03f9a5ec8a0dd772f6cadf54bf53a627a (patch) | |
tree | b972b387c285fa94e42d87ae90990f1a2b2c769e /players.c | |
parent | 3ce9fb6bbd0169ace02f6510b151171d914d4414 (diff) | |
download | openttd-658f9cb03f9a5ec8a0dd772f6cadf54bf53a627a.tar.xz |
(svn r2602) -Codechange: removed unused variable (disable_computer)
-Fix: Changed some stuff to make server-side AIs possible in the far future
Diffstat (limited to 'players.c')
-rw-r--r-- | players.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -521,11 +521,13 @@ static void MaybeStartNewPlayer(void) n++; // when there's a lot of computers in game, the probability that a new one starts is lower - if (n < (uint)_opt.diff.max_no_competitors && n < RandomRange(_opt.diff.max_no_competitors + 2)) + if (n < (uint)_opt.diff.max_no_competitors) + if (n < (!_network_server) ? RandomRange(_opt.diff.max_no_competitors + 2) : InteractiveRandomRange(_opt.diff.max_no_competitors + 2)) DoStartupNewPlayer(true); // The next AI starts like the difficulty setting said, with +2 month max - _next_competitor_start = _opt.diff.competitor_start_time * 90 * DAY_TICKS + RandomRange(60 * DAY_TICKS) + 1; + _next_competitor_start = _opt.diff.competitor_start_time * 90 * DAY_TICKS + 1; + _next_competitor_start += (!_network_server) ? RandomRange(60 * DAY_TICKS) : InteractiveRandomRange(60 * DAY_TICKS); } void InitializePlayers(void) |