mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-21 18:40:01 +00:00
Merge branch 'lua_activate' into 'master'
[Lua] Fix the bug that object:activate() doesn't trigger mwscripts See merge request OpenMW/openmw!1834
This commit is contained in:
commit
71e4e5ceec
@ -95,9 +95,12 @@ namespace MWLua
|
||||
if (actor.isEmpty())
|
||||
throw std::runtime_error(std::string("Actor not found: " + idToString(mActor)));
|
||||
|
||||
MWBase::Environment::get().getLuaManager()->objectActivated(object, actor);
|
||||
std::unique_ptr<MWWorld::Action> action = object.getClass().activate(object, actor);
|
||||
action->execute(actor);
|
||||
if (object.getRefData().activate())
|
||||
{
|
||||
MWBase::Environment::get().getLuaManager()->objectActivated(object, actor);
|
||||
std::unique_ptr<MWWorld::Action> action = object.getClass().activate(object, actor);
|
||||
action->execute(actor);
|
||||
}
|
||||
}
|
||||
|
||||
std::string toString() const override
|
||||
|
Loading…
x
Reference in New Issue
Block a user