Spectate mode improvements#391
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands multiplayer spectate functionality by splitting spectating into attached (player) vs detached (free/static) views, adding third-person orbit + static camera workflows, and persisting per-level spectate camera data to disk.
Changes:
- Adds new spectate control actions (Attach Spectate Camera / Change Spectate View) and updates input handling (including numpad quick-binds).
- Implements static cameras (level + player-dropped), optional in-world camera markers, and free-look stepped zoom with FOV scaling.
- Introduces
.aflper-level saved-info persistence (dropped cameras + numpad binds) with a newAFL_VERSION.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| game_patch/rf/player/player.h | Adds PF_HIDE_FROM_CAMERA flag constant used by spectate rendering logic. |
| game_patch/rf/player/control_config.h | Adds new Alpine control actions for spectate attach/view switching (impacts bind IDs). |
| game_patch/rf/player/camera.h | Exposes fixed-camera globals and position/orientation accessors for static spectate. |
| game_patch/multi/saved_info.h | Declares helpers for reading/writing per-level TOML saved info. |
| game_patch/multi/saved_info.cpp | Implements .afl pathing, TOML IO, and vec3 parsing utilities. |
| game_patch/misc/camera.cpp | Hooks per-frame camera updates so orbit/static spectate can position the camera. |
| game_patch/misc/alpine_settings.h | Adds spectate_show_camera_meshes setting. |
| game_patch/misc/alpine_settings.cpp | Loads/saves the new spectate camera-mesh setting. |
| game_patch/input/mouse.cpp | Allows mouse deltas through for third-person orbit spectate while dead. |
| game_patch/input/key.cpp | Adds new spectate binds and processes per-frame numpad spectate binds. |
| game_patch/hud/multi_spectate.h | Expands spectate API surface (attach/change view/static/orbit/fov scaling/binds). |
| game_patch/hud/multi_spectate.cpp | Major spectate rework: modes, orbit, static cameras, persistence, UI hints, rendering. |
| game_patch/graphics/gr.cpp | Applies spectate zoom scaling to world FOV. |
| game_patch/CMakeLists.txt | Adds multi/saved_info.* to the build. |
| common/include/common/version/version.h | Adds AFL_VERSION for per-level saved-info format. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
GooberRF
marked this pull request as ready for review
July 15, 2026 18:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Attach Spectate Cameracontrol to toggle spectate between following a player and a detached free cameraChange Spectate Viewcontrol to switch first/third person while following a player, or free look/static camera while detachedspectate_camerasconsole command to toggle showing camera meshes at static camera locations while free look spectatingResolves #338
Partially resolves #76