Changeset - r12039:bea3c1b3abb9
[Not reviewed]
master
0 1 0
smatz - 15 years ago 2009-05-27 19:37:27
smatz@openttd.org
(svn r16451) -Fix (r16449): crash when a spectator (or dedicated server) received news about new engine
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/vehicle.cpp
Show inline comments
 
@@ -1406,6 +1406,9 @@ static SpriteID GetEngineColourMap(Engin
 

	
 
	if (map == PAL_NONE) map = twocc ? (SpriteID)SPR_2CCMAP_BASE : (SpriteID)PALETTE_RECOLOUR_START;
 

	
 
	/* Spectator has news shown too, but has invalid company ID - as well as dedicated server */
 
	if (!Company::IsValidID(company)) return map;
 

	
 
	const Livery *livery = GetEngineLivery(engine_type, company, parent_engine_type, v);
 

	
 
	map += livery->colour1;
0 comments (0 inline, 0 general)