|
|
|
@ -31,9 +31,6 @@ LocalActor::LocalActor()
|
|
|
|
|
wasForceMoveJumping = false;
|
|
|
|
|
wasFlying = false;
|
|
|
|
|
|
|
|
|
|
positionTimer = 0;
|
|
|
|
|
statTimer = 0;
|
|
|
|
|
|
|
|
|
|
attack.type = Attack::MELEE;
|
|
|
|
|
attack.shouldSend = false;
|
|
|
|
|
|
|
|
|
@ -75,10 +72,6 @@ void LocalActor::updateCell()
|
|
|
|
|
|
|
|
|
|
void LocalActor::updatePosition(bool forceUpdate)
|
|
|
|
|
{
|
|
|
|
|
const float timeoutSec = 0.03;
|
|
|
|
|
|
|
|
|
|
if (forceUpdate || (positionTimer += MWBase::Environment::get().getFrameDuration()) >= timeoutSec)
|
|
|
|
|
{
|
|
|
|
|
bool posIsChanging = (direction.pos[0] != 0 || direction.pos[1] != 0 || direction.pos[2] != 0 ||
|
|
|
|
|
direction.rot[0] != 0 || direction.rot[1] != 0 || direction.rot[2] != 0);
|
|
|
|
|
|
|
|
|
@ -88,11 +81,8 @@ void LocalActor::updatePosition(bool forceUpdate)
|
|
|
|
|
|
|
|
|
|
position = ptr.getRefData().getPosition();
|
|
|
|
|
|
|
|
|
|
positionTimer = 0;
|
|
|
|
|
|
|
|
|
|
mwmp::Main::get().getNetworking()->getActorList()->addPositionActor(*this);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void LocalActor::updateAnimFlags(bool forceUpdate)
|
|
|
|
@ -167,10 +157,6 @@ void LocalActor::updateStatsDynamic(bool forceUpdate)
|
|
|
|
|
MWMechanics::DynamicStat<float> magicka(ptrCreatureStats->getMagicka());
|
|
|
|
|
MWMechanics::DynamicStat<float> fatigue(ptrCreatureStats->getFatigue());
|
|
|
|
|
|
|
|
|
|
const float timeoutSec = 0.5;
|
|
|
|
|
|
|
|
|
|
if (forceUpdate || (statTimer += MWBase::Environment::get().getFrameDuration()) >= timeoutSec)
|
|
|
|
|
{
|
|
|
|
|
// Update stats when they become 0 or they have changed enough
|
|
|
|
|
//
|
|
|
|
|
// Also check for an oldHealth of 0 changing to something else for resurrected NPCs
|
|
|
|
@ -196,11 +182,8 @@ void LocalActor::updateStatsDynamic(bool forceUpdate)
|
|
|
|
|
|
|
|
|
|
creatureStats.mDead = ptrCreatureStats->isDead();
|
|
|
|
|
|
|
|
|
|
statTimer = 0;
|
|
|
|
|
|
|
|
|
|
mwmp::Main::get().getNetworking()->getActorList()->addStatsDynamicActor(*this);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void LocalActor::updateEquipment(bool forceUpdate)
|
|
|
|
|