forked from Mirrors/openclonk
Clonk: Don't play idle animations if Menu is open
At least, in theory. I only removed the plain GetMenu() call because the engine GetMenu is going away.objectmenu
parent
d3428003a8
commit
9741c1e853
|
@ -496,7 +496,7 @@ func FxIntWalkTimer(pTarget, effect)
|
|||
effect.animation_id = PlayAnimation(anim, CLONK_ANIM_SLOT_Movement, GetWalkAnimationPosition(anim, 0), Anim_Linear(0, 0, 1000, 5, ANIM_Remove));
|
||||
}
|
||||
// The clonk has to stand, not making a pause animation yet and not doing other actions with the hands (e.g. loading the bow)
|
||||
else if(anim == Clonk_WalkStand && !GetHandAction() && GetMenu() == nil)
|
||||
else if(anim == Clonk_WalkStand && !GetHandAction() && !pTarget->~GetMenu())
|
||||
{
|
||||
if (effect.footstop_time) effect.footstep_time = 0;
|
||||
if(!effect.idle_animation_time)
|
||||
|
|
|
@ -1088,14 +1088,6 @@ If you want to remove the menu, the suggested method is clonk->TryCancelMenu() t
|
|||
*/
|
||||
func GetMenu()
|
||||
{
|
||||
// No new-style menu set? Return the classic menu ID. This is deprecated and should be removed in some future.
|
||||
// This function must return a proplist, but clashes with the engine-defined "GetMenu".
|
||||
// This workaround here at least allows developers to reach the Clonk's menu ID.
|
||||
if (this.control.menu == nil)
|
||||
{
|
||||
var menu_id = inherited(...);
|
||||
if (menu_id) return {ID = menu_id};
|
||||
}
|
||||
return this.control.menu;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue