Changeset - r24562:8a6603857231
[Not reviewed]
master
0 1 0
frosch - 4 years ago 2021-01-03 14:11:22
frosch@openttd.org
Cleanup 9f42358: Make also reliability_start randomised independent of introduction date.
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/engine.cpp
Show inline comments
 
@@ -662,18 +662,18 @@ void StartupOneEngine(Engine *e, Date ag
 
		e->company_avail = (CompanyMask)-1;
 
		e->flags |= ENGINE_AVAILABLE;
 
	}
 

	
 
	RestoreRandomSeeds(saved_seeds);
 

	
 
	r = Random();
 
	e->reliability_start = GB(r, 16, 14) + 0x7AE0;
 
	r = Random();
 
	e->reliability_max   = GB(r,  0, 14) + 0xBFFF;
 
	e->reliability_final = GB(r, 16, 14) + 0x3FFF;
 

	
 
	r = Random();
 
	e->reliability_final = GB(r, 16, 14) + 0x3FFF;
 
	e->duration_phase_1 = GB(r, 0, 5) + 7;
 
	e->duration_phase_2 = GB(r, 5, 4) + ei->base_life * 12 - 96;
 
	e->duration_phase_3 = GB(r, 9, 7) + 120;
 

	
 
	e->reliability_spd_dec = ei->decay_speed << 2;
 

	
0 comments (0 inline, 0 general)