mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-17 11:43:25 +00:00
Allow to handle activation in Lua even for mwscripted objects
This commit is contained in:
parent
62ef209185
commit
c5871a5a7a
@ -274,6 +274,8 @@ namespace MWLua
|
||||
});
|
||||
|
||||
api["_runStandardActivationAction"] = [context](const GObject& object, const GObject& actor) {
|
||||
if (!object.ptr().getRefData().activate())
|
||||
return;
|
||||
context.mLuaManager->addAction(
|
||||
[object, actor] {
|
||||
const MWWorld::Ptr& objPtr = object.ptr();
|
||||
|
@ -3707,8 +3707,7 @@ namespace MWWorld
|
||||
void World::activate(const Ptr& object, const Ptr& actor)
|
||||
{
|
||||
breakInvisibility(actor);
|
||||
if (object.getRefData().activate())
|
||||
MWBase::Environment::get().getLuaManager()->objectActivated(object, actor);
|
||||
MWBase::Environment::get().getLuaManager()->objectActivated(object, actor);
|
||||
}
|
||||
|
||||
struct ResetActorsVisitor
|
||||
|
Loading…
x
Reference in New Issue
Block a user