[Scummvm-cvs-logs] SF.net SVN: scummvm:[51458] scummvm/trunk/engines/sci/engine/kpathing.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Thu Jul 29 11:08:20 CEST 2010
Revision: 51458
http://scummvm.svn.sourceforge.net/scummvm/?rev=51458&view=rev
Author: thebluegr
Date: 2010-07-29 09:08:20 +0000 (Thu, 29 Jul 2010)
Log Message:
-----------
SCI: also break in AvoidPath instead of continuing, when the start point is contained in multiple polygons, otherwise we'll end up in an infinite loop
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kpathing.cpp
Modified: scummvm/trunk/engines/sci/engine/kpathing.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kpathing.cpp 2010-07-29 08:03:16 UTC (rev 51457)
+++ scummvm/trunk/engines/sci/engine/kpathing.cpp 2010-07-29 09:08:20 UTC (rev 51458)
@@ -933,9 +933,11 @@
case POLY_NEAREST_ACCESS:
if (cont == CONT_INSIDE) {
if (s->_prependPoint != NULL) {
- // We shouldn't get here twice
+ // We shouldn't get here twice.
+ // We need to break in this case, otherwise we'll end in an infinite
+ // loop.
warning("AvoidPath: start point is contained in multiple polygons");
- continue;
+ break;
}
if (s->findNearPoint(start, (*it), new_start) != PF_OK) {
@@ -987,7 +989,7 @@
case POLY_NEAREST_ACCESS:
if (cont != CONT_OUTSIDE) {
if (s->_appendPoint != NULL) {
- // We shouldn't get here twice
+ // We shouldn't get here twice.
// Happens in LB2CD, inside the speakeasy when walking from the
// speakeasy (room 310) into the bathroom (room 320), after having
// consulted the notebook (bug #3036299).
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