mail[Wesnoth-commits] r44424 - in /trunk/src/whiteboard: highlight_visitor.cpp manager.cpp


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

Header


Content

Posted by gabrielmorin on July 20, 2010 - 09:52:
Author: gabba
Date: Tue Jul 20 09:52:32 2010
New Revision: 44424

URL: http://svn.gna.org/viewcvs/wesnoth?rev=44424&view=rev
Log:
Whiteboard: modifications to unit selection.

Modified:
    trunk/src/whiteboard/highlight_visitor.cpp
    trunk/src/whiteboard/manager.cpp

Modified: trunk/src/whiteboard/highlight_visitor.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/whiteboard/highlight_visitor.cpp?rev=44424&r1=44423&r2=44424&view=diff
==============================================================================
--- trunk/src/whiteboard/highlight_visitor.cpp (original)
+++ trunk/src/whiteboard/highlight_visitor.cpp Tue Jul 20 09:52:32 2010
@@ -60,7 +60,8 @@
        mouseover_hex_ = hex;
        //if we're right over a unit, just highlight all of this unit's 
actions
        unit_map::const_iterator it = unit_map_.find(hex);
-       if (it != unit_map_.end())
+       if (it != unit_map_.end()
+                       && it->side() == resources::screen->viewing_side())
        {
                selection_candidate_ = &(*it);
 

Modified: trunk/src/whiteboard/manager.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/whiteboard/manager.cpp?rev=44424&r1=44423&r2=44424&view=diff
==============================================================================
--- trunk/src/whiteboard/manager.cpp (original)
+++ trunk/src/whiteboard/manager.cpp Tue Jul 20 09:52:32 2010
@@ -79,6 +79,7 @@
        active_ = active;
 
        erase_temp_move();
+       on_deselect_hex();
 
        if (active_)
        {
@@ -141,6 +142,7 @@
        validate_viewer_actions();
        highlighter_.reset(new highlight_visitor(*resources::units, 
viewer_actions()));
        wait_for_side_init_ = false;
+       LOG_WB << "on_init_side()\n";
 }
 
 void manager::on_finish_side_turn()
@@ -149,7 +151,7 @@
 
        highlighter_.reset();
        erase_temp_move();
-
+       LOG_WB << "on_finish_side_turn()\n";
 }
 
 void manager::validate_viewer_actions()




Related Messages


Powered by MHonArc, Updated Tue Jul 20 10:00:13 2010