mail[Wesnoth-commits] r33822 - /trunk/src/actions.cpp


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

Header


Content

Posted by shadowm2006 on March 18, 2009 - 14:44:
Author: shadowmaster
Date: Wed Mar 18 14:44:31 2009
New Revision: 33822

URL: http://svn.gna.org/viewcvs/wesnoth?rev=33822&view=rev
Log:
A public WML interface is using std::string comparisons against "yes"
here. Replacing that with a utils::string_bool() call to enforce generic
behavior with "yes", "true" and 1.

Modified:
    trunk/src/actions.cpp

Modified: trunk/src/actions.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/actions.cpp?rev=33822&r1=33821&r2=33822&view=diff
==============================================================================
--- trunk/src/actions.cpp (original)
+++ trunk/src/actions.cpp Wed Mar 18 14:44:31 2009
@@ -635,7 +635,7 @@
                slows = weapon->get_special_bool("slow");
                drains = weapon->get_special_bool("drains") && 
!utils::string_bool(opp.get_state("not_living"));
                stones = weapon->get_special_bool("stones");
-               poisons = weapon->get_special_bool("poison") && 
opp.get_state("not_living") != "yes" && opp.get_state("poisoned") != "yes";
+               poisons = weapon->get_special_bool("poison") && 
utils::string_bool(opp.get_state("not_living")) != true && 
utils::string_bool(opp.get_state("poisoned")) != true;
                backstab_pos = is_attacker && backstab_check(u_loc, opp_loc, 
units, teams);
                rounds = weapon->get_specials("berserk").highest("value", 
1).first;
                firststrike = weapon->get_special_bool("firststrike");




Related Messages


Powered by MHonArc, Updated Wed Mar 18 15:00:19 2009