Some better comments, tightening up.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2853 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2003-11-12 23:13:45 +00:00
parent 7795edf604
commit bb11cd4d0a
2 changed files with 16 additions and 17 deletions
@@ -1,5 +1,5 @@
// //
// $Id: SceneBlock.java,v 1.22 2003/11/12 23:05:40 ray Exp $ // $Id: SceneBlock.java,v 1.23 2003/11/12 23:13:45 ray Exp $
package com.threerings.miso.client; package com.threerings.miso.client;
@@ -371,16 +371,15 @@ public class SceneBlock
return false; return false;
} }
// null base or impassable base kills traversal
BaseTile base = getBaseTile(tx, ty); BaseTile base = getBaseTile(tx, ty);
if ((base == null) || !base.isPassable()) { if ((base == null) || !base.isPassable()) {
return false; return false;
} }
// fringe can only kill traversal if it is present
BaseTile fringe = getFringeTile(tx, ty); BaseTile fringe = getFringeTile(tx, ty);
if (fringe != null) { return (fringe == null) || fringe.isPassable();
return fringe.isPassable();
}
return true;
} }
/** /**
@@ -1,5 +1,5 @@
// //
// $Id: AutoFringer.java,v 1.26 2003/11/12 23:05:41 ray Exp $ // $Id: AutoFringer.java,v 1.27 2003/11/12 23:13:45 ray Exp $
package com.threerings.miso.tile; package com.threerings.miso.tile;
@@ -95,17 +95,17 @@ public class AutoFringer
// now turn on the appropriate fringebits // now turn on the appropriate fringebits
fringer.bits |= FLAGMATRIX[y - row + 1][x - col + 1]; fringer.bits |= FLAGMATRIX[y - row + 1][x - col + 1];
// and see if this base tile kills passability // See if a tile that fringes on us kills our passability,
if (passable) { // but don't count the default base tile against us, as
if (btid > 0) { // we allow users to splash in the water.
try { if (passable && (btid > 0)) {
BaseTile bt = (BaseTile) _tmgr.getTile(btid); try {
passable = bt.isPassable(); BaseTile bt = (BaseTile) _tmgr.getTile(btid);
} catch (NoSuchTileSetException nstse) { passable = bt.isPassable();
Log.warning("Autofringer couldn't find a base " + } catch (NoSuchTileSetException nstse) {
"set while attempting to figure passability " + Log.warning("Autofringer couldn't find a base " +
"[error=" + nstse + "]."); "set while attempting to figure passability " +
} "[error=" + nstse + "].");
} }
} }
} }