1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2025-12-10 06:52:05 +01:00

Change: Explicitly reserve sprite group types >= 0x80. (#14836)

The NewGRF spec does not mention that sprite group `type` and the `num-ent1` fields are the same.

Reserve all unrecognised special types in case they are wanted at some point.
This commit is contained in:
Peter Nelson
2025-11-30 09:12:29 +00:00
committed by GitHub
parent 84d89cc802
commit 0600fbe34b

View File

@@ -525,6 +525,11 @@ static void NewSpriteGroup(ByteReader &buf)
/* Neither a variable or randomized sprite group... must be a real group */ /* Neither a variable or randomized sprite group... must be a real group */
default: default:
{ {
if (type >= 0x80) {
GrfMsg(0, "NewSpriteGroup: Reserved group type 0x{:02X}, skipping", type);
return;
}
switch (feature) { switch (feature) {
case GSF_TRAINS: case GSF_TRAINS:
case GSF_ROADVEHICLES: case GSF_ROADVEHICLES: