mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-14 23:05:57 -04:00
remove world vfx only if vfxId is not empty
This commit is contained in:
parent
9a7fefb2dd
commit
c75121e6ec
@ -302,7 +302,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…
x
Reference in New Issue
Block a user