Refuse moves to invalid zones, scenes or places.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2819 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2003-10-03 20:41:32 +00:00
parent 567d3696a9
commit b032f51b84
3 changed files with 22 additions and 3 deletions
@@ -1,5 +1,5 @@
//
// $Id: LocationDirector.java,v 1.30 2003/06/14 00:47:16 mdb Exp $
// $Id: LocationDirector.java,v 1.31 2003/10/03 20:41:31 mdb Exp $
package com.threerings.crowd.client;
@@ -112,6 +112,12 @@ public class LocationDirector extends BasicDirector
*/
public boolean moveTo (int placeId)
{
// make sure the placeId is valid
if (placeId < 0) {
Log.warning("Refusing moveTo(): invalid placeId " + placeId + ".");
return false;
}
// first check to see if our observers are happy with this move
// request
if (!mayMoveTo(placeId, null)) {