1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-19 15:39:49 +00:00

Move camera update after teleporting from worldimp to camera.lua

This commit is contained in:
Petr Mikheev 2023-07-19 10:39:54 +02:00
parent 4016e8b383
commit f2edf05a55
2 changed files with 3 additions and 2 deletions

View file

@ -971,7 +971,6 @@ namespace MWWorld
removeContainerScripts(getPlayerPtr());
mWorldScene->changeToInteriorCell(cellName, position, adjustPlayerPos, changeEvent);
addContainerScripts(getPlayerPtr(), getPlayerPtr().getCell());
mRendering->getCamera()->instantTransition();
}
void World::changeToCell(
@ -996,7 +995,6 @@ namespace MWWorld
else
mWorldScene->changeToInteriorCell(destinationCell->getNameId(), position, adjustPlayerPos, changeEvent);
addContainerScripts(getPlayerPtr(), getPlayerPtr().getCell());
mRendering->getCamera()->instantTransition();
}
float World::getMaxActivationDistance() const

View file

@ -281,6 +281,9 @@ return {
end
move360.onInputAction(action)
end,
onTeleported = function()
camera.instantTransition()
end,
onActive = init,
onLoad = function(data)
if data and data.distance then third_person.baseDistance = data.distance end