diff --git a/src/newgrf.h b/src/newgrf.h index a04dcf71c4..d652aeed22 100644 --- a/src/newgrf.h +++ b/src/newgrf.h @@ -92,6 +92,7 @@ enum GrfSpecFeature : uint8_t { GSF_BADGES, GSF_END, + GSF_DEFAULT = GSF_END, ///< Unspecified feature, default badge GSF_FAKE_TOWNS = GSF_END, ///< Fake town GrfSpecFeature for NewGRF debugging (parent scope) GSF_FAKE_END, ///< End of the fake features diff --git a/src/newgrf/newgrf_act3.cpp b/src/newgrf/newgrf_act3.cpp index 96fffac525..c68cba4dc1 100644 --- a/src/newgrf/newgrf_act3.cpp +++ b/src/newgrf/newgrf_act3.cpp @@ -651,7 +651,7 @@ static void BadgeMapSpriteGroup(ByteReader &buf, uint8_t idcount) } auto &badge = *GetBadge(found->second); - badge.grf_prop.SetSpriteGroup(GSF_END, _cur_gps.spritegroups[groupid]); + badge.grf_prop.SetSpriteGroup(GSF_DEFAULT, _cur_gps.spritegroups[groupid]); badge.grf_prop.SetGRFFile(_cur_gps.grffile); badge.grf_prop.local_id = local_id; } diff --git a/src/newgrf_badge.cpp b/src/newgrf_badge.cpp index 08d9bb641a..c088b439d0 100644 --- a/src/newgrf_badge.cpp +++ b/src/newgrf_badge.cpp @@ -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); } /**