Codechange: Add an explicit enum member for the default spritegroup of badges.

This commit is contained in:
frosch
2025-04-26 18:45:28 +02:00
committed by frosch
parent 29ceaf0a84
commit 893aa0fb91
3 changed files with 3 additions and 2 deletions

View File

@@ -204,7 +204,7 @@ BadgeResolverObject::BadgeResolverObject(const Badge &badge, GrfSpecFeature feat
{
assert(feature <= GSF_END);
this->root_spritegroup = this->self_scope.badge.grf_prop.GetSpriteGroup(feature);
if (this->root_spritegroup == nullptr) this->root_spritegroup = this->self_scope.badge.grf_prop.GetSpriteGroup(GSF_END);
if (this->root_spritegroup == nullptr) this->root_spritegroup = this->self_scope.badge.grf_prop.GetSpriteGroup(GSF_DEFAULT);
}
/**