Fix SetCameraFree bugging up in OnWorldInitialized

This commit is contained in:
David Vogel 2022-07-29 00:25:19 +02:00
parent b81fcd8417
commit 83be64dd74

View File

@ -81,6 +81,9 @@ end
---Ensures chunks around the player have been loaded & created.
---@param playerEntityID integer
function OnPlayerSpawned(playerEntityID)
-- Set camera free based on mod settings.
-- We need to do this here, otherwise it will bug up or delete the player entity.
Modification.SetCameraFree()
end
---Called when the player dies.
@ -91,8 +94,6 @@ end
---Called once the game world is initialized.
---Doesn't ensure any chunks around the player.
function OnWorldInitialized()
-- Set camera free based on mod settings.
Modification.SetCameraFree() -- BUG: Calling this here has the side effect of the player entity not being loaded. Also the player UI will be gone
end
---Called *every* time the game is about to start updating the world.