Author: sapient
Date: Fri Apr 20 04:42:03 2007
New Revision: 16942

URL: http://svn.gna.org/viewcvs/wesnoth?rev=16942&view=rev
Log:
fix the "nightstalk" glitch. thanks to mordante for the tips.

Modified:
    trunk/src/map.cpp
    trunk/src/unit.cpp

Modified: trunk/src/map.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/map.cpp?rev=16942&r1=16941&r2=16942&view=diff
==============================================================================
--- trunk/src/map.cpp (original)
+++ trunk/src/map.cpp Fri Apr 20 04:42:03 2007
@@ -616,7 +616,8 @@
 #ifdef TERRAIN_TRANSLATION_COMPATIBLE
        if(terrain_format == 0 || terrain_format == -1 && 
!cfg["terrain"].empty()) {
                lg::wml_error << "Warning deprecated terrain format in 
filter_location, support will be removed in version 1.3.3\n";
-               const std::string& terrain = cfg["terrain"];
+               const t_string& t_terrain = cfg["terrain"];
+               const std::string& terrain = t_terrain;
                // Any of these may be a CSV
                std::string terrain_letter;
                terrain_letter += 
t_translation::get_old_letter(get_terrain_info(loc).number());
@@ -664,8 +665,10 @@
                        return false;
        }
 
-       const std::string& tod_type = cfg["time_of_day"];
-       const std::string& tod_id = cfg["time_of_day_id"];
+       const t_string& t_tod_type = cfg["time_of_day"];
+       const t_string& t_tod_id = cfg["time_of_day_id"];
+       const std::string& tod_type = t_tod_type;
+       const std::string& tod_id = t_tod_id;
        static config const dummy_cfg;
        time_of_day tod(dummy_cfg);
        if(!tod_type.empty() || !tod_id.empty()) {

Modified: trunk/src/unit.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit.cpp?rev=16942&r1=16941&r2=16942&view=diff
==============================================================================
--- trunk/src/unit.cpp (original)
+++ trunk/src/unit.cpp Fri Apr 20 04:42:03 2007
@@ -729,18 +729,31 @@
 
 bool unit::internal_matches_filter(const vconfig& cfg, const 
gamemap::location& loc, bool use_flat_tod) const
 {
-       const std::string& description = cfg["description"];
-       const std::string& speaker = cfg["speaker"];
-       const std::string& type = cfg["type"];
-       const std::string& ability = cfg["ability"];
-       const std::string& side = cfg["side"];
-       const std::string& weapon = cfg["has_weapon"];
-       const std::string& role = cfg["role"];
-       const std::string& ai_special = cfg["ai_special"];
-       const std::string& race = cfg["race"];
-       const std::string& gender = cfg["gender"];
-       const std::string& canrecruit = cfg["canrecruit"];
-       const std::string& level = cfg["level"];
+       const t_string& t_description = cfg["description"];
+       const t_string& t_speaker = cfg["speaker"];
+       const t_string& t_type = cfg["type"];
+       const t_string& t_ability = cfg["ability"];
+       const t_string& t_side = cfg["side"];
+       const t_string& t_weapon = cfg["has_weapon"];
+       const t_string& t_role = cfg["role"];
+       const t_string& t_ai_special = cfg["ai_special"];
+       const t_string& t_race = cfg["race"];
+       const t_string& t_gender = cfg["gender"];
+       const t_string& t_canrecruit = cfg["canrecruit"];
+       const t_string& t_level = cfg["level"];
+
+       const std::string& description = t_description;
+       const std::string& speaker = t_speaker;
+       const std::string& type = t_type;
+       const std::string& ability = t_ability;
+       const std::string& side = t_side;
+       const std::string& weapon = t_weapon;
+       const std::string& role = t_role;
+       const std::string& ai_special = t_ai_special;
+       const std::string& race = t_race;
+       const std::string& gender = t_gender;
+       const std::string& canrecruit = t_canrecruit;
+       const std::string& level = t_level;
 
        if(description.empty() == false && description != 
this->underlying_description()) {
                return false;


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to