Added support for initiating a place/scene/zone transition from the
server; chat director no longer needs to wait until we're logged on to register itself with the invocation director. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1393 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: SceneDirector.java,v 1.13 2002/05/22 21:48:44 shaper Exp $
|
||||
// $Id: SceneDirector.java,v 1.14 2002/05/26 02:24:46 mdb Exp $
|
||||
|
||||
package com.threerings.whirled.client;
|
||||
|
||||
@@ -234,6 +234,36 @@ public class SceneDirector
|
||||
_locdir.failedToMoveTo(sceneId, reason);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called to clean up our place and scene state information when we
|
||||
* leave a scene.
|
||||
*/
|
||||
public void didLeaveScene ()
|
||||
{
|
||||
// let the location director know what's up
|
||||
_locdir.didLeavePlace();
|
||||
|
||||
// clear out our own scene state
|
||||
clearScene();
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the server has decided to forcibly move us to another
|
||||
* scene. The server first ejects us from our previous scene and then
|
||||
* sends us a notification with our new location. We then turn around
|
||||
* and issue a standard moveTo request.
|
||||
*/
|
||||
public void handleMoveNotification (int sceneId)
|
||||
{
|
||||
Log.info("Moving at request of server [sceneId=" + sceneId + "].");
|
||||
|
||||
// clear out our old scene and place data
|
||||
didLeaveScene();
|
||||
|
||||
// move to the new scene
|
||||
moveTo(sceneId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when something breaks down in the process of performing a
|
||||
* <code>moveTo</code> request.
|
||||
|
||||
Reference in New Issue
Block a user