1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-21 09:09:43 +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()); removeContainerScripts(getPlayerPtr());
mWorldScene->changeToInteriorCell(cellName, position, adjustPlayerPos, changeEvent); mWorldScene->changeToInteriorCell(cellName, position, adjustPlayerPos, changeEvent);
addContainerScripts(getPlayerPtr(), getPlayerPtr().getCell()); addContainerScripts(getPlayerPtr(), getPlayerPtr().getCell());
mRendering->getCamera()->instantTransition();
} }
void World::changeToCell( void World::changeToCell(
@ -996,7 +995,6 @@ namespace MWWorld
else else
mWorldScene->changeToInteriorCell(destinationCell->getNameId(), position, adjustPlayerPos, changeEvent); mWorldScene->changeToInteriorCell(destinationCell->getNameId(), position, adjustPlayerPos, changeEvent);
addContainerScripts(getPlayerPtr(), getPlayerPtr().getCell()); addContainerScripts(getPlayerPtr(), getPlayerPtr().getCell());
mRendering->getCamera()->instantTransition();
} }
float World::getMaxActivationDistance() const float World::getMaxActivationDistance() const

View file

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