Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def stand(life):
if life['stance'] == 'crouching':
_delay = 5
elif life['stance'] == 'crawling':
_delay = 15
else:
_delay = melee.get_stance_score(life, 'standing')
set_animation(life, ['^', '@'], speed=_delay/2)
add_action(life,{'action': 'stand'},
200,
delay=_delay)
def crawl(life, force=False):
if force:
life['stance'] = 'crawling'
set_animation(life, ['v', '@'], speed=15)
return True
if life['stance'] == 'standing':
_delay = 15
elif life['stance'] == 'crouching':
_delay = 5
else:
_delay = melee.get_stance_score(life, 'crawling')
set_animation(life, ['v', '@'], speed=_delay/2)
add_action(life,{'action': 'crawl'},
200,
delay=_delay)
def crouch(life):
if life['stance'] == 'standing':
_delay = 5
elif life['stance'] == 'crawling':
_delay = 15
else:
_delay = melee.get_stance_score(life, 'crouching')
set_animation(life, ['n', '@'], speed=_delay/2)
add_action(life,{'action': 'crouch'},
200,
delay=_delay)