From c4246159af8dc7f8a5ea680d788e71ae46c0850c Mon Sep 17 00:00:00 2001 From: Zackhasacat Date: Thu, 27 Apr 2023 19:37:38 +0000 Subject: [PATCH] Fix gameObject.teleport function, previously would not work with items in inventories --- apps/openmw/mwlua/objectbindings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/openmw/mwlua/objectbindings.cpp b/apps/openmw/mwlua/objectbindings.cpp index 9c629aa2c0..5a14053fcf 100644 --- a/apps/openmw/mwlua/objectbindings.cpp +++ b/apps/openmw/mwlua/objectbindings.cpp @@ -357,7 +357,7 @@ namespace MWLua [cell, pos, rot] { teleportPlayer(cell, pos, rot); }); else context.mLuaManager->addAction( - [object, cell, pos, rot] { teleportNotPlayer(object.ptr(), cell, pos, rot); }, + [obj = Object(ptr), cell, pos, rot] { teleportNotPlayer(obj.ptr(), cell, pos, rot); }, "TeleportAction"); }; }