mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-30 03:06:43 +00:00
[Client] Don't play death animations for NPCs saved as dead on server
This commit is contained in:
parent
da22639620
commit
271594f0ee
2 changed files with 17 additions and 0 deletions
|
@ -683,6 +683,20 @@ CharacterState CharacterController::chooseRandomDeathState() const
|
|||
|
||||
void CharacterController::playRandomDeath(float startpoint)
|
||||
{
|
||||
/*
|
||||
Start of tes3mp addition
|
||||
|
||||
If this is a LocalActor or DedicatedActor whose death animation is supposed to be finished,
|
||||
set the start point to the animation's end
|
||||
*/
|
||||
if (mPtr.getClass().getCreatureStats(mPtr).isDeathAnimationFinished() && (mwmp::Main::get().getCellController()->isLocalActor(mPtr) || mwmp::Main::get().getCellController()->isDedicatedActor(mPtr)))
|
||||
{
|
||||
startpoint = 1.F;
|
||||
}
|
||||
/*
|
||||
End of tes3mp addition
|
||||
*/
|
||||
|
||||
if (mPtr == getPlayer())
|
||||
{
|
||||
// The first-person animations do not include death, so we need to
|
||||
|
|
|
@ -188,6 +188,9 @@ void Cell::readStatsDynamic(ActorList& actorList)
|
|||
// That way, if this actor is about to become a LocalActor, initial data about it
|
||||
// received from the server still gets set
|
||||
actor->setStatsDynamic();
|
||||
|
||||
if (actor->creatureStats.mDynamic[0].mCurrent < 1)
|
||||
actor->getPtr().getClass().getCreatureStats(actor->getPtr()).setDeathAnimationFinished(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue