1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-12-24 20:53:10 +00:00

remove world vfx only if vfxId is not empty

This commit is contained in:
Sebastian Fieber 2025-07-28 19:37:34 +02:00 committed by Alexei Kotov
parent e8c917d35e
commit 9621a2c8cf

View file

@ -293,7 +293,11 @@ namespace MWLua
api["remove"] = [context](std::string vfxId) {
context.mLuaManager->addAction(
[vfxId = vfxId] { MWBase::Environment::get().getWorld()->removeEffect(vfxId); }, "openmw.vfx.remove");
[vfxId = vfxId] {
if (!vfxId.empty())
MWBase::Environment::get().getWorld()->removeEffect(vfxId);
},
"openmw.vfx.remove");
};
api["spawn"]