Skip to content

Refactor player transfers#2851

Open
oznogon wants to merge 7 commits into
daid:masterfrom
oznogon:2848-2849-2850-refactor-player-transfer
Open

Refactor player transfers#2851
oznogon wants to merge 7 commits into
daid:masterfrom
oznogon:2848-2849-2850-refactor-player-transfer

Conversation

@oznogon
Copy link
Copy Markdown
Contributor

@oznogon oznogon commented Apr 10, 2026

oznogon added 2 commits April 9, 2026 17:06
GuiRadarView initializes auto_center_target from my_spaceship at
construction but never updates it. After transferPlayersToShip() moves
a player to a new ship, radar views remained centered on the old ship
until the player logs out and back in.

Add a track_my_spaceship flag that keeps auto_center_target in sync
with my_spaceship each frame when true (default). Calling
setAutoCenterTarget() clears the flag, preserving behaviours that
temporarily lock onto an arbitrary target, like Spectator.
- If transferring a player in a position prohibited on the destination
  entity, move the player to an allowed position and log a warning.
  If the destination has no allowed positions, log an error and reset
  the destination's allowed positions to any.
- If transferring to a ship that lacks a PlayerControl component, add
  it.
- If transferring to a ship that has an AIController component, remove
  it.
Comment thread src/script.cpp Outdated
Comment thread src/script.cpp Outdated
Comment thread src/script.cpp Outdated
Comment thread src/script.cpp Outdated
Comment thread src/script.cpp Outdated
Co-authored-by: Garrett Guillotte <oznogon@users.noreply.github.com>
@oznogon oznogon marked this pull request as draft June 3, 2026 01:03
@oznogon oznogon requested a review from GinjaNinja32 June 3, 2026 01:04
@oznogon oznogon marked this pull request as ready for review June 3, 2026 01:17
Comment thread src/screenComponents/radarView.h Outdated
@oznogon oznogon requested a review from daid June 4, 2026 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants