Formatting tweaks; moved that new protected method down with its friends.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@594 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -59,31 +59,8 @@ public class SpotSceneManager extends SceneManager
|
|||||||
{
|
{
|
||||||
SpotSceneManager mgr = (SpotSceneManager)
|
SpotSceneManager mgr = (SpotSceneManager)
|
||||||
CrowdServer.plreg.getPlaceManager(body.getPlaceOid());
|
CrowdServer.plreg.getPlaceManager(body.getPlaceOid());
|
||||||
if (mgr == null) {
|
if (mgr != null) {
|
||||||
return;
|
mgr.moveToDefaultPortal(body);
|
||||||
}
|
|
||||||
|
|
||||||
mgr.moveToDefaultPortal (body);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Move the specified body to the default portal, if possible.
|
|
||||||
*/
|
|
||||||
protected void moveToDefaultPortal (BodyObject body)
|
|
||||||
{
|
|
||||||
SpotScene scene = (SpotScene)getScene();
|
|
||||||
if (scene == null) {
|
|
||||||
Log.warning("No scene in moveBodyToDefaultPortal()? [who=" + body.who() +
|
|
||||||
", where=" + where() + "].");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
Location eloc = scene.getDefaultEntrance().getLocation();
|
|
||||||
handleChangeLoc(body, eloc);
|
|
||||||
} catch (InvocationException ie) {
|
|
||||||
Log.warning("Could not move user to default portal [where=" + where() +
|
|
||||||
", who=" + body.who() + ", error=" + ie + "].");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -227,6 +204,27 @@ public class SpotSceneManager extends SceneManager
|
|||||||
{
|
{
|
||||||
return new SceneLocation(entry.getOppLocation(), body.getOid());
|
return new SceneLocation(entry.getOppLocation(), body.getOid());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Move the specified body to the default portal, if possible.
|
||||||
|
*/
|
||||||
|
protected void moveToDefaultPortal (BodyObject body)
|
||||||
|
{
|
||||||
|
SpotScene scene = (SpotScene)getScene();
|
||||||
|
if (scene == null) {
|
||||||
|
Log.warning("No scene in moveBodyToDefaultPortal()? [who=" + body.who() +
|
||||||
|
", where=" + where() + "].");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
Location eloc = scene.getDefaultEntrance().getLocation();
|
||||||
|
handleChangeLoc(body, eloc);
|
||||||
|
} catch (InvocationException ie) {
|
||||||
|
Log.warning("Could not move user to default portal [where=" + where() +
|
||||||
|
", who=" + body.who() + ", error=" + ie + "].");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called by the {@link SpotProvider} when we receive a request by a user to occupy a
|
* Called by the {@link SpotProvider} when we receive a request by a user to occupy a
|
||||||
|
|||||||
Reference in New Issue
Block a user