summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorMegaMech <MegaMech@users.noreply.github.com>2025-02-07 19:27:44 -0700
committerGitHub <noreply@github.com>2025-02-07 19:27:44 -0700
commit7fe705227028ef136317fbc9eceafd8bd366e6a2 (patch)
treefb4c72186fdc7484ad1734f3846988009e799ab4 /src/main.c
parentfc1e1a97825c129f114a5c59ab1820d1a1b9187f (diff)
Finish Freecam (#186)
* Fix freecam rotation smoothing * Configure freecam controller * Fix cont z button and impl freecam on/off events
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index e4e49d155..48fcec7ac 100644
--- a/src/main.c
+++ b/src/main.c
@@ -367,13 +367,18 @@ void update_controller(s32 index) {
}
// Prevents pause menu intereference while controlling flycam
- if ((CVarGetInteger("gFreecam", 0) == 1) && (gFreecamControllerType == 0) && (gGamestate == RACING)) {
+ // Freecam only works with controller 1
+ if ((CVarGetInteger("gFreecam", 0) == 1) && (gGamestate == RACING) && (index == 0)) {
+ freecam_update_controller();
return;
}
controller->rawStickX = gControllerPads[index].stick_x;
controller->rawStickY = gControllerPads[index].stick_y;
+ controller->rightRawStickX = gControllerPads[index].right_stick_x;
+ controller->rightRawStickY = gControllerPads[index].right_stick_y;
+
if ((gControllerPads[index].button & 4) != 0) {
gControllerPads[index].button |= Z_TRIG;
}