From 711363884839e31554ea18f1df346331011f8ac0 Mon Sep 17 00:00:00 2001 From: Petr Mikheev Date: Sat, 13 May 2023 20:39:00 +0200 Subject: [PATCH] Fix animation of teleported non-teleporting doors. --- apps/openmw/mwlua/objectbindings.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/openmw/mwlua/objectbindings.cpp b/apps/openmw/mwlua/objectbindings.cpp index 55f18a01ac..d5c896378c 100644 --- a/apps/openmw/mwlua/objectbindings.cpp +++ b/apps/openmw/mwlua/objectbindings.cpp @@ -102,6 +102,11 @@ namespace MWLua world->rotateObject(newPtr, rot, MWBase::RotationFlag_none); if (placeOnGround) world->adjustPosition(newPtr, true); + if (cls.isDoor()) + { // Change "original position and rotation" because without it teleported animated doors don't work + // properly. + newPtr.getCellRef().setPosition(newPtr.getRefData().getPosition()); + } if (!newPtr.getRefData().isEnabled()) world->enable(newPtr); }