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

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

[Wesnoth-cvs-commits] wesnoth/src ai.cpp replay.cpp


From: Jon Daniel
Subject: [Wesnoth-cvs-commits] wesnoth/src ai.cpp replay.cpp
Date: Thu, 17 Feb 2005 18:47:12 -0500

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Jon Daniel <address@hidden>     05/02/17 23:47:12

Modified files:
        src            : ai.cpp replay.cpp 

Log message:
        Applied fix from ott for bug #11550

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/ai.cpp.diff?tr1=1.137&tr2=1.138&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/replay.cpp.diff?tr1=1.90&tr2=1.91&r1=text&r2=text

Patches:
Index: wesnoth/src/ai.cpp
diff -u wesnoth/src/ai.cpp:1.137 wesnoth/src/ai.cpp:1.138
--- wesnoth/src/ai.cpp:1.137    Sun Feb  6 10:40:12 2005
+++ wesnoth/src/ai.cpp  Thu Feb 17 23:47:12 2005
@@ -1,4 +1,4 @@
-/* $Id: ai.cpp,v 1.137 2005/02/06 10:40:12 isaaccp Exp $ */
+/* $Id: ai.cpp,v 1.138 2005/02/17 23:47:12 j_daniel Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -412,7 +412,7 @@
                                                //actually have to check if 
it's invisible, since it being invisible is
                                                //the only possibility
                                                const unit_map::const_iterator 
invisible_unit = info_.units.find(adj[n]);
-                                               if(!ignore_zocs && 
invisible_unit != info_.units.end() && invisible_unit->second.stone() == false 
&&
+                                               if(!ignore_zocs && 
invisible_unit != info_.units.end() && invisible_unit->second.emits_zoc() &&
                                                   
current_team().is_enemy(invisible_unit->second.side())) {
                                                        to = *i;
                                                        
steps.erase(i,steps.end());
Index: wesnoth/src/replay.cpp
diff -u wesnoth/src/replay.cpp:1.90 wesnoth/src/replay.cpp:1.91
--- wesnoth/src/replay.cpp:1.90 Fri Jan 28 20:17:46 2005
+++ wesnoth/src/replay.cpp      Thu Feb 17 23:47:12 2005
@@ -1,4 +1,4 @@
-/* $Id: replay.cpp,v 1.90 2005/01/28 20:17:46 silene Exp $ */
+/* $Id: replay.cpp,v 1.91 2005/02/17 23:47:12 j_daniel Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -788,7 +788,13 @@
                        const gamemap::location src(*source);
                        const gamemap::location dst(*destination);
 
-                       std::map<gamemap::location,unit>::iterator u = 
units.find(src);
+                       std::map<gamemap::location,unit>::iterator u = 
units.find(dst);
+                       if(u != units.end()) {
+                               std::cerr << "destination already occupied: "
+                                                 << (dst.x+1) << "," << 
(dst.y+1) << "\n";
+                               throw replay::error();
+                       }
+                       u = units.find(src);
                        if(u == units.end()) {
                                std::cerr << "unfound location for source of 
movement: "
                                          << (src.x+1) << "," << (src.y+1) << 
"-"




reply via email to

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