g/j2: make the turret controls respect the camera settings (#3715)

Fixes #3664
This commit is contained in:
Tyler Wilding
2024-10-19 15:16:40 -04:00
committed by GitHub
parent d82b6209b6
commit e144406c16
+3 -2
View File
@@ -1250,8 +1250,9 @@
)
)
(when (and (-> self enable-controls) (>= (-> *camera-combiner* interp-val) 1.0))
(set! (-> self rotyvv) (analog-input (the-as int (-> *cpad-list* cpads 0 leftx)) 128.0 32.0 110.0 -98304.0))
(set! (-> self rotxvv) (analog-input (the-as int (-> *cpad-list* cpads 0 lefty)) 128.0 32.0 110.0 -65536.0))
;; og:preserve-this respect the camera settings
(set! (-> self rotyvv) (analog-input-horizontal-first (the-as int (-> *cpad-list* cpads 0 leftx)) 128.0 32.0 110.0 -98304.0))
(set! (-> self rotxvv) (analog-input-vertical-first (the-as int (-> *cpad-list* cpads 0 lefty)) 128.0 32.0 110.0 -65536.0))
)
(+! (-> self rotyv) (* (-> self rotyvv) (seconds-per-frame)))
(seek! (-> self rotyv) 0.0 (* 32768.0 (seconds-per-frame)))