Fixed [teleport] not working
This commit is contained in:
parent
41145a783c
commit
240b940618
2 changed files with 2 additions and 1 deletions
|
@ -996,7 +996,7 @@ end
|
|||
wml_actions.teleport = function(cfg)
|
||||
local context = wesnoth.current.event_context
|
||||
local filter = helper.get_child(cfg, "filter") or { x = context.x1, y = context.y1 }
|
||||
local unit = wesnoth.get_units(filter)[0]
|
||||
local unit = wesnoth.get_units(filter)[1]
|
||||
if not unit then
|
||||
-- No error if no unit matches.
|
||||
return
|
||||
|
|
|
@ -4698,6 +4698,7 @@ game_lua_kernel::game_lua_kernel(CVideo * video, game_state & gs, play_controlle
|
|||
{ "simulate_combat", &dispatch<&game_lua_kernel::intf_simulate_combat > },
|
||||
{ "synchronize_choice", &intf_synchronize_choice },
|
||||
{ "synchronize_choices", &intf_synchronize_choices },
|
||||
{ "teleport", &dispatch<&game_lua_kernel::intf_teleport > },
|
||||
{ "view_locked", &dispatch<&game_lua_kernel::intf_view_locked > },
|
||||
{ "place_shroud", &dispatch2<&game_lua_kernel::intf_shroud_op, true > },
|
||||
{ "remove_shroud", &dispatch2<&game_lua_kernel::intf_shroud_op, false > },
|
||||
|
|
Loading…
Add table
Reference in a new issue