mail[Wesnoth-commits] r24653 - in /branches/1.4: changelog src/game_events.cpp src/game_preferences.cpp


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

Header


Content

Posted by benoit . timbert on March 14, 2008 - 23:26:
Author: noyga
Date: Fri Mar 14 23:26:46 2008
New Revision: 24653

URL: http://svn.gna.org/viewcvs/wesnoth?rev=24653&view=rev
Log:
Also learn the underlaying terrain so it will add a line in the help for an 
encountered terrain type but not the main terrain of this type.
This is a rather improbable bug 1.4, but it can happen if you start to play 
UtBS as your very first campaign (for roads with the "grassland" terrain 
type).

Modified:
    branches/1.4/changelog
    branches/1.4/src/game_events.cpp
    branches/1.4/src/game_preferences.cpp

Modified: branches/1.4/changelog
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/1.4/changelog?rev=24653&r1=24652&r2=24653&view=diff
==============================================================================
--- branches/1.4/changelog (original)
+++ branches/1.4/changelog Fri Mar 14 23:26:46 2008
@@ -17,6 +17,8 @@
      portraits)
    * allow configure to be started from directories other as the top dir
      (patch #1002)
+   * learn the underlaying terrain so you'll not have a blank like in the 
unit
+     stats if you encounter a terain aliased to a unencountered terrain
 
 Version 1.4:
  * language and i18n:

Modified: branches/1.4/src/game_events.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/1.4/src/game_events.cpp?rev=24653&r1=24652&r2=24653&view=diff
==============================================================================
--- branches/1.4/src/game_events.cpp (original)
+++ branches/1.4/src/game_events.cpp Fri Mar 14 23:26:46 2008
@@ -1462,6 +1462,10 @@
                                }
 
                                game_map->set_terrain(*loc,terrain);
+                               const t_translation::t_list underlaying_list 
= game_map->underlying_union_terrain(*loc);
+                               for (t_translation::t_list::const_iterator ut 
= underlaying_list.begin(); ut != underlaying_list.end(); ut++) {
+                                       
preferences::encountered_terrains().insert(*ut);
+                               };
                        }
                        rebuild_screen_ = true;
                }

Modified: branches/1.4/src/game_preferences.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/1.4/src/game_preferences.cpp?rev=24653&r1=24652&r2=24653&view=diff
==============================================================================
--- branches/1.4/src/game_preferences.cpp (original)
+++ branches/1.4/src/game_preferences.cpp Fri Mar 14 23:26:46 2008
@@ -724,6 +724,10 @@
                for (int map_y = 0; map_y < map.h(); map_y++) {
                        const t_translation::t_terrain t = 
map.get_terrain(gamemap::location(map_x, map_y));
                        preferences::encountered_terrains().insert(t);
+                       const t_translation::t_list& underlaying_list = 
map.underlying_union_terrain(gamemap::location(map_x, map_y));
+                       for 
(std::vector<t_translation::t_terrain>::const_iterator ut = 
underlaying_list.begin(); ut != underlaying_list.end(); ut++) {
+                               
preferences::encountered_terrains().insert(*ut);
+                       };
                }
        }
 }




Related Messages


Powered by MHonArc, Updated Fri Mar 14 23:40:58 2008