Require that the current scene be specified in the change location request
because odd things frequently happen if a player somehow double clicks or in some other way queues up a change scene then a change loc from the previous scene. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2768 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: SpotProvider.java,v 1.19 2003/07/18 01:58:38 eric Exp $
|
||||
// $Id: SpotProvider.java,v 1.20 2003/08/13 00:11:03 mdb Exp $
|
||||
|
||||
package com.threerings.whirled.spot.server;
|
||||
|
||||
@@ -155,12 +155,18 @@ public class SpotProvider
|
||||
/**
|
||||
* Processes a {@link SpotService#changeLocation} request.
|
||||
*/
|
||||
public void changeLocation (ClientObject caller, Location loc,
|
||||
public void changeLocation (ClientObject caller, int sceneId, Location loc,
|
||||
SpotService.ConfirmListener listener)
|
||||
throws InvocationException
|
||||
{
|
||||
int sceneId = getCallerSceneId(caller);
|
||||
BodyObject source = (BodyObject)caller;
|
||||
int cSceneId = getCallerSceneId(caller);
|
||||
if (cSceneId != sceneId) {
|
||||
Log.warning("Rejecting changeLocation for invalid scene " +
|
||||
"[user=" + source.who() + ", insid=" + cSceneId +
|
||||
", wantsid=" + sceneId + ", loc=" + loc + "].");
|
||||
throw new InvocationException(INVALID_LOCATION);
|
||||
}
|
||||
|
||||
// look up the scene manager for the specified scene
|
||||
SpotSceneManager smgr = (SpotSceneManager)
|
||||
|
||||
Reference in New Issue
Block a user