diff --git a/apps/openmw/mwlua/animationbindings.cpp b/apps/openmw/mwlua/animationbindings.cpp index 1da5c6b98f..3f96e2b037 100644 --- a/apps/openmw/mwlua/animationbindings.cpp +++ b/apps/openmw/mwlua/animationbindings.cpp @@ -294,8 +294,6 @@ namespace MWLua api["remove"] = [context](std::string vfxId) { context.mLuaManager->addAction( [vfxId = std::move(vfxId)] { - if (vfxId.empty()) - throw std::runtime_error("vfxId is empty"); MWBase::Environment::get().getWorld()->removeEffect(vfxId); }, "openmw.vfx.remove"); diff --git a/files/lua_api/openmw/world.lua b/files/lua_api/openmw/world.lua index 54dc01356d..e9fb319b1d 100644 --- a/files/lua_api/openmw/world.lua +++ b/files/lua_api/openmw/world.lua @@ -210,7 +210,7 @@ --- -- Remove all VFX with the given vfxId. Best invoked through the RemoveVfx global event -- @function [parent=#VFX] remove --- @param #string vfxId the vfxId of the VFX to remove. +-- @param #string vfxId the vfxId of the VFX to remove. Passing an empty string removes all VFX that don't have a vfxId -- -- @usage -- Remove all VFX with vfxId "myvfx" -- core.sendGlobalEvent('RemoveVfx', "myvfx")