Allow portals to have a targetPortalId of -1, which means simply

"whatever the default entrance is of the target scene".


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@12 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Ray Greenwell
2006-07-07 00:36:02 +00:00
parent 2933846516
commit c9a8c1d117
3 changed files with 15 additions and 4 deletions
@@ -91,7 +91,12 @@ public class SpotSceneManager extends SceneManager
*/
public void mapEnteringBody (BodyObject body, int portalId)
{
_enterers.put(body.getOid(), portalId);
// small optimization: don't save portalId -1, because it simply means
// "use the default entrance" and retrieving an unset value will
// return -1 anyway
if (portalId != -1) {
_enterers.put(body.getOid(), portalId);
}
}
/**