If they try to melee, they hit the ground, and their vomit just flies above the player's head. Think throwing knives is broken, too.
https://drive.google.com/file/d/1owvPLp ... sp=sharing
[refactoring5]: Blood: Butchers are broken
Moderator: Raze Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
-
- Posts: 1349
- Joined: Tue Nov 05, 2019 6:48 am
- Preferred Pronouns: He/Him
- Graphics Processor: nVidia with Vulkan support
-
- Posts: 830
- Joined: Sun Jun 16, 2019 9:17 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Gosford NSW, Australia
Re: [refactoring5]: Blood: Butchers are broken
This issue starts with commit "- floatified PukeSeqCallback", but the commit before hand (- floatified HackSeqCallback) should be reviewed as well as they both have a similar setup, and therefore both could be wrong.
Seems that the angle of the position vector is no longer factored in, but attempting to fix it in the way I thought it should be fixed did not yield a successful result.
Seems that the angle of the position vector is no longer factored in, but attempting to fix it in the way I thought it should be fixed did not yield a successful result.
-
- Lead GZDoom+Raze Developer
- Posts: 49200
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [refactoring5]: Blood: Butchers are broken
Ok, I'll check this out later today.
-
- Lead GZDoom+Raze Developer
- Posts: 49200
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [refactoring5]: Blood: Butchers are broken
I cannot test this myself right now, but IMO the problem here is an incorrect length of the vector.
The omission of the angle is intentional, all this code did was taking the angle from the vector and then taking a vector from the angle - all this did was normalize the vector without taking a square root.
Where this went wrong is the fixed point conversion so the ratio of xy vs. z is wrong - but this messy Blood math is too awful to wrap my head around without any ability to test in-game.
The omission of the angle is intentional, all this code did was taking the angle from the vector and then taking a vector from the angle - all this did was normalize the vector without taking a square root.
Where this went wrong is the fixed point conversion so the ratio of xy vs. z is wrong - but this messy Blood math is too awful to wrap my head around without any ability to test in-game.
-
- Lead GZDoom+Raze Developer
- Posts: 49200
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [refactoring5]: Blood: Butchers are broken
Fixed all 3 issues
The causes were very different, though:
For the vomit the z-offset was incorrectly scaled. xrepeat is Q2.6, but was used as a Build-z value here, meaning it had to be multiplied by 0.25 in floating point space.
The knife had an error in the original code. It added eyeHeight as z-offset, but forgot that this value is in pixels, effectively passing 0.5 as offset. As it just so happens, this attack needs an offset of 0, so the half pixel difference was irrelevant. When floatifying this the value remained unchanged and became far too large.
The melee attack simply forgot to add the scaling when floatified
HackSeqCallback is fine, though. It calculates the correct z-component of the vector.
The causes were very different, though:
For the vomit the z-offset was incorrectly scaled. xrepeat is Q2.6, but was used as a Build-z value here, meaning it had to be multiplied by 0.25 in floating point space.
The knife had an error in the original code. It added eyeHeight as z-offset, but forgot that this value is in pixels, effectively passing 0.5 as offset. As it just so happens, this attack needs an offset of 0, so the half pixel difference was irrelevant. When floatifying this the value remained unchanged and became far too large.
The melee attack simply forgot to add the scaling when floatified
HackSeqCallback is fine, though. It calculates the correct z-component of the vector.