Skip to content

Spectate mode improvements#391

Merged
GooberRF merged 3 commits into
masterfrom
spec-improvements
Jul 15, 2026
Merged

Spectate mode improvements#391
GooberRF merged 3 commits into
masterfrom
spec-improvements

Conversation

@GooberRF

@GooberRF GooberRF commented Jul 15, 2026

Copy link
Copy Markdown
Owner
  • Add Attach Spectate Camera control to toggle spectate between following a player and a detached free camera
  • Add Change Spectate View control to switch first/third person while following a player, or free look/static camera while detached
  • Add a middle mouse toggled orbit camera to third person spectate
  • Add stepped zoom to free look spectate
  • Add the ability to drop reusable static cameras in free look spectate, then cycle level-placed and player-dropped cameras in static camera view
  • Add numpad quick-binds to jump directly to bound players or cameras while spectating, with dropped cameras and binds persisted per level
  • Add spectate_cameras console command to toggle showing camera meshes at static camera locations while free look spectating

Resolves #338
Partially resolves #76

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 .afl per-level saved-info persistence (dropped cameras + numpad binds) with a new AFL_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.

Comment thread game_patch/rf/player/control_config.h
Comment thread game_patch/hud/multi_spectate.cpp
Comment thread game_patch/hud/multi_spectate.cpp
Comment thread game_patch/hud/multi_spectate.cpp

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.

Comment thread game_patch/hud/multi_spectate.cpp

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.

Comment thread game_patch/rf/player/control_config.h
Comment thread game_patch/hud/multi_spectate.cpp
@GooberRF
GooberRF marked this pull request as ready for review July 15, 2026 18:52
@GooberRF
GooberRF merged commit 60232dc into master Jul 15, 2026
5 checks passed
@GooberRF
GooberRF deleted the spec-improvements branch July 15, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Zoom in freelook (spectate) Additional Spectate Camera options

2 participants