Updates to reflect new BodyObject.location change. We now have a ScenePlace and

ScenedBodyObject goes away.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@372 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Michael Bayne
2007-07-21 00:47:00 +00:00
parent c8b2f7212b
commit e03ddd71e8
20 changed files with 174 additions and 156 deletions
@@ -61,23 +61,25 @@ public class SpotSceneManager extends SceneManager
*/
public static void moveBodyToDefaultPortal (BodyObject body)
{
SpotSceneManager mgr = (SpotSceneManager)CrowdServer.plreg.getPlaceManager(body.location);
if (mgr != null) {
SpotScene scene = (SpotScene)mgr.getScene();
if (scene == null) {
Log.warning("No scene in moveBodyToDefaultPortal()? " +
"[who=" + body.who() +
", where=" + mgr.where() + "].");
return;
}
try {
Location eloc = scene.getDefaultEntrance().getLocation();
mgr.handleChangeLoc(body, eloc);
} catch (InvocationException ie) {
Log.warning("Could not move user to default portal " +
"[where=" + mgr.where() + ", who=" + body.who() +
", error=" + ie + "].");
}
SpotSceneManager mgr = (SpotSceneManager)
CrowdServer.plreg.getPlaceManager(body.getPlaceOid());
if (mgr == null) {
return;
}
SpotScene scene = (SpotScene)mgr.getScene();
if (scene == null) {
Log.warning("No scene in moveBodyToDefaultPortal()? [who=" + body.who() +
", where=" + mgr.where() + "].");
return;
}
try {
Location eloc = scene.getDefaultEntrance().getLocation();
mgr.handleChangeLoc(body, eloc);
} catch (InvocationException ie) {
Log.warning("Could not move user to default portal [where=" + mgr.where() +
", who=" + body.who() + ", error=" + ie + "].");
}
}