-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
null check #333
base: 1.0.6.4
Are you sure you want to change the base?
null check #333
Conversation
like this it would just ignore assets with handlers, if they are loaded after another mod that only adds it to bundles, so force it to change the entry in modifiedEbx |
also u need to add the same to res and chunk |
wdym |
basically the issue is:
so if mod a is loaded first the stuff mod b does is ignored, just remove the entry from modifiedEbx so it has the correct asset with the handler data |
@@ -288,7 +288,7 @@ private void ProcessModResources(IResourceContainer fmod) | |||
HandlerExtraData extraData; | |||
byte[] data = fmod.GetResourceData(resource); | |||
|
|||
if (modifiedEbx.TryGetValue(resource.Name, out EbxAssetEntry entry)) | |||
if (modifiedEbx.TryGetValue(resource.Name, out EbxAssetEntry entry) && entry?.ExtraData != null) | |||
{ | |||
extraData = (HandlerExtraData)entry.ExtraData; | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (entry != null && entry.ExtraData == null)
{
if (!archiveData.ContainsKey(entry.Sha1))
{
archiveData[entry.Sha1].RefCount--;
if (archiveData[entry.Sha1].RefCount == 0)
{
archiveData.TryRemove(entry.Sha1, out _);
}
}
modifiedEbx.TryRemove(resource.Name, out _);
}
this needs to be added after the else here, ofc also for res and chunks
No description provided.