mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +00:00
Merge remote-tracking branch 'mckibbenta/tgm'
This commit is contained in:
commit
99fe6e68c7
@ -396,6 +396,8 @@ namespace MWBase
|
|||||||
/// It only applies to the current form the NPC is in.
|
/// It only applies to the current form the NPC is in.
|
||||||
virtual void applyWerewolfAcrobatics(const MWWorld::Ptr& actor) = 0;
|
virtual void applyWerewolfAcrobatics(const MWWorld::Ptr& actor) = 0;
|
||||||
|
|
||||||
|
virtual bool getGodModeState() = 0;
|
||||||
|
|
||||||
virtual bool toggleGodMode() = 0;
|
virtual bool toggleGodMode() = 0;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -275,9 +275,8 @@ namespace MWMechanics
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// workaround: always keep player alive for now
|
// If it's the player and God Mode is turned on, keep it alive
|
||||||
// \todo remove workaround, once player death can be handled
|
if(iter->first.getRefData().getHandle()=="player" && MWBase::Environment::get().getWorld()->getGodModeState())
|
||||||
if(iter->first.getRefData().getHandle()=="player")
|
|
||||||
{
|
{
|
||||||
MWMechanics::DynamicStat<float> stat(stats.getHealth());
|
MWMechanics::DynamicStat<float> stat(stats.getHealth());
|
||||||
|
|
||||||
|
@ -726,8 +726,7 @@ namespace MWScript
|
|||||||
|
|
||||||
bool enabled = MWBase::Environment::get().getWorld()->toggleGodMode();
|
bool enabled = MWBase::Environment::get().getWorld()->toggleGodMode();
|
||||||
|
|
||||||
// context.report (enabled ? "God Mode -> On" : "God Mode -> Off");
|
context.report (enabled ? "God Mode -> On" : "God Mode -> Off");
|
||||||
context.report("Unimplemented");
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ namespace MWWorld
|
|||||||
mSky (true), mCells (mStore, mEsm),
|
mSky (true), mCells (mStore, mEsm),
|
||||||
mActivationDistanceOverride (mActivationDistanceOverride),
|
mActivationDistanceOverride (mActivationDistanceOverride),
|
||||||
mFallback(fallbackMap), mPlayIntro(0), mTeleportEnabled(true),
|
mFallback(fallbackMap), mPlayIntro(0), mTeleportEnabled(true),
|
||||||
mFacedDistance(FLT_MAX)
|
mFacedDistance(FLT_MAX), mGodMode(false)
|
||||||
{
|
{
|
||||||
mPhysics = new PhysicsSystem(renderer);
|
mPhysics = new PhysicsSystem(renderer);
|
||||||
mPhysEngine = mPhysics->getEngine();
|
mPhysEngine = mPhysics->getEngine();
|
||||||
@ -1948,9 +1948,16 @@ namespace MWWorld
|
|||||||
stats.getSkill(ESM::Skill::Acrobatics).setModified(gmst.find("fWerewolfAcrobatics")->getFloat(), 0);
|
stats.getSkill(ESM::Skill::Acrobatics).setModified(gmst.find("fWerewolfAcrobatics")->getFloat(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool World::getGodModeState()
|
||||||
|
{
|
||||||
|
return mGodMode;
|
||||||
|
}
|
||||||
|
|
||||||
bool World::toggleGodMode()
|
bool World::toggleGodMode()
|
||||||
{
|
{
|
||||||
return false;
|
mGodMode = !mGodMode;
|
||||||
|
|
||||||
|
return mGodMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -68,6 +68,8 @@ namespace MWWorld
|
|||||||
|
|
||||||
OEngine::Physic::PhysicEngine* mPhysEngine;
|
OEngine::Physic::PhysicEngine* mPhysEngine;
|
||||||
|
|
||||||
|
bool mGodMode;
|
||||||
|
|
||||||
// not implemented
|
// not implemented
|
||||||
World (const World&);
|
World (const World&);
|
||||||
World& operator= (const World&);
|
World& operator= (const World&);
|
||||||
@ -440,6 +442,8 @@ namespace MWWorld
|
|||||||
|
|
||||||
virtual void applyWerewolfAcrobatics(const MWWorld::Ptr& actor);
|
virtual void applyWerewolfAcrobatics(const MWWorld::Ptr& actor);
|
||||||
|
|
||||||
|
virtual bool getGodModeState();
|
||||||
|
|
||||||
virtual bool toggleGodMode();
|
virtual bool toggleGodMode();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user