mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-05-13 22:12:20 +03:00
Allow the same torso animation to play again
This allows replaying the same torso animation, like when activating a new weapon of the same weapon class
This commit is contained in:
parent
8801834804
commit
b5875ae890
1 changed files with 12 additions and 0 deletions
|
@ -5420,6 +5420,13 @@ void Player::EvaluateState(State *forceTorso, State *forceLegs)
|
|||
StopPartAnimating(torso);
|
||||
animdone_Torso = true;
|
||||
} else if (torsoAnim != "") {
|
||||
if (torsoAnim == partAnim[torso]) {
|
||||
// Fixed in OPM
|
||||
// Stop the part if it's the same animation
|
||||
// so the new animation can play and make some action
|
||||
// like activate the new weapon.
|
||||
StopPartAnimating(torso);
|
||||
}
|
||||
SetPartAnim(torsoAnim.c_str(), torso);
|
||||
}
|
||||
} else {
|
||||
|
@ -5427,6 +5434,11 @@ void Player::EvaluateState(State *forceTorso, State *forceLegs)
|
|||
StopPartAnimating(torso);
|
||||
animdone_Torso = true;
|
||||
} else if (torsoAnim != "") {
|
||||
if (torsoAnim == partAnim[torso]) {
|
||||
// Fixed in OPM
|
||||
// See above
|
||||
StopPartAnimating(torso);
|
||||
}
|
||||
SetPartAnim(torsoAnim.c_str(), torso);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue