Was a little too overzealous on the errors during change-location calls. Times when the user is already there or already moving should just be silently ignored to avoid flooding the user with extraneous feedback. Also, use a better error for the case when they just somehow aren't currently in a scene.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3890 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Mike Thomas
2006-02-24 19:51:11 +00:00
parent 54d465b61f
commit 6aa865f51b
@@ -201,7 +201,8 @@ public class SpotSceneDirector extends BasicDirector
Log.info("Not going to " + loc + "; we're at " + _location + Log.info("Not going to " + loc + "; we're at " + _location +
" and we're headed to " + _pendingLoc + "."); " and we're headed to " + _pendingLoc + ".");
if (listener != null) { if (listener != null) {
listener.requestFailed(new InvocationException(ALREADY_THERE)); // This isn't really a failure, it's just a no-op.
listener.requestCompleted(_location);
} }
return; return;
} }
@@ -210,8 +211,8 @@ public class SpotSceneDirector extends BasicDirector
Log.info("Not going to " + loc + "; we're at " + _location + Log.info("Not going to " + loc + "; we're at " + _location +
" and we're headed to " + _pendingLoc + "."); " and we're headed to " + _pendingLoc + ".");
if (listener != null) { if (listener != null) {
listener.requestFailed( // Already moving, best thing to do is ignore it.
new InvocationException(MOVE_IN_PROGRESS)); listener.requestCompleted(_pendingLoc);
} }
return; return;
} }
@@ -221,7 +222,8 @@ public class SpotSceneDirector extends BasicDirector
Log.warning("Requested to change locations, but we're not " + Log.warning("Requested to change locations, but we're not " +
"currently in any scene [loc=" + loc + "]."); "currently in any scene [loc=" + loc + "].");
if (listener != null) { if (listener != null) {
listener.requestFailed(new InvocationException(NO_SUCH_PLACE)); listener.requestFailed(
new InvocationException("m.cant_get_there"));
} }
return; return;
} }
@@ -265,7 +267,7 @@ public class SpotSceneDirector extends BasicDirector
Log.warning("Requested to join cluster, but we're not " + Log.warning("Requested to join cluster, but we're not " +
"currently in any scene [froid=" + froid + "]."); "currently in any scene [froid=" + froid + "].");
if (listener != null) { if (listener != null) {
listener.requestFailed(new Exception(NO_SUCH_PLACE)); listener.requestFailed(new Exception("m.cant_get_there"));
} }
return; return;
} }