forked from mirror/OpenTTD
Codechange: Deduplicate ResolveReal() for resolvers that don't use real sprite groups.
This may change behaviour when multiple loading/loaded stages are provided, as the various copies checked in different orders, however only one result is expected in these cases anyway.
This commit is contained in:
@@ -124,6 +124,9 @@ static inline uint32 GetVariable(const ResolverObject &object, ScopeResolver *sc
|
||||
*/
|
||||
/* virtual */ const SpriteGroup *ResolverObject::ResolveReal(const RealSpriteGroup *group) const
|
||||
{
|
||||
if (!group->loaded.empty()) return group->loaded[0];
|
||||
if (!group->loading.empty()) return group->loading[0];
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user