mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-08-03 23:36:59 -04:00
Fix issues
This commit is contained in:
parent
2cd4b643d0
commit
abb381a163
@ -388,7 +388,7 @@ namespace MWLua
|
||||
objectT["setScale"] = [context](const GObject& object, float scale) {
|
||||
context.mLuaManager->addAction(
|
||||
[object, scale] { MWBase::Environment::get().getWorld()->scaleObject(object.ptr(), scale); });
|
||||
};--adjustScale
|
||||
};
|
||||
objectT["addScript"] = [context](const GObject& object, std::string_view path, sol::object initData) {
|
||||
const LuaUtil::ScriptsConfiguration& cfg = context.mLua->getConfiguration();
|
||||
std::optional<int> scriptId = cfg.findId(VFS::Path::Normalized(path));
|
||||
|
@ -129,34 +129,6 @@ ESM::NPC tableToNPC(const sol::table& rec)
|
||||
npc.mAiData.mServices = flags;
|
||||
}
|
||||
|
||||
// Travel destinations
|
||||
if (rec["travelDestinations"] != sol::nil)
|
||||
{
|
||||
const sol::table travelDests = rec["travelDestinations"];
|
||||
npc.mTransport.clear();
|
||||
for (std::size_t i = 1; i <= travelDests.size(); ++i)
|
||||
{
|
||||
sol::table t = travelDests[i];
|
||||
ESM::Transport destination;
|
||||
|
||||
// Position
|
||||
destination.mPos.pos = t["position"];
|
||||
destination.mPos.rot = Misc::Convert::toRotation(LuaUtil::fromTransform(t["rotation"]));
|
||||
|
||||
// Cell
|
||||
std::string cellId = t["cellId"];
|
||||
destination.mCellName = cellId; // If empty, it will be handled as exterior
|
||||
|
||||
npc.mTransport.push_back(destination);
|
||||
}
|
||||
}
|
||||
|
||||
return npc;
|
||||
}
|
||||
// Blood type
|
||||
if (rec["bloodType"] != sol::nil)
|
||||
npc.mBloodType = static_cast<int>(rec["bloodType"]);
|
||||
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user