Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix an issue whereby ObjIDs are not preserved.
Previously, when a uoid is read in from the stream, the ObjID from the stream is discarded and reassigned to the value we already know. If the key is not already known, then the next sequential ID is given. If we want to preserve IDs, then we probably want to preserve *all* IDs, even those mid-stream. This is most apparent when diffing PRPs. IDs of zero are special values to the game client that mean "always look this up by name." This situation exists in the wild, right now, on MOULa's BahroCave_District_YeeshaCave.prp. When this file is read, libHSPlasma assigns sequential IDs to the `plMipmap` references in the layers if the Textures PRP is not already loaded. If the common PRP_as_Text.py is used to diff the PRP, a comparison is made against a random/junk value, resulting in a spurious looking change. See H-uru/moul-assets#244 for an example of the confusion.
- Loading branch information