diff options
author | Walter van Niftrik | 2009-05-09 01:23:52 +0000 |
---|---|---|
committer | Walter van Niftrik | 2009-05-09 01:23:52 +0000 |
commit | 90cef59d3b2afb05c70049941b99966e515a3d23 (patch) | |
tree | be20f620ec52704d49a1bd5474a63c9b1a85b441 /engines/sci/engine | |
parent | a70531f814d4d514a080fbdc14fc9c706db7ed7b (diff) | |
download | scummvm-rg350-90cef59d3b2afb05c70049941b99966e515a3d23.tar.gz scummvm-rg350-90cef59d3b2afb05c70049941b99966e515a3d23.tar.bz2 scummvm-rg350-90cef59d3b2afb05c70049941b99966e515a3d23.zip |
SCI: AvoidPath: No longer excludes edges on screen borders for pathfinding, as
only the earlier games seem to do this. We may need to add a SCI version check
here if this change breaks anything in earlier games.
svn-id: r40398
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kpathing.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/sci/engine/kpathing.cpp b/engines/sci/engine/kpathing.cpp index 13830fba3d..a6e7799dfc 100644 --- a/engines/sci/engine/kpathing.cpp +++ b/engines/sci/engine/kpathing.cpp @@ -258,7 +258,7 @@ struct PathfindingState { static Vertex *vertex_cur; // FIXME -// Temporary hack to deal with points in reg_ts +// FIXME: Temporary hack to deal with points in reg_ts static bool polygon_is_reg_t(const byte *list, int size) { // Check the first three reg_ts for (int i = 0; i < (size < 3 ? size : 3); i++) @@ -1556,10 +1556,13 @@ static void dijkstra(PathfindingState *s) { uint32 new_dist; Vertex *vertex = *it; + // Early pathfinding-enabled games exclude edges on screen borders. +// FIXME: Enable this selectively for those games that need it. +#if 0 // Avoid plotting path along screen edge if ((vertex != s->vertex_end) && point_on_screen_border(vertex->v)) continue; - +#endif new_dist = vertex_min->dist + (uint32)sqrt((float)vertex_min->v.sqrDist(vertex->v)); if (new_dist < vertex->dist) { vertex->dist = new_dist; |