[Scummvm-cvs-logs] SF.net SVN: scummvm:[53289] scummvm/trunk/engines/sword25/math/walkregion. cpp

sev at users.sourceforge.net sev at users.sourceforge.net
Wed Oct 13 01:17:58 CEST 2010


Revision: 53289
          http://scummvm.svn.sourceforge.net/scummvm/?rev=53289&view=rev
Author:   sev
Date:     2010-10-12 23:17:58 +0000 (Tue, 12 Oct 2010)

Log Message:
-----------
SWORD25: Bugfix to walk path detection

Modified Paths:
--------------
    scummvm/trunk/engines/sword25/math/walkregion.cpp

Modified: scummvm/trunk/engines/sword25/math/walkregion.cpp
===================================================================
--- scummvm/trunk/engines/sword25/math/walkregion.cpp	2010-10-12 23:17:40 UTC (rev 53288)
+++ scummvm/trunk/engines/sword25/math/walkregion.cpp	2010-10-12 23:17:58 UTC (rev 53289)
@@ -196,7 +196,6 @@
 	for (unsigned int i = 0; i < m_Nodes.size(); i++) {
 		// Determine the nearest edge node in the node list
 		DijkstraNode::Iter NodeInter = ChooseClosestNode(DijkstraNodes);
-		(*NodeInter).Chosen = true;
 
 		// If no free nodes are absent from the edge node list, there is no path from start
 		// to end node. This case should never occur, since the number of loop passes is
@@ -204,6 +203,7 @@
 		if (NodeInter == DijkstraNodes.end()) return false;
 
 		// If the destination point is closer than the point cost, scan can stop
+		(*NodeInter).Chosen = true;
 		if (EndPoint.Cost <= (*NodeInter).Cost) {
 			// Insert the end point in the list
 			Path.push_back(End);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list