[General] Remove BaseActor's AnimStates that are no longer needed

pull/199/head
David Cernat 8 years ago
parent c6cd0a2953
commit 10ad5b2a99

@ -1906,34 +1906,6 @@ void CharacterController::update(float duration)
else
forcestateupdate = updateCreatureState() || forcestateupdate;
/*
Start of tes3mp addition
Save or load animation states for this actor, depending on whether it's a local
or dedicated one
*/
if (isLocalActor)
{
localActor->hasAnimStates = true;
localActor->animStates.idlestate = idlestate;
localActor->animStates.movestate = movestate;
localActor->animStates.jumpstate = jumpstate;
localActor->animStates.forcestateupdate = forcestateupdate;
}
else if (isDedicatedActor)
{
if (dedicatedActor->hasAnimStates)
{
idlestate = CharacterState(dedicatedActor->animStates.idlestate);
movestate = CharacterState(dedicatedActor->animStates.movestate);
jumpstate = JumpingState(dedicatedActor->animStates.jumpstate);
forcestateupdate = dedicatedActor->animStates.forcestateupdate;
}
}
/*
End of tes3mp addition
*/
refreshCurrentAnims(idlestate, movestate, jumpstate, forcestateupdate);
updateIdleStormState(inwater);
@ -2483,11 +2455,11 @@ void CharacterController::updateHeadTracking(float duration)
{
mwmp::DedicatedActor *dedicatedActor = mwmp::Main::get().getCellController()->getDedicatedActor(mPtr);
if (dedicatedActor->headPitch != -1)
xAngleRadians = dedicatedActor->headPitch;
//if (dedicatedActor->headPitch != -1)
// xAngleRadians = dedicatedActor->headPitch;
if (dedicatedActor->headYaw != -1)
zAngleRadians = dedicatedActor->headYaw;
//if (dedicatedActor->headYaw != -1)
// zAngleRadians = dedicatedActor->headYaw;
}
/*
End of tes3mp addition

@ -33,9 +33,6 @@ namespace mwmp
Animation animation;
bool hasAnimation;
AnimStates animStates;
bool hasAnimStates;
};
class BaseActorList

@ -10,14 +10,6 @@ namespace mwmp
int count;
bool persist;
};
struct AnimStates
{
int idlestate;
int movestate;
int jumpstate;
bool forcestateupdate;
};
}
#endif //OPENMW_BASESTRUCTS_HPP

@ -44,7 +44,6 @@ void PacketActorTest::Packet(RakNet::BitStream *bs, bool send)
RW(actor.headYaw, send);
RW(actor.hasAnimation, send);
RW(actor.hasAnimStates, send);
if (actor.hasAnimation)
{
@ -54,14 +53,6 @@ void PacketActorTest::Packet(RakNet::BitStream *bs, bool send)
RW(actor.animation.persist, send);
}
if (actor.hasAnimStates)
{
RW(actor.animStates.idlestate, send);
RW(actor.animStates.movestate, send);
RW(actor.animStates.jumpstate, send);
RW(actor.animStates.forcestateupdate, send);
}
if (!send)
{
actorList->baseActors.push_back(actor);

Loading…
Cancel
Save