Skip to content

Commit

Permalink
fix [animate_unit] freezing the game
Browse files Browse the repository at this point in the history
#2970
#3084

(cherry-picked from commit beeb5b4)
  • Loading branch information
gfgtdf committed Oct 7, 2018
1 parent 1eddadb commit d1db3fa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/scripting/game_lua_kernel.cpp
Expand Up @@ -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();
Expand Down

0 comments on commit d1db3fa

Please sign in to comment.