mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-21 11:23:51 +00:00
[General] Remove BaseActor's AnimStates that are no longer needed
This commit is contained in:
parent
c6cd0a2953
commit
10ad5b2a99
4 changed files with 4 additions and 52 deletions
|
@ -1906,34 +1906,6 @@ void CharacterController::update(float duration)
|
||||||
else
|
else
|
||||||
forcestateupdate = updateCreatureState() || forcestateupdate;
|
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);
|
refreshCurrentAnims(idlestate, movestate, jumpstate, forcestateupdate);
|
||||||
|
|
||||||
updateIdleStormState(inwater);
|
updateIdleStormState(inwater);
|
||||||
|
@ -2483,11 +2455,11 @@ void CharacterController::updateHeadTracking(float duration)
|
||||||
{
|
{
|
||||||
mwmp::DedicatedActor *dedicatedActor = mwmp::Main::get().getCellController()->getDedicatedActor(mPtr);
|
mwmp::DedicatedActor *dedicatedActor = mwmp::Main::get().getCellController()->getDedicatedActor(mPtr);
|
||||||
|
|
||||||
if (dedicatedActor->headPitch != -1)
|
//if (dedicatedActor->headPitch != -1)
|
||||||
xAngleRadians = dedicatedActor->headPitch;
|
// xAngleRadians = dedicatedActor->headPitch;
|
||||||
|
|
||||||
if (dedicatedActor->headYaw != -1)
|
//if (dedicatedActor->headYaw != -1)
|
||||||
zAngleRadians = dedicatedActor->headYaw;
|
// zAngleRadians = dedicatedActor->headYaw;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
End of tes3mp addition
|
End of tes3mp addition
|
||||||
|
|
|
@ -33,9 +33,6 @@ namespace mwmp
|
||||||
|
|
||||||
Animation animation;
|
Animation animation;
|
||||||
bool hasAnimation;
|
bool hasAnimation;
|
||||||
|
|
||||||
AnimStates animStates;
|
|
||||||
bool hasAnimStates;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class BaseActorList
|
class BaseActorList
|
||||||
|
|
|
@ -10,14 +10,6 @@ namespace mwmp
|
||||||
int count;
|
int count;
|
||||||
bool persist;
|
bool persist;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct AnimStates
|
|
||||||
{
|
|
||||||
int idlestate;
|
|
||||||
int movestate;
|
|
||||||
int jumpstate;
|
|
||||||
bool forcestateupdate;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //OPENMW_BASESTRUCTS_HPP
|
#endif //OPENMW_BASESTRUCTS_HPP
|
||||||
|
|
|
@ -44,7 +44,6 @@ void PacketActorTest::Packet(RakNet::BitStream *bs, bool send)
|
||||||
RW(actor.headYaw, send);
|
RW(actor.headYaw, send);
|
||||||
|
|
||||||
RW(actor.hasAnimation, send);
|
RW(actor.hasAnimation, send);
|
||||||
RW(actor.hasAnimStates, send);
|
|
||||||
|
|
||||||
if (actor.hasAnimation)
|
if (actor.hasAnimation)
|
||||||
{
|
{
|
||||||
|
@ -54,14 +53,6 @@ void PacketActorTest::Packet(RakNet::BitStream *bs, bool send)
|
||||||
RW(actor.animation.persist, 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)
|
if (!send)
|
||||||
{
|
{
|
||||||
actorList->baseActors.push_back(actor);
|
actorList->baseActors.push_back(actor);
|
||||||
|
|
Loading…
Reference in a new issue