1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-31 16:15:35 +00:00

Remove lua action

This commit is contained in:
Zackhasacat 2023-10-25 17:24:18 -05:00
parent f4d349070c
commit 3e31142c0b

View file

@ -148,8 +148,7 @@ namespace MWLua
throw std::runtime_error("The argument must be a player.");
if (dynamic_cast<const LObject*>(&player) && !dynamic_cast<const SelfObject*>(&player))
throw std::runtime_error("Only player and global scripts can toggle teleportation.");
context.mLuaManager->addAction([state] { MWBase::Environment::get().getWorld()->enableTeleporting(state); },
"toggleTeleportingAction");
MWBase::Environment::get().getWorld()->enableTeleporting(state);
};
player["setControlSwitch"] = [input](const Object& player, std::string_view key, bool v) {
if (player.ptr() != MWBase::Environment::get().getWorld()->getPlayerPtr())