Skip to content

Refactor player transfers#2851

Open
oznogon wants to merge 2 commits intodaid:masterfrom
oznogon:2848-2849-2850-refactor-player-transfer
Open

Refactor player transfers#2851
oznogon wants to merge 2 commits intodaid: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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant