mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 06:15:04 +00:00
(svn r12180) -Fix: Test purchase list loading/loaded sprites instead of unconditionally returning a possibly non-existant sprite.
This commit is contained in:
parent
509b3a3247
commit
a4c14fb442
@ -765,7 +765,11 @@ static const SpriteGroup *VehicleResolveReal(const ResolverObject *object, const
|
||||
uint totalsets;
|
||||
uint set;
|
||||
|
||||
if (v == NULL) return group->g.real.loading[0];
|
||||
if (v == NULL) {
|
||||
if (group->g.real.num_loading > 0) return group->g.real.loading[0];
|
||||
if (group->g.real.num_loaded > 0) return group->g.real.loaded[0];
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool in_motion = v->First()->current_order.type != OT_LOADING;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user