Add Invert Y-Axis and Apply Right-Stick Aiming to Z-Weapon Aiming (#3304)

* Add right-stick aiming to third-person aim

* Add Z-aiming CVar and inversion to Z-aiming

* Create calculation for rel.right_stick and apply it in Z-aiming

* Move option to First-Person section to match shield

* Fix max/min aiming heights

* Expand min/max + comment

* block out vanilla + comments

* block vanilla code better

* Remove extra space

* new documentation formatting

* rewrite ==0 and !=0
This commit is contained in:
Eric Hoey
2024-01-08 13:21:18 -05:00
committed by GitHub
parent 9064897736
commit a0258f0fca
5 changed files with 111 additions and 4 deletions

View File

@@ -297,6 +297,11 @@ void PadMgr_ProcessInputs(PadMgr* padMgr) {
PadUtils_UpdateRelXY(input);
input->press.stick_x += (s8)(input->cur.stick_x - input->prev.stick_x);
input->press.stick_y += (s8)(input->cur.stick_y - input->prev.stick_y);
// #region SOH [Enhancement]
PadUtils_UpdateRelRXY(input);
input->press.right_stick_x += (s8)(input->cur.right_stick_x - input->prev.right_stick_x);
input->press.right_stick_y += (s8)(input->cur.right_stick_y - input->prev.right_stick_y);
// #endregion
}
uint8_t rumble = (padMgr->rumbleEnable[0] > 0);
@@ -389,6 +394,11 @@ void PadMgr_RequestPadData(PadMgr* padMgr, Input* inputs, s32 mode) {
PadUtils_UpdateRelXY(newInput);
newInput->press.stick_x += (s8)(newInput->cur.stick_x - newInput->prev.stick_x);
newInput->press.stick_y += (s8)(newInput->cur.stick_y - newInput->prev.stick_y);
// #region SOH [Enhancement]
PadUtils_UpdateRelRXY(newInput);
newInput->press.right_stick_x += (s8)(newInput->cur.right_stick_x - newInput->prev.right_stick_x);
newInput->press.right_stick_y += (s8)(newInput->cur.right_stick_y - newInput->prev.right_stick_y);
// #endregion
}
ogInput++;
newInput++;