|
@@ -395,25 +395,25 @@ static bool FixTTOEngines()
|
|
|
for (uint i = 0; i < lengthof(_orig_rail_vehicle_info); i++, j++) new (GetTempDataEngine(j)) Engine(VEH_TRAIN, i);
|
|
|
for (uint i = 0; i < lengthof(_orig_road_vehicle_info); i++, j++) new (GetTempDataEngine(j)) Engine(VEH_ROAD, i);
|
|
|
for (uint i = 0; i < lengthof(_orig_ship_vehicle_info); i++, j++) new (GetTempDataEngine(j)) Engine(VEH_SHIP, i);
|
|
|
for (uint i = 0; i < lengthof(_orig_aircraft_vehicle_info); i++, j++) new (GetTempDataEngine(j)) Engine(VEH_AIRCRAFT, i);
|
|
|
}
|
|
|
|
|
|
TimerGameCalendar::Date aging_date = std::min(TimerGameCalendar::date + DAYS_TILL_ORIGINAL_BASE_YEAR, TimerGameCalendar::ConvertYMDToDate(2050, 0, 1));
|
|
|
TimerGameCalendar::Date aging_date = std::min(TimerGameCalendar::date + CalendarTime::DAYS_TILL_ORIGINAL_BASE_YEAR, TimerGameCalendar::ConvertYMDToDate(2050, 0, 1));
|
|
|
|
|
|
for (EngineID i = 0; i < 256; i++) {
|
|
|
int oi = ttd_to_tto[i];
|
|
|
Engine *e = GetTempDataEngine(i);
|
|
|
|
|
|
if (oi == 255) {
|
|
|
/* Default engine is used */
|
|
|
TimerGameCalendar::date += DAYS_TILL_ORIGINAL_BASE_YEAR;
|
|
|
TimerGameCalendar::date += CalendarTime::DAYS_TILL_ORIGINAL_BASE_YEAR;
|
|
|
StartupOneEngine(e, aging_date, 0);
|
|
|
CalcEngineReliability(e, false);
|
|
|
e->intro_date -= DAYS_TILL_ORIGINAL_BASE_YEAR;
|
|
|
TimerGameCalendar::date -= DAYS_TILL_ORIGINAL_BASE_YEAR;
|
|
|
e->intro_date -= CalendarTime::DAYS_TILL_ORIGINAL_BASE_YEAR;
|
|
|
TimerGameCalendar::date -= CalendarTime::DAYS_TILL_ORIGINAL_BASE_YEAR;
|
|
|
|
|
|
/* Make sure for example monorail and maglev are available when they should be */
|
|
|
if (TimerGameCalendar::date >= e->intro_date && HasBit(e->info.climates, 0)) {
|
|
|
e->flags |= ENGINE_AVAILABLE;
|
|
|
e->company_avail = MAX_UVALUE(CompanyMask);
|
|
|
e->age = TimerGameCalendar::date > e->intro_date ? static_cast<int32_t>(TimerGameCalendar::date - e->intro_date) / 30 : 0;
|
|
@@ -1017,13 +1017,13 @@ static bool LoadOldCompany(LoadgameState
|
|
|
* Ps: this also means that if you had exact 893288 pounds, you will go back
|
|
|
* to 100000.. this is a very VERY small chance ;) */
|
|
|
if (c->money == 893288) c->money = c->current_loan = 100000;
|
|
|
}
|
|
|
|
|
|
_company_colours[num] = (Colours)c->colour;
|
|
|
c->inaugurated_year -= ORIGINAL_BASE_YEAR;
|
|
|
c->inaugurated_year -= CalendarTime::ORIGINAL_BASE_YEAR;
|
|
|
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
static uint32_t _old_order_ptr;
|
|
|
static uint16_t _old_next_ptr;
|