add wesnoth,.current.event_context.unit_x/y

http://gna.org/bugs/?23507
This commit is contained in:
gfgtdf 2015-07-14 15:31:49 +02:00
parent 0ed6815296
commit 31796c0b46

View file

@ -1572,6 +1572,9 @@ int game_lua_kernel::impl_current_get(lua_State *L)
if (ev.loc1.valid()) {
cfg["x1"] = ev.loc1.filter_x() + 1;
cfg["y1"] = ev.loc1.filter_y() + 1;
// The position of the unit involved in this event, currently the only case where this is different from x1/y1 are enter/exit_hex events
cfg["unit_x"] = ev.loc1.x + 1;
cfg["unit_y"] = ev.loc1.y + 1;
}
if (ev.loc2.valid()) {
cfg["x2"] = ev.loc2.filter_x() + 1;