wesnoth-cvs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-cvs-commits] wesnoth/src actions.cpp


From: Guillaume Melquiond
Subject: [Wesnoth-cvs-commits] wesnoth/src actions.cpp
Date: Sat, 23 Oct 2004 04:06:37 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Guillaume Melquiond <address@hidden>    04/10/23 08:01:22

Modified files:
        src            : actions.cpp 

Log message:
        More robust OoS detection.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/actions.cpp.diff?tr1=1.159&tr2=1.160&r1=text&r2=text

Patches:
Index: wesnoth/src/actions.cpp
diff -u wesnoth/src/actions.cpp:1.159 wesnoth/src/actions.cpp:1.160
--- wesnoth/src/actions.cpp:1.159       Mon Oct 18 19:21:08 2004
+++ wesnoth/src/actions.cpp     Sat Oct 23 08:01:22 2004
@@ -1,4 +1,4 @@
-/* $Id: actions.cpp,v 1.159 2004/10/18 19:21:08 silene Exp $ */
+/* $Id: actions.cpp,v 1.160 2004/10/23 08:01:22 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -611,8 +611,9 @@
                                                << ": chance to hit defender is 
inconsistent. Data source: "
                                                << results_chance << "; 
Calculation: " << stats.chance_to_hit_defender
                                                << " (over-riding game 
calculations with data source results)\n";
-                                       hits = results_hits;
-                               } else if(hits != results_hits) {
+                                       stats.chance_to_hit_defender = 
results_chance;
+                               }
+                               if(hits != results_hits) {
                                        ERR_NW << "SYNC: In attack " << 
a->second.type().name() << " vs "
                                                << d->second.type().name() << 
": the data source says the hit was "
                                                << (results_hits ? "successful" 
: "unsuccessful")
@@ -622,7 +623,8 @@
                                                << (ran_num%100) << "/" << 
results_chance
                                                << " (over-riding game 
calculations with data source results)\n";
                                        hits = results_hits;
-                               } else if(results_damage != 
stats.damage_defender_takes) {
+                               }
+                               if(results_damage != 
stats.damage_defender_takes) {
                                        ERR_NW << "SYNC: In attack " << 
a->second.type().name() << " vs "
                                                << d->second.type().name() << 
": the data source says the hit did "
                                                << results_damage
@@ -761,8 +763,9 @@
                                                << ": chance to hit attacker is 
inconsistent. Data source: "
                                                << results_chance << "; 
Calculation: " << stats.chance_to_hit_attacker
                                                << " (over-riding game 
calculations with data source results)\n";
-                                       hits = results_hits;
-                               } else if(hits != results_hits) {
+                                       stats.chance_to_hit_attacker = 
results_chance;
+                               }
+                               if(hits != results_hits) {
                                        ERR_NW << "SYNC: In defend " << 
a->second.type().name() << " vs "
                                                << d->second.type().name() << 
": the data source says the hit was "
                                                << (results_hits ? "successful" 
: "unsuccessful")
@@ -772,7 +775,8 @@
                                                << results_chance
                                                << " (over-riding game 
calculations with data source results)\n";
                                        hits = results_hits;
-                               } else if(results_damage != 
stats.damage_attacker_takes) {
+                               }
+                               if(results_damage != 
stats.damage_attacker_takes) {
                                        ERR_NW << "SYNC: In defend " << 
a->second.type().name() << " vs "
                                                << d->second.type().name() << 
": the data source says the hit did "
                                                << results_damage




reply via email to

[Prev in Thread] Current Thread [Next in Thread]