Open
Conversation
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.
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.
my_spaceshipand updatingauto_center_targetappropriately.allowed_positionsmask and transferring players to allowed positions on the destination, or allowing any position on the destination if none are allowed. Both outcomes keep players in the game while logging warnings/errors for scenario authors to identify.