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: SceneDirector.java,v 1.24 2003/02/12 07:23:30 mdb Exp $
// $Id: SceneDirector.java,v 1.25 2003/10/03 20:41:31 mdb Exp $
package com.threerings.whirled.client;
@@ -94,6 +94,12 @@ public class SceneDirector extends BasicDirector
*/
public boolean moveTo (int sceneId)
{
// make sure the sceneId is valid
if (sceneId < 0) {
Log.warning("Refusing moveTo(): invalid sceneId " + sceneId + ".");
return false;
}
// sanity-check the destination scene id
if (sceneId == _sceneId) {
Log.warning("Refusing request to move to the same scene " +