It's cheaper to check the flag, so let's do that first.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@1132 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
@@ -246,7 +246,7 @@ public class AStarPathUtil
|
|||||||
|
|
||||||
// skip if it's already in the open or closed list or if its
|
// skip if it's already in the open or closed list or if its
|
||||||
// actual cost is less than the just-calculated cost
|
// actual cost is less than the just-calculated cost
|
||||||
if ((info.open.contains(np) || np.closed) && np.g <= newg) {
|
if ((np.closed || info.open.contains(np)) && np.g <= newg) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user