Skip to content

Fix b86d930: incorrect sprite ID limit, and reuse old IDs when limit is reached#431

Merged
glx22 merged 1 commit into
OpenTTD:masterfrom
glx22:action1_id_loop
May 29, 2026
Merged

Fix b86d930: incorrect sprite ID limit, and reuse old IDs when limit is reached#431
glx22 merged 1 commit into
OpenTTD:masterfrom
glx22:action1_id_loop

Conversation

@glx22

@glx22 glx22 commented May 28, 2026

Copy link
Copy Markdown
Contributor

#309 replaced a global limit of 0xFF sprites per action1 block with a max id (0x3FFF or 0xFFFF depending on feature) stored in each collection. And nmlc crashes once the limit is reached.

Actually all features should have 0x3FFF as max id.
And crashing when limit is reached is not nice, it's better to start reusing old IDs.

@glx22 glx22 force-pushed the action1_id_loop branch from 74e5ff5 to bb0fb91 Compare May 28, 2026 22:52
@glx22 glx22 changed the title Fix b86d930: incorrect sprite ID limit, now reuse old IDs when limit is reached Fix b86d930: incorrect sprite ID limit, and reuse old IDs when limit is reached May 28, 2026
@glx22 glx22 force-pushed the action1_id_loop branch from bb0fb91 to 6371835 Compare May 29, 2026 03:12
@glx22 glx22 force-pushed the action1_id_loop branch from 6371835 to cb678f9 Compare May 29, 2026 03:15
@andythenorth

Copy link
Copy Markdown
Contributor

Works for me. Resolves the failure cases that Iron Horse exposed.

@glx22 glx22 merged commit d9a5b77 into OpenTTD:master May 29, 2026
24 checks passed
@glx22 glx22 deleted the action1_id_loop branch May 29, 2026 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants