Sun Damage for QuasiExt

pull/3228/head
Kindi 2 years ago committed by psi29a
parent 9761ff14f9
commit da4a72ab19

@ -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

@ -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);

@ -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;

@ -370,6 +370,8 @@ namespace MWWorld
bool isExterior() const;
bool isQuasiExterior() const;
Ptr searchInContainer (const std::string& id);
void loadState (const ESM::CellState& state);

Loading…
Cancel
Save