fix [animate_unit] freezing the game

#2970
#3084
This commit is contained in:
gfgtdf 2018-05-24 22:41:32 +02:00
parent 28a0547b07
commit ad85d734a7

View file

@ -439,6 +439,10 @@ static int impl_add_animation(lua_State* L)
static int impl_run_animation(lua_State* L)
{
CVideo& v = CVideo::get_singleton();
if(v.update_locked() || v.faked()) {
return 0;
}
events::command_disabler command_disabler;
unit_animator& anim = *static_cast<unit_animator*>(luaL_checkudata(L, 1, animatorKey));
anim.start_animations();