@@ -489,16 +489,14 @@ Player *DoStartupNewPlayer(bool is_ai)
return p;
}
void StartupPlayers()
{
uint32 r;
r = Random();
_next_competitor_start = (byte)r + _opt.diff.competitor_start_time * 6882 + 1;
// The AI starts like in the setting with +2 month max
_next_competitor_start = _opt.diff.competitor_start_time * 90 * 74 + RandomRange(60 * 74) + 1;
static void MaybeStartNewPlayer()
uint n;
Player *p;
@@ -507,16 +505,17 @@ static void MaybeStartNewPlayer()
n = 0;
for(p=_players; p!=endof(_players); p++)
if (p->is_active && p->is_ai)
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))
if (n < (uint)_opt.diff.max_no_competitors && n < RandomRange(_opt.diff.max_no_competitors + 2))
DoStartupNewPlayer(true);
_next_competitor_start = RandomRange(19980) + 11100;
// The next AI starts like the difficulty setting said, with +2 month max
void InitializePlayers()
int i;
memset(_players, 0, sizeof(_players));
Status change: