1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-01 21:15:33 +00:00

Add a jump state

Currently unused
This commit is contained in:
Chris Robinson 2013-02-15 04:45:28 -08:00
parent ff0099fa6e
commit e4341525c8
2 changed files with 6 additions and 1 deletions

View file

@ -68,6 +68,8 @@ static const struct {
{ CharState_SwimRunLeft, "swimrunleft" },
{ CharState_SwimRunRight, "swimrunright" },
{ CharState_Jump, "jump" },
{ CharState_Death1, "death1" },
{ CharState_Death2, "death2" },
{ CharState_Death3, "death3" },
@ -170,11 +172,12 @@ void CharacterController::markerEvent(float time, const std::string &evt)
Ogre::Vector3 CharacterController::update(float duration)
{
const MWBase::World *world = MWBase::Environment::get().getWorld();
const MWWorld::Class &cls = MWWorld::Class::get(mPtr);
const Ogre::Vector3 &vec = cls.getMovementVector(mPtr);
const float speed = cls.getSpeed(mPtr);
bool inwater = MWBase::Environment::get().getWorld()->isSwimming(mPtr);
bool inwater = world->isSwimming(mPtr);
bool isrunning = cls.getStance(mPtr, MWWorld::Class::Run);
if(std::abs(vec.x/2.0f) > std::abs(vec.y))

View file

@ -45,6 +45,8 @@ enum CharacterState {
CharState_SwimRunLeft,
CharState_SwimRunRight,
CharState_Jump,
/* Death states must be last! */
CharState_Death1,
CharState_Death2,