Skip to content

Commit

Permalink
fixup! Properly port [kill] to Lua
Browse files Browse the repository at this point in the history
  • Loading branch information
CelticMinstrel committed Apr 6, 2017
1 parent ab00616 commit 18100cb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions data/lua/wml-tags.lua
Expand Up @@ -973,7 +973,7 @@ function wml_actions.kill(cfg)
end
local dead_men_walking = wesnoth.get_units(cfg)
for i,unit in ipairs(dead_men_walking) do
local death_loc = {unit.loc}
local death_loc = {tonumber(unit.x) or 0, tonumber(unit.y) or 0}
if not secondary_unit then killer_loc = death_loc end
local can_fire = false

Expand Down Expand Up @@ -1002,10 +1002,10 @@ function wml_actions.kill(cfg)
wesnoth.scroll_to_tile(death_loc)
local anim = wesnoth.create_animator()
-- Possible TODO: Add weapon selection? (That's kinda a pain right now; see animate_unit defn)
anim:add_unit(unit, "death", "kill")
anim:add(unit, "death", "kill")
--[[
if secondary_unit then
anim:add_unit(secondary_unit, "victory", "kill")
anim:add(secondary_unit, "victory", "kill")
end
]]
anim:run()
Expand Down

0 comments on commit 18100cb

Please sign in to comment.