Changeset - r24561:793ee82032b2
[Not reviewed]
master
0 1 0
frosch - 4 years ago 2021-01-03 14:05:34
frosch@openttd.org
Cleanup 8139b14: Move a comment back to the line it belongs to, and add a comment for new code.
1 file changed with 5 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/engine.cpp
Show inline comments
 
@@ -643,9 +643,8 @@ void StartupOneEngine(Engine *e, Date ag
 
	e->company_avail = 0;
 
	e->company_hidden = 0;
 

	
 
	/* Don't randomise the start-date in the first two years after gamestart to ensure availability
 
	 * of engines in early starting games.
 
	 * Note: TTDP uses fixed 1922 */
 
	/* Vehicles with the same base_intro date shall be introduced at the same time.
 
	 * Make sure they use the same randomisation of the date. */
 
	SavedRandomSeeds saved_seeds;
 
	SaveRandomSeeds(&saved_seeds);
 
	SetRandomSeed(_settings_game.game_creation.generation_seed ^
 
@@ -654,6 +653,9 @@ void StartupOneEngine(Engine *e, Date ag
 
	              e->GetGRFID());
 
	uint32 r = Random();
 

	
 
	/* Don't randomise the start-date in the first two years after gamestart to ensure availability
 
	 * of engines in early starting games.
 
	 * Note: TTDP uses fixed 1922 */
 
	e->intro_date = ei->base_intro <= ConvertYMDToDate(_settings_game.game_creation.starting_year + 2, 0, 1) ? ei->base_intro : (Date)GB(r, 0, 9) + ei->base_intro;
 
	if (e->intro_date <= _date) {
 
		e->age = (aging_date - e->intro_date) >> 5;
0 comments (0 inline, 0 general)