diff options
| author | MegaMech <MegaMech@users.noreply.github.com> | 2025-02-07 19:27:44 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-07 19:27:44 -0700 |
| commit | 7fe705227028ef136317fbc9eceafd8bd366e6a2 (patch) | |
| tree | fb4c72186fdc7484ad1734f3846988009e799ab4 /src/main.c | |
| parent | fc1e1a97825c129f114a5c59ab1820d1a1b9187f (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.c | 7 |
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; } |
