mirror of https://github.com/OpenTTD/OpenTTD
(svn r15066) -Change: start_date is now in days, instead of in months (Yexo)
parent
4780c73224
commit
e1f64922c5
|
@ -21,12 +21,12 @@ public:
|
||||||
* The default months AIs start after eachother.
|
* The default months AIs start after eachother.
|
||||||
*/
|
*/
|
||||||
enum StartNext {
|
enum StartNext {
|
||||||
START_NEXT_EASY = 48,
|
START_NEXT_EASY = 1461,
|
||||||
START_NEXT_MEDIUM = 24,
|
START_NEXT_MEDIUM = 730,
|
||||||
START_NEXT_HARD = 12,
|
START_NEXT_HARD = 365,
|
||||||
START_NEXT_MIN = 0,
|
START_NEXT_MIN = 0,
|
||||||
START_NEXT_MAX = 120,
|
START_NEXT_MAX = 3600,
|
||||||
START_NEXT_DEVIATION = 2,
|
START_NEXT_DEVIATION = 60,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -101,7 +101,7 @@ public:
|
||||||
static void Load(CompanyID company, int version);
|
static void Load(CompanyID company, int version);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the number of months before the next AI should start.
|
* Get the number of days before the next AI should start.
|
||||||
*/
|
*/
|
||||||
static int GetStartNextTime();
|
static int GetStartNextTime();
|
||||||
|
|
||||||
|
|
|
@ -487,8 +487,6 @@ static void MaybeStartNewCompany()
|
||||||
* Works fine for Multiplayer and Singleplayer */
|
* Works fine for Multiplayer and Singleplayer */
|
||||||
DoCommandP(0, 1, 0, CMD_COMPANY_CTRL);
|
DoCommandP(0, 1, 0, CMD_COMPANY_CTRL);
|
||||||
}
|
}
|
||||||
|
|
||||||
_next_competitor_start = AI::GetStartNextTime() * 30 * DAY_TICKS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitializeCompanies()
|
void InitializeCompanies()
|
||||||
|
@ -508,7 +506,7 @@ void OnTick_Companies()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_next_competitor_start == 0) {
|
if (_next_competitor_start == 0) {
|
||||||
_next_competitor_start = AI::GetStartNextTime() * 30 * DAY_TICKS;
|
_next_competitor_start = AI::GetStartNextTime() * DAY_TICKS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AI::CanStartNew() && _game_mode != GM_MENU && --_next_competitor_start == 0) {
|
if (AI::CanStartNew() && _game_mode != GM_MENU && --_next_competitor_start == 0) {
|
||||||
|
|
Loading…
Reference in New Issue