Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fixed skinned vehicles showing pink after reload #2872

Merged
merged 2 commits into from
Mar 17, 2022

Conversation

ohlidalp
Copy link
Member

Resource management is hard.

There's usually more than one .truck and possibly several .skin entries in a ZIP file from the repo. Modcache creates a CacheEntry for each of these, and it must keep them in sync - when one is loaded, the others must be notified. This was hapenning correctly on unloading, but not on (re)loading.

Removed stray line accidentally duplicated from ReLoadResource() in 28f2cf0
Fixes RigsOfRods#2864
CacheEntries often share the same resoruce bundle (think multiple .truck or .skin files in one ZIP). In that case, their 'resource_group' member variable should always be in sync. This was done properly in UnLoadResource() but not in LoadResource().
@ohlidalp ohlidalp requested a review from tritonas00 March 17, 2022 20:18
@ohlidalp ohlidalp merged commit 9f9fd45 into RigsOfRods:master Mar 17, 2022
@ohlidalp ohlidalp deleted the fix-skinzip-pink branch March 17, 2022 21:07
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants