mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 12:35:46 +00:00
Merge branch 'absorb_self' into 'master'
Prevent write to empty vector element Closes #6655 See merge request OpenMW/openmw!1704
This commit is contained in:
commit
a59ee1ec50
@ -278,6 +278,7 @@
|
||||
Bug #6276: Deleted groundcover instances are not deleted in game
|
||||
Bug #6294: Game crashes with empty pathgrid
|
||||
Bug #6606: Quests with multiple IDs cannot always be restarted
|
||||
Bug #6655: Constant effect absorb attribute causes the game to break
|
||||
Feature #390: 3rd person look "over the shoulder"
|
||||
Feature #832: OpenMW-CS: Handle deleted references
|
||||
Feature #1536: Show more information about level on menu
|
||||
|
@ -109,10 +109,6 @@ namespace MWGui
|
||||
{
|
||||
bool allowSelf = (effect->mData.mFlags & ESM::MagicEffect::CastSelf) != 0;
|
||||
bool allowTouch = (effect->mData.mFlags & ESM::MagicEffect::CastTouch) && !mConstantEffect;
|
||||
bool allowTarget = (effect->mData.mFlags & ESM::MagicEffect::CastTarget) && !mConstantEffect;
|
||||
|
||||
if (!allowSelf && !allowTouch && !allowTarget)
|
||||
return; // TODO: Show an error message popup?
|
||||
|
||||
setMagicEffect(effect);
|
||||
mEditing = false;
|
||||
@ -617,6 +613,13 @@ namespace MWGui
|
||||
const ESM::MagicEffect* effect =
|
||||
MWBase::Environment::get().getWorld()->getStore().get<ESM::MagicEffect>().find(mSelectedKnownEffectId);
|
||||
|
||||
bool allowSelf = (effect->mData.mFlags & ESM::MagicEffect::CastSelf) != 0;
|
||||
bool allowTouch = (effect->mData.mFlags & ESM::MagicEffect::CastTouch) && !mConstantEffect;
|
||||
bool allowTarget = (effect->mData.mFlags & ESM::MagicEffect::CastTarget) && !mConstantEffect;
|
||||
|
||||
if (!allowSelf && !allowTouch && !allowTarget)
|
||||
return; // TODO: Show an error message popup?
|
||||
|
||||
if (effect->mData.mFlags & ESM::MagicEffect::TargetSkill)
|
||||
{
|
||||
delete mSelectSkillDialog;
|
||||
|
Loading…
x
Reference in New Issue
Block a user