Changeset - r6657:0c1322cba91d
[Not reviewed]
master
0 2 0
peter1138 - 17 years ago 2007-05-20 09:17:42
peter1138@openttd.org
(svn r9888) -Codechange: [NewGRF] allow non-spec cargo action2s to work, and using the goods sprite if really nothing is returned.
2 files changed with 6 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/newgrf_cargo.cpp
Show inline comments
 
@@ -39,10 +39,12 @@ static uint32 CargoGetVariable(const Res
 

	
 
static const SpriteGroup *CargoResolveReal(const ResolverObject *object, const SpriteGroup *group)
 
{
 
	/* Cargo action 2s should always have only 1 "loaded" state */
 
	if (group->g.real.num_loaded == 0) return NULL;
 
	/* Cargo action 2s should always have only 1 "loaded" state, but some
 
	 * times things don't follow the spec... */
 
	if (group->g.real.num_loaded > 0) return group->g.real.loaded[0];
 
	if (group->g.real.num_loading > 0) return group->g.real.loading[0];
 

	
 
	return group->g.real.loaded[0];
 
	return NULL;
 
}
 

	
 

	
src/station_gui.cpp
Show inline comments
 
@@ -686,7 +686,7 @@ static void DrawCargoIcons(CargoID i, ui
 
		sprite = cs->sprite;
 
	}
 

	
 
	if (sprite == 0) return;
 
	if (sprite == 0) sprite = SPR_CARGO_GOODS;
 

	
 
	do {
 
		DrawSprite(sprite, PAL_NONE, x, y);
0 comments (0 inline, 0 general)