src/newgrf_cargo.cpp
changeset 7153 85b73fcc076b
parent 6956 0d884da2fd1c
child 7695 b15538ba7152
equal deleted inserted replaced
7152:cba0314cb5e6 7153:85b73fcc076b
    37 }
    37 }
    38 
    38 
    39 
    39 
    40 static const SpriteGroup *CargoResolveReal(const ResolverObject *object, const SpriteGroup *group)
    40 static const SpriteGroup *CargoResolveReal(const ResolverObject *object, const SpriteGroup *group)
    41 {
    41 {
    42 	/* Cargo action 2s should always have only 1 "loaded" state */
    42 	/* Cargo action 2s should always have only 1 "loaded" state, but some
    43 	if (group->g.real.num_loaded == 0) return NULL;
    43 	 * times things don't follow the spec... */
       
    44 	if (group->g.real.num_loaded > 0) return group->g.real.loaded[0];
       
    45 	if (group->g.real.num_loading > 0) return group->g.real.loading[0];
    44 
    46 
    45 	return group->g.real.loaded[0];
    47 	return NULL;
    46 }
    48 }
    47 
    49 
    48 
    50 
    49 static void NewCargoResolver(ResolverObject *res, const CargoSpec *cs)
    51 static void NewCargoResolver(ResolverObject *res, const CargoSpec *cs)
    50 {
    52 {