
how do you even come to the conclusion that you have to call it twice..
I'm still picking up very basic programming but I've run into similar things. Look at tutorial, command is done once. Try my hand at it, need to do it twice. Can't verify for what reason, but it works. Lesson complete.
This is... My first intuition is it's a multithreading thing where you need a mutex but if your game isn't multithreaded I've got no clue. Maybe the order is wrong inside the function? Like the code for "set data" is below the code for "apply data as skin", where it should be above it?
It's single-threaded and everything's in the right order -- trust me, I checked several times before resorting to this lmao. Sometimes plugin interactions are just cursed ¯\_(ツ)_/¯
Huh. What plugin is it that's causing this, anyways? My next thought is that it's some bullshit with a void pointer where some pointer arithmetic is going wrong, and having the data at function start doesn't break it, but I'm guessing that wouldn't be your code anyways.
It could also be a memory thing? I think there are compiler optimizations having to do with the cache that require you to set the volatile keyword, and maybe the second time it gets called the memory is in the cache so it works correctly.
This is the kind of bug that universally scares me because it's always some horrible bullshit under the hood.
spine, which is broadly speaking very cooperative and useful!
Oh god it's an issue with the animation system. Consider exorcising the computer to remove trickster spirits.
First thought: that would drive me so crazy i would literally not be able to work on the rest of the game until i had Solved it
Second thought: maybe just rename SetSkin() to something else and then make a new function called SetSkin() that calls the original one twice so that you dont ever have to worry about forgetting the second call etc.
oh i literally only need to do the second call in this one specific location. this is for character creation which has a lot of resetting the same skin, which is where the fiddly stuff comes in that requires double-setting it. for the whole rest of the game, i only need to call setskin() once lol
Hello! I would expect somewhere inside your set skin is:
1, update body part visually
2, set data of body part.
As a result of it being out of order, you have to call it twice, since you have to set the data before updating it visually.
But you said that everything is in proper order and you've checked. I would suggest adding in the updating-visually an extra time after each time you set data, and test results.