actor: only remove control effects of given animations in unloadAnims

The previous behavior was for unloadAnims() to remove the control effects from all animations, even when only one animation was passed in, which is unintuitive behavior.

Fixes #853
This commit is contained in:
rdb 2020-01-22 08:40:50 +01:00
parent e5b7760b85
commit bd3dd63cbe

View File

@ -2281,7 +2281,7 @@ class Actor(DirectObject, NodePath):
# our handle on them go. This is especially
# important if the anim control was blending
# animations.
animDef.animControl.getPart().clearControlEffects()
animDef.animControl.getPart().setControlEffect(animDef.animControl, 0.0)
animDef.animControl = None