From 873eede988a31f00d9c351d254fd433d837b507a Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Mon, 24 Sep 2007 20:47:17 +0000 Subject: [PATCH] Log a message when we drop a forced move request due to a pending move. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4831 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../crowd/client/LocationDirector.java | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/java/com/threerings/crowd/client/LocationDirector.java b/src/java/com/threerings/crowd/client/LocationDirector.java index 62824fa50..afa67f570 100644 --- a/src/java/com/threerings/crowd/client/LocationDirector.java +++ b/src/java/com/threerings/crowd/client/LocationDirector.java @@ -438,18 +438,23 @@ public class LocationDirector extends BasicDirector } // documentation inherited from interface - public void forcedMove (final int placeId) + public void forcedMove (int placeId) { - Log.info("Moving at request of server [placeId=" + placeId + "]."); - - if (!movePending()) { - // clear out our old place information - mayLeavePlace(); - didLeavePlace(); - - // move to the new place - moveTo(placeId); + // if we're in the middle of a move, we can't abort it or we will screw everything up, so + // just finish up what we're doing and assume that the repeated move request was the + // spurious one as it would be in the case of lag causing rapid-fire repeat requests + if (movePending()) { + Log.info("Dropping forced move because we have a move pending " + + "[pendId=" + _pendingPlaceId + ", reqId=" + placeId + "]."); + return; } + + Log.info("Moving at request of server [placeId=" + placeId + "]."); + // clear out our old place information + mayLeavePlace(); + didLeavePlace(); + // move to the new place + moveTo(placeId); } /**