mail[Wesnoth-commits] r24394 - /branches/1.4/src/unit.cpp


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

Header


Content

Posted by shadowm2006 on March 07, 2008 - 19:06:
Author: shadowmaster
Date: Fri Mar  7 19:06:00 2008
New Revision: 24394

URL: http://svn.gna.org/viewcvs/wesnoth?rev=24394&view=rev
Log:
Revert backport fix for bug #11197 (r24358)

Modified:
    branches/1.4/src/unit.cpp

Modified: branches/1.4/src/unit.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/1.4/src/unit.cpp?rev=24394&r1=24393&r2=24394&view=diff
==============================================================================
--- branches/1.4/src/unit.cpp (original)
+++ branches/1.4/src/unit.cpp Fri Mar  7 19:06:00 2008
@@ -1174,7 +1174,7 @@
        max_experience_ = lexical_cast_default<int>(cfg["max_experience"]);
        /* */
 
-       if(cfg["gender"].empty()) {
+       if(utils::string_bool(cfg_["random_gender"], false)) {
                const game_data::unit_type_map::const_iterator ut = 
gamedata_->unit_types.find(cfg["type"]);
                //! @todo FIXME shadowmaster: in my opinion, the following 
condition check
                //! should be done earlier in this function as it is repated 
later for other
@@ -1184,7 +1184,7 @@
                //! the config obj. Not sure if that would be wanted; can the 
engine handle units
                //! that don't have an equivalent unit_type obj associated?
                if (ut != gamedata_->unit_types.end())
-                       gender_ = generate_gender(ut->second, 
utils::string_bool(cfg_["random_gender"], false), state);
+                       gender_ = generate_gender(ut->second, true, state);
                else
                        ERR_UT << "no valid unit_type found for unit WML id 
\"" << cfg["type"] << "\"!\n";
        } else {




Related Messages


Powered by MHonArc, Updated Fri Mar 07 20:01:29 2008