1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 09:35:28 +00:00
This commit is contained in:
Petr Mikheev 2023-11-05 21:32:18 +01:00
parent 231803c6ea
commit a60726ce35
2 changed files with 7 additions and 4 deletions

View File

@ -344,6 +344,12 @@ namespace MWLua
playerScripts->uiModeChanged(argId, false);
}
void LuaManager::useItem(const MWWorld::Ptr& object, const MWWorld::Ptr& actor, bool force)
{
MWBase::Environment::get().getWorldModel()->registerPtr(object);
mEngineEvents.addToQueue(EngineEvents::OnUseItem{ getId(actor), getId(object), force });
}
void LuaManager::objectAddedToScene(const MWWorld::Ptr& ptr)
{
mObjectLists.objectAddedToScene(ptr); // assigns generated RefNum if it is not set yet.

View File

@ -77,10 +77,7 @@ namespace MWLua
{
mEngineEvents.addToQueue(EngineEvents::OnActivate{ getId(actor), getId(object) });
}
void useItem(const MWWorld::Ptr& object, const MWWorld::Ptr& actor, bool force) override
{
mEngineEvents.addToQueue(EngineEvents::OnUseItem{ getId(actor), getId(object), force });
}
void useItem(const MWWorld::Ptr& object, const MWWorld::Ptr& actor, bool force) override;
void exteriorCreated(MWWorld::CellStore& cell) override
{
mEngineEvents.addToQueue(EngineEvents::OnNewExterior{ cell });