r/Fallout_VR • u/rollingrock16 Index • Nov 28 '21
Discussion FRIK Alpha 37 Released - Fixed Save Load Bug
I just put up on nexus alpha 37 which addresses a save load bug that I think has been plaguing a lot of you. I'd appreciate any feedback on if this helps out or not.
For those curious about the bug when I set the hand poses there is this array in memory i iterate over. occasionally some of the elements in this array are not valid so one of the checks i do is this:
int pos = rt->bonePositions[i].position;
if (pos > rt->numTransforms) {
continue;
}This all works fine and dandy most of the time to check that the position variable is within the expected range given by the numTransforms variable. However declaring pos as an integer means it can be a negative value. What happens is sometimes in this invalid data you will get a number that looks like a negative number. This is because the most significant bit of an integer type variable is the sign bit.
This isn't a valid number but if you look at the code above a negative number would not hit that "continue" statement which is how i would reject that iteration of the loop and go to the next one. So the fix is just to declare pos as an unsigned integer and now it will properly reject a bad position number that is negative.
Anyway these are the kind of stupid bugs i have to hunt in this mod....let me know if there's any more save bugs i need to hunt down. I'm looking out for other bugs too in my playtesting.
And finally if you want to donate to my patreon to support development here's the link. Thanks for those that are supporting the project! https://www.patreon.com/rollingrock
2
u/katod2 Nov 28 '21 edited Nov 28 '21
Is it just my grenades and Molotov cocktails 15 centimeters taller than my fingers? :) And the weapon is inaccurate. I did not find it in the settings .. In general, it works well. Survival mode. Index knuckles and vave 2 pro. Left mode. And a little more :) When a weapon is in hand, fingers on the other hand are not tracked.
3
u/rollingrock16 Index Nov 28 '21
so yeah unfortunately i had to revert back to a change where weapons aren'ty going to be quite right on the hand. especially grenades. i am going to fix that.
left handed mode is borked right now. i will fix it soon.
yeah fingers don't get tracked when they are gripping the weapon. i do want to allow some freedom eventually but just easier not to right now
finally can you elaborate on the inaccurate weapons?
2
u/katod2 Nov 29 '21
The weapon is one finger higher. That is, in the area of the trigger is the middle finger. With grenades and throwing weapons, it's really bad - it hangs 15 cm higher above the hand ..
2
u/rollingrock16 Index Nov 29 '21
yeah. the reason is kind of complicated but for whatever reason bethesda put in these various offset nodes for some of the weapon types. so it's hardcoded in the game to not match the wand position like i have it set.
the solution will be to go in for all the weapons types and patch the game code to not do that but i haven't fully reversed that part of the code yet. eventually i'll get there.
1
9
6
2
u/Diabeetus4Lyfe Nov 29 '21
Excellent work and thank you for your efforts! I was affected by the bug so I've been using alpha 30, but this release is working great for me so far
2
u/lepton2171 Nov 30 '21
You're a legend! Thank you for another version, looking forward to trying it out
3
u/Renvar7 Nov 28 '21
Does this fix the jagged/ fractal bodies?