Skip to content

Commit

Permalink
fix: only reset view to WorldView when Player enters system
Browse files Browse the repository at this point in the history
Fixes pioneerspacesim#5935

Bug introduced in 99b0acd, the
'onEnterSystem' event needs to check whether the ship which entered the
system is the Player.
  • Loading branch information
mwerle authored and impaktor committed Oct 9, 2024
1 parent 770ed87 commit c0e162d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion data/libs/Player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,8 @@ local onGameEnd = function ()
-- clean up for next game:
end

local onEnterSystem = function ()
local onEnterSystem = function (ship)
if not ship.IsPlayer() then return end
-- Return to game view when we exit hyperspace
if Engine.GetResetViewOnHyperspaceExit() and Game.CurrentView() ~= "world" then
Game.SetView("world")
Expand Down

0 comments on commit c0e162d

Please sign in to comment.