From 6aa865f51b18cc366e3307f624f6290223bb1ae1 Mon Sep 17 00:00:00 2001 From: Mike Thomas Date: Fri, 24 Feb 2006 19:51:11 +0000 Subject: [PATCH] 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 --- .../whirled/spot/client/SpotSceneDirector.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/java/com/threerings/whirled/spot/client/SpotSceneDirector.java b/src/java/com/threerings/whirled/spot/client/SpotSceneDirector.java index 989e66075..aaf681d88 100644 --- a/src/java/com/threerings/whirled/spot/client/SpotSceneDirector.java +++ b/src/java/com/threerings/whirled/spot/client/SpotSceneDirector.java @@ -201,7 +201,8 @@ public class SpotSceneDirector extends BasicDirector Log.info("Not going to " + loc + "; we're at " + _location + " and we're headed to " + _pendingLoc + "."); 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; } @@ -210,8 +211,8 @@ public class SpotSceneDirector extends BasicDirector Log.info("Not going to " + loc + "; we're at " + _location + " and we're headed to " + _pendingLoc + "."); if (listener != null) { - listener.requestFailed( - new InvocationException(MOVE_IN_PROGRESS)); + // Already moving, best thing to do is ignore it. + listener.requestCompleted(_pendingLoc); } return; } @@ -221,7 +222,8 @@ public class SpotSceneDirector extends BasicDirector Log.warning("Requested to change locations, but we're not " + "currently in any scene [loc=" + loc + "]."); if (listener != null) { - listener.requestFailed(new InvocationException(NO_SUCH_PLACE)); + listener.requestFailed( + new InvocationException("m.cant_get_there")); } return; } @@ -265,7 +267,7 @@ public class SpotSceneDirector extends BasicDirector Log.warning("Requested to join cluster, but we're not " + "currently in any scene [froid=" + froid + "]."); if (listener != null) { - listener.requestFailed(new Exception(NO_SUCH_PLACE)); + listener.requestFailed(new Exception("m.cant_get_there")); } return; }