1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-19 20:23:54 +00:00

Don't let elemental shields harm the player in god mode

This commit is contained in:
Alexei Dobrohotov 2021-03-01 21:37:30 +00:00
parent fd602e2c31
commit 023bc80f55

View file

@ -305,6 +305,10 @@ namespace MWMechanics
void applyElementalShields(const MWWorld::Ptr &attacker, const MWWorld::Ptr &victim)
{
// Don't let elemental shields harm the player in god mode.
bool godmode = attacker == getPlayer() && MWBase::Environment::get().getWorld()->getGodModeState();
if (godmode)
return;
for (int i=0; i<3; ++i)
{
float magnitude = victim.getClass().getCreatureStats(victim).getMagicEffects().get(ESM::MagicEffect::FireShield+i).getMagnitude();