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:
parent
e8c917d35e
commit
9621a2c8cf
1 changed files with 5 additions and 1 deletions
|
|
@ -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"]
|
||||
|
|
|
|||
Loading…
Reference in a new issue