mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-08-03 15:27:13 -04:00
Fix optional vals
This commit is contained in:
parent
855fa1e06e
commit
20b9ca2fe9
@ -501,10 +501,11 @@ namespace MWLua
|
||||
});
|
||||
};
|
||||
objectT["setTransform"] = [context](const GObject& object, const osg::Vec3f& newPos,
|
||||
const sol::object& newRotObj, bool terrainClamp = true) {
|
||||
sol::object newRotObj, sol::optional<bool> terrainClampOpt) {
|
||||
bool terrainClamp = terrainClampOpt.value_or(true);
|
||||
MWWorld::Ptr ptr = object.ptr();
|
||||
if (ptr.getCellRef().getCount() == 0 || !ptr.isInCell())
|
||||
throw std::runtime_error("Object is either removed or already in the process of teleporting");
|
||||
throw std::runtime_error("Object is either removed or in the process of teleporting");
|
||||
|
||||
osg::Vec3f finalPos = newPos;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user