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:
Andrzej Kapolka
2011-03-25 03:34:04 +00:00
parent f0ff20fd23
commit 9fcf4d1edd
@@ -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;
} }