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
This commit is contained in:
Michael Bayne
2007-09-24 20:47:17 +00:00
parent 6904c467bf
commit 873eede988
@@ -438,19 +438,24 @@ public class LocationDirector extends BasicDirector
} }
// documentation inherited from interface // 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 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;
}
if (!movePending()) { Log.info("Moving at request of server [placeId=" + placeId + "].");
// clear out our old place information // clear out our old place information
mayLeavePlace(); mayLeavePlace();
didLeavePlace(); didLeavePlace();
// move to the new place // move to the new place
moveTo(placeId); moveTo(placeId);
} }
}
/** /**
* Called when we receive the place object to which we subscribed after a successful moveTo * Called when we receive the place object to which we subscribed after a successful moveTo