[Wesnoth-commits] r10019 - /trunk/src/unit_types.cpp (February 07, 2006 - 16:40)

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

 

Author: xan
Date: Tue Feb  7 16:40:23 2006
New Revision: 10019

URL: http://svn.gna.org/viewcvs/wesnoth?rev=10019&view=rev
Log:
Added key 'ignore_race_traits' to [unit].

Modified:
    trunk/src/unit_types.cpp

Modified: trunk/src/unit_types.cpp
URL: http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_types.cpp?rev=10019&r1=10018&r2=10019&view=diff
==============================================================================
--- trunk/src/unit_types.cpp (original)
+++ trunk/src/unit_types.cpp Tue Feb  7 16:40:23 2006
@@ -667,9 +667,13 @@
 			if(race_->uses_global_traits() == false) {
 				possibleTraits_.clear();
 			}
-
-			const config::child_list& traits = race_->additional_traits();
-			possibleTraits_.insert(possibleTraits_.end(),traits.begin(),traits.end());
+			
+			if(cfg["ignore_race_traits"] == "yes") {
+				possibleTraits_.clear();
+			} else {
+				const config::child_list& traits = race_->additional_traits();
+				possibleTraits_.insert(possibleTraits_.end(),traits.begin(),traits.end());
+			}
 		}
 	} else {
 		static const unit_race dummy_race;



Related Mails




Powered by MHonArc, Updated Tue Feb 07 19:20:09 2006