mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-19 06:41:36 +00:00
allow activateBy to trigger handlers
This commit is contained in:
parent
b7a48e1d78
commit
30da6dc508
1 changed files with 2 additions and 2 deletions
|
@ -351,8 +351,8 @@ namespace MWLua
|
||||||
throw std::runtime_error(
|
throw std::runtime_error(
|
||||||
"The argument of `activateBy` must be an actor who activates the object. Got: "
|
"The argument of `activateBy` must be an actor who activates the object. Got: "
|
||||||
+ actor.toString());
|
+ actor.toString());
|
||||||
if (objPtr.getRefData().activate())
|
|
||||||
MWBase::Environment::get().getLuaManager()->objectActivated(objPtr, actorPtr);
|
MWBase::Environment::get().getLuaManager()->objectActivated(objPtr, actorPtr);
|
||||||
};
|
};
|
||||||
|
|
||||||
auto isEnabled = [](const ObjectT& o) { return o.ptr().getRefData().isEnabled(); };
|
auto isEnabled = [](const ObjectT& o) { return o.ptr().getRefData().isEnabled(); };
|
||||||
|
|
Loading…
Reference in a new issue