Skip to content

Fix: Don't create unreferenced purchase CB36 - #448

Open
glx22 wants to merge 1 commit into
OpenTTD:masterfrom
glx22:cb36
Open

glx22 wants to merge 1 commit into
OpenTTD:masterfrom
glx22:cb36

Conversation

@glx22

@glx22 glx22 commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

After #447, I looked into detecting reference counting issues, and I found it was possible to create non referenced action2 for purchase CB36.

There are 4 in example_road_vehicle:

To prevent it, I had to rework the automatic creation of cargo_gfx[None] and cargo_gfx[0xFF] during graphics block parsing. That allowed to check if purchase CB36 actions are needed.

And it's no longer possible to have a non referenced action2 (the issue fixed in #447 would have been detected way sooner).

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.

1 participant