diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b99f77cae..b7c10e1a74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ Bug #5129: Stuttering animation on Centurion Archer Bug #5977: Fatigueless NPCs' corpse underwater changes animation on game load Bug #6939: OpenMW-CS: ID columns are too short + Bug #6949: Sun Damage effect doesn't work in quasi exteriors Feature #6945: Support S3TC-compressed and BGR/BGRA NiPixelData 0.48.0 diff --git a/apps/openmw/mwmechanics/spelleffects.cpp b/apps/openmw/mwmechanics/spelleffects.cpp index 81a3dc0921..f491b785f6 100644 --- a/apps/openmw/mwmechanics/spelleffects.cpp +++ b/apps/openmw/mwmechanics/spelleffects.cpp @@ -645,7 +645,7 @@ void applyMagicEffect(const MWWorld::Ptr& target, const MWWorld::Ptr& caster, co case ESM::MagicEffect::SunDamage: { // isInCell shouldn't be needed, but updateActor called during game start - if (!target.isInCell() || !target.getCell()->isExterior() || godmode) + if (!target.isInCell() || !(target.getCell()->isExterior() || target.getCell()->isQuasiExterior()) || godmode) break; float time = world->getTimeStamp().getHour(); float timeDiff = std::clamp(std::abs(time - 13.f), 0.f, 7.f); diff --git a/apps/openmw/mwworld/cellstore.cpp b/apps/openmw/mwworld/cellstore.cpp index 7b9dd57d09..aedf9c6c90 100644 --- a/apps/openmw/mwworld/cellstore.cpp +++ b/apps/openmw/mwworld/cellstore.cpp @@ -671,6 +671,11 @@ namespace MWWorld return mCell->isExterior(); } + bool CellStore::isQuasiExterior() const + { + return (mCell->mData.mFlags & ESM::Cell::QuasiEx) != 0; + } + Ptr CellStore::searchInContainer (const std::string& id) { bool oldState = mHasState; diff --git a/apps/openmw/mwworld/cellstore.hpp b/apps/openmw/mwworld/cellstore.hpp index 091deaf2c5..5132ef4207 100644 --- a/apps/openmw/mwworld/cellstore.hpp +++ b/apps/openmw/mwworld/cellstore.hpp @@ -370,6 +370,8 @@ namespace MWWorld bool isExterior() const; + bool isQuasiExterior() const; + Ptr searchInContainer (const std::string& id); void loadState (const ESM::CellState& state);