Open TiberiumFusion opened 2 years ago
Yeah, you gotta use the replaced name for it to work. z_sniperrifle_rightoot
. It looks like only _R_ should get replaced with 'right' though so not sure why it replaced a single 'R' in this case.
I think a good improvement is to also add a key to the table for the real bone name https://github.com/CapsAdmin/pac3/blame/cd65ad180cd19cc5053b398df39e3df4621cab44/lua/pac3/core/client/bones.lua#L60
Also figure out why 'R' got replaced when only '_R_' is supposed to be replaced
I think the '_' got matched with {"%p", " "}
and then the ' R' got matched with {" R", " right"},
The internals of how bone names work is stupid. It should have been using the actual bone name when serializing and then the friendly names as translation.
Because right now if we change how this works we might break other outfits.
Yeah, I assume they saved the nice names. It's not too late to change it, just have to keep the old keys as well for compatibility.
I would rather suggest versioning the outfit savedata. It would be a cleaner fix than having two name keys and a still-loaded footgun.
I have a model with a bone named "Z_SniperRifle_Root". The editor is renaming this bone to "z_sniperrifle_rightoot". Entering "z_sniperrifle_root" into any bone selection field confuses pac and fails to the associate with the intended bone. Seems like a bad Lua pattern for matching stuff like "SomeBone_R".
This is with the workshop version of pac, which calls itself "Die-Clipping-Internal" as of writing this.