mail[Wesnoth-commits] r36673 - /trunk/src/game_events.cpp


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

Header


Content

Posted by e0204097 on July 07, 2009 - 09:24:
Author: euschn
Date: Tue Jul  7 09:24:50 2009
New Revision: 36673

URL: http://svn.gna.org/viewcvs/wesnoth?rev=36673&view=rev
Log:
fixed setting of wml roles for units of team.recall_list_

Modified:
    trunk/src/game_events.cpp

Modified: trunk/src/game_events.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_events.cpp?rev=36673&r1=36672&r2=36673&view=diff
==============================================================================
--- trunk/src/game_events.cpp (original)
+++ trunk/src/game_events.cpp Tue Jul  7 09:24:50 2009
@@ -1801,6 +1801,14 @@
                                                scoped_recall_unit 
auto_store("this_unit", player_id, i);
                                                
if(game_events::unit_matches_filter(u, filter, map_location())) {
                                                        
u.set_role(cfg["role"]);
+                                                       //set the role for 
the corresponding unit in team.recall_list_
+                                                       
for(std::vector<team>::iterator ti = rsrc.teams->begin(); ti != 
rsrc.teams->end(); ++ti) {
+                                                               if 
(ti->save_id() ==  pi->first) {
+                                                                       
assert (u.underlying_id() == (ti->recall_list())[i].underlying_id());
+                                                                       
(ti->recall_list())[i].set_role(cfg["role"]);
+                                                                       break;
+                                                               }
+                                                       }
                                                        found=true;
                                                        break;
                                                }




Related Messages


Powered by MHonArc, Updated Tue Jul 07 10:00:14 2009