mail[Wesnoth-commits] r33823 - /trunk/src/playmp_controller.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:46:
Author: shadowmaster
Date: Wed Mar 18 14:46:43 2009
New Revision: 33823

URL: http://svn.gna.org/viewcvs/wesnoth?rev=33823&view=rev
Log:
A public WML interface, the mp_countdown attribute, is using string
comparisons against "yes" instead of the generic utils::string_bool(),
possibly leading to inconsistent behavior when using 1 or "true".

Fixing.

Modified:
    trunk/src/playmp_controller.cpp

Modified: trunk/src/playmp_controller.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/playmp_controller.cpp?rev=33823&r1=33822&r2=33823&view=diff
==============================================================================
--- trunk/src/playmp_controller.cpp (original)
+++ trunk/src/playmp_controller.cpp Wed Mar 18 14:46:43 2009
@@ -427,7 +427,7 @@
 }
 
 void playmp_controller::after_human_turn(){
-       if ( level_["mp_countdown"] == "yes" ){
+       if ( utils::string_bool(level_["mp_countdown"]) ){
                const int action_increment = 
lexical_cast_default<int>(level_["mp_countdown_action_bonus"],0);
                const int maxtime = 
lexical_cast_default<int>(level_["mp_countdown_reservoir_time"],0);
                int secs = (current_team().countdown_time() / 1000) + 
lexical_cast_default<int>(level_["mp_countdown_turn_bonus"],0);




Related Messages


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