From f81392893db751221480794e4682996bf86d302a Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Mon, 27 Feb 2017 18:52:10 +1100 Subject: [PATCH] Attempt to fix some errors reported by @singalen --- data/lua/wml/animate_unit.lua | 2 +- src/scripting/game_lua_kernel.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/data/lua/wml/animate_unit.lua b/data/lua/wml/animate_unit.lua index 68161e485fd..6cc7f7b0686 100644 --- a/data/lua/wml/animate_unit.lua +++ b/data/lua/wml/animate_unit.lua @@ -34,7 +34,7 @@ local function add_animation(anim, cfg) ) end - if unit and not wesnoth.is_fogged(wesnoth.current.side, u.loc) then + if unit and not wesnoth.is_fogged(wesnoth.current.side, unit.loc) then local primary = helper.get_child(cfg, "primary_attack") local secondary = helper.get_child(cfg, "secondary_attack") local get_attack = get_real_attack diff --git a/src/scripting/game_lua_kernel.cpp b/src/scripting/game_lua_kernel.cpp index d568a7e54fe..a622d305d1e 100644 --- a/src/scripting/game_lua_kernel.cpp +++ b/src/scripting/game_lua_kernel.cpp @@ -463,6 +463,7 @@ static int intf_create_animator(lua_State* L) {"add", impl_add_animation}, {"run", impl_run_animation}, {"clear", impl_clear_animation}, + {nullptr, nullptr}, }; luaL_setfuncs(L, metafuncs, 0); lua_pushstring(L, "__metatable");