mail[Wesnoth-commits] r52633 - /trunk/data/lua/wml-tags.lua


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by strgaltent on January 17, 2012 - 15:57:
Author: anonymissimus
Date: Tue Jan 17 15:57:09 2012
New Revision: 52633

URL: http://svn.gna.org/viewcvs/wesnoth?rev=52633&view=rev
Log:
Propagate wesnoth.select_hex changes to [select_unit] (fix for bug #19224, 
bug #16819)

Modified:
    trunk/data/lua/wml-tags.lua

Modified: trunk/data/lua/wml-tags.lua
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/lua/wml-tags.lua?rev=52633&r1=52632&r2=52633&view=diff
==============================================================================
--- trunk/data/lua/wml-tags.lua (original)
+++ trunk/data/lua/wml-tags.lua Tue Jan 17 15:57:09 2012
@@ -357,16 +357,7 @@
 function wml_actions.select_unit(cfg)
        local u = wesnoth.get_units(cfg)[1]
        if not u then return end
-       local fire_event = cfg.fire_event
-       local highlight = cfg.highlight
-       if highlight == nil then highlight = true end
-
-       wesnoth.select_hex(u.x, u.y)
-
-       if highlight then wesnoth.highlight_hex(u.x, u.y) end
-       if fire_event then
-               wesnoth.fire_event("select", u.x, u.y)
-       end
+       wesnoth.select_hex(u.x, u.y, cfg.highlight, cfg.fire_event)
 end
 
 function wml_actions.unit_overlay(cfg)




Related Messages


Powered by MHonArc, Updated Tue Jan 17 16:00:08 2012