|
|
|
@ -783,7 +783,7 @@ namespace MWPhysics
|
|
|
|
|
if (numSteps == 0)
|
|
|
|
|
standingOn = physicActor->getStandingOnPtr();
|
|
|
|
|
|
|
|
|
|
actorsFrameData.emplace_back(std::move(physicActor), character, standingOn, moveToWaterSurface, movement, slowFall, waterlevel);
|
|
|
|
|
actorsFrameData.emplace_back(std::move(physicActor), standingOn, moveToWaterSurface, movement, slowFall, waterlevel);
|
|
|
|
|
}
|
|
|
|
|
mMovementQueue.clear();
|
|
|
|
|
return actorsFrameData;
|
|
|
|
@ -925,18 +925,18 @@ namespace MWPhysics
|
|
|
|
|
mDebugDrawer->addCollision(position, normal);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ActorFrameData::ActorFrameData(const std::shared_ptr<Actor>& actor, const MWWorld::Ptr character, const MWWorld::Ptr standingOn,
|
|
|
|
|
ActorFrameData::ActorFrameData(const std::shared_ptr<Actor>& actor, const MWWorld::Ptr standingOn,
|
|
|
|
|
bool moveToWaterSurface, osg::Vec3f movement, float slowFall, float waterlevel)
|
|
|
|
|
: mActor(actor), mActorRaw(actor.get()), mStandingOn(standingOn),
|
|
|
|
|
mDidJump(false), mNeedLand(false), mMoveToWaterSurface(moveToWaterSurface),
|
|
|
|
|
mWaterlevel(waterlevel), mSlowFall(slowFall), mOldHeight(0), mFallHeight(0), mMovement(movement), mPosition(), mRefpos()
|
|
|
|
|
{
|
|
|
|
|
const MWBase::World *world = MWBase::Environment::get().getWorld();
|
|
|
|
|
mPtr = actor->getPtr();
|
|
|
|
|
mFlying = world->isFlying(character);
|
|
|
|
|
mSwimming = world->isSwimming(character);
|
|
|
|
|
mWantJump = mPtr.getClass().getMovementSettings(mPtr).mPosition[2] != 0;
|
|
|
|
|
mIsDead = mPtr.getClass().getCreatureStats(mPtr).isDead();
|
|
|
|
|
const auto ptr = actor->getPtr();
|
|
|
|
|
mFlying = world->isFlying(ptr);
|
|
|
|
|
mSwimming = world->isSwimming(ptr);
|
|
|
|
|
mWantJump = ptr.getClass().getMovementSettings(ptr).mPosition[2] != 0;
|
|
|
|
|
mIsDead = ptr.getClass().getCreatureStats(ptr).isDead();
|
|
|
|
|
mWasOnGround = actor->getOnGround();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -950,7 +950,7 @@ namespace MWPhysics
|
|
|
|
|
mActorRaw->setPosition(mPosition);
|
|
|
|
|
}
|
|
|
|
|
mOldHeight = mPosition.z();
|
|
|
|
|
mRefpos = mPtr.getRefData().getPosition();
|
|
|
|
|
mRefpos = mActorRaw->getPtr().getRefData().getPosition();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
WorldFrameData::WorldFrameData()
|
|
|
|
|