Added moveBack() which requests to move to the location we occupied

immediately previous to our current location.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@551 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2001-10-24 03:10:30 +00:00
parent 092d96509e
commit 882dc381b0
@@ -1,5 +1,5 @@
//
// $Id: LocationDirector.java,v 1.13 2001/10/18 01:40:04 mdb Exp $
// $Id: LocationDirector.java,v 1.14 2001/10/24 03:10:30 mdb Exp $
package com.threerings.crowd.client;
@@ -92,6 +92,24 @@ public class LocationDirector
LocationService.moveTo(_ctx.getClient(), placeId, this);
}
/**
* Requests to move to the room that we last occupied, if such a room
* exists.
*
* @return true if we had a previous room and we requested to move to
* it, false if we had no previous room.
*/
public boolean moveBack ()
{
if (_previousPlaceId == -1) {
return false;
} else {
moveTo(_previousPlaceId);
return true;
}
}
/**
* This can be called by derived classes that need to coopt the moving
* process to extend it in some way or other. In such situations, they