mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-08 09:37:53 +00:00
Ignore Burden effect in god mode
This commit is contained in:
parent
39678c74bf
commit
b85875a354
@ -6,6 +6,7 @@
|
||||
#include "../mwbase/world.hpp"
|
||||
#include "../mwbase/soundmanager.hpp"
|
||||
|
||||
#include "../mwmechanics/actorutil.hpp"
|
||||
#include "../mwmechanics/creaturestats.hpp"
|
||||
#include "../mwmechanics/movement.hpp"
|
||||
#include "../mwmechanics/magiceffects.hpp"
|
||||
@ -79,7 +80,8 @@ namespace MWClass
|
||||
float weight = getContainerStore(ptr).getWeight();
|
||||
const MWMechanics::MagicEffects& effects = getCreatureStats(ptr).getMagicEffects();
|
||||
weight -= effects.get(MWMechanics::EffectKey(ESM::MagicEffect::Feather)).getMagnitude();
|
||||
weight += effects.get(MWMechanics::EffectKey(ESM::MagicEffect::Burden)).getMagnitude();
|
||||
if (ptr != MWMechanics::getPlayer() || !MWBase::Environment::get().getWorld()->getGodModeState())
|
||||
weight += effects.get(MWMechanics::EffectKey(ESM::MagicEffect::Burden)).getMagnitude();
|
||||
return (weight < 0) ? 0.0f : weight;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user