Persist single-player settings and add defaults

This commit is contained in:
Kelsi 2026-02-05 17:40:15 -08:00
parent 76c4268ed8
commit d1e9bbeb1f
6 changed files with 205 additions and 2 deletions

View file

@ -952,7 +952,8 @@ void CameraController::processMouseMotion(const SDL_MouseMotionEvent& event) {
// Directly update stored yaw/pitch (no lossy forward-vector derivation)
yaw -= event.xrel * mouseSensitivity;
pitch += event.yrel * mouseSensitivity;
float invert = invertMouse ? -1.0f : 1.0f;
pitch += event.yrel * mouseSensitivity * invert;
// WoW-style pitch limits: can look almost straight down, limited upward
pitch = glm::clamp(pitch, MIN_PITCH, MAX_PITCH);