Merge branch 'addthoseactivespells' into 'master'

Remove minimum duration from continuous effects and add clarification to the docs

Closes #8641

See merge request OpenMW/openmw!4817
This commit is contained in:
Alexei Kotov 2025-07-29 23:36:39 +03:00
commit b0e8544d58
3 changed files with 2 additions and 4 deletions

View File

@ -82,7 +82,7 @@ message(STATUS "Configuring OpenMW...")
set(OPENMW_VERSION_MAJOR 0) set(OPENMW_VERSION_MAJOR 0)
set(OPENMW_VERSION_MINOR 50) set(OPENMW_VERSION_MINOR 50)
set(OPENMW_VERSION_RELEASE 0) set(OPENMW_VERSION_RELEASE 0)
set(OPENMW_LUA_API_REVISION 83) set(OPENMW_LUA_API_REVISION 84)
set(OPENMW_POSTPROCESSING_API_REVISION 3) set(OPENMW_POSTPROCESSING_API_REVISION 3)
set(OPENMW_VERSION_COMMITHASH "") set(OPENMW_VERSION_COMMITHASH "")

View File

@ -976,9 +976,6 @@ namespace MWLua
bool hasDuration = !(mgef->mData.mFlags & ESM::MagicEffect::NoDuration); bool hasDuration = !(mgef->mData.mFlags & ESM::MagicEffect::NoDuration);
effect.mDuration = hasDuration ? static_cast<float>(enam.mData.mDuration) : 1.f; effect.mDuration = hasDuration ? static_cast<float>(enam.mData.mDuration) : 1.f;
bool appliedOnce = mgef->mData.mFlags & ESM::MagicEffect::AppliedOnce;
if (!appliedOnce)
effect.mDuration = std::max(1.f, effect.mDuration);
effect.mTimeLeft = effect.mDuration; effect.mTimeLeft = effect.mDuration;
params.getEffects().emplace_back(effect); params.getEffects().emplace_back(effect);

View File

@ -331,6 +331,7 @@
--- ---
-- Adds a new spell to the list of active spells (only in global scripts or on self). -- Adds a new spell to the list of active spells (only in global scripts or on self).
-- Note that this does not play any related VFX or sounds. -- Note that this does not play any related VFX or sounds.
-- Note that this should not be used to add spells without durations (i.e. abilities, curses, and diseases) as they will expire instantly. Use @{#ActorSpells.add} instead.
-- @function [parent=#ActorActiveSpells] add -- @function [parent=#ActorActiveSpells] add
-- @param self -- @param self
-- @param #table options A table of parameters. Must contain the following required parameters: -- @param #table options A table of parameters. Must contain the following required parameters: