Assign our starting location in the new addOccupantInfo() and do it before the
occupant's oid is added so that our info is already in place when bodyEntered gets called. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@792 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -34,6 +34,7 @@ import com.threerings.presents.server.InvocationException;
|
||||
import com.threerings.crowd.chat.data.UserMessage;
|
||||
import com.threerings.crowd.chat.server.SpeakUtil;
|
||||
import com.threerings.crowd.data.BodyObject;
|
||||
import com.threerings.crowd.data.OccupantInfo;
|
||||
import com.threerings.crowd.server.PlaceRegistry;
|
||||
|
||||
import com.threerings.whirled.server.SceneManager;
|
||||
@@ -110,15 +111,6 @@ public class SpotSceneManager extends SceneManager
|
||||
updateLocation(body, portal.getLocation());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bodyWillEnter (BodyObject body)
|
||||
{
|
||||
super.bodyWillEnter(body);
|
||||
|
||||
// assign this body a starting location in the scene
|
||||
assignStartingLocation(body);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void didStartup ()
|
||||
{
|
||||
@@ -168,6 +160,16 @@ public class SpotSceneManager extends SceneManager
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addOccupantInfo (BodyObject body, OccupantInfo info)
|
||||
{
|
||||
// assign this body a starting location in the scene
|
||||
assignStartingLocation(body);
|
||||
|
||||
// then call super, so we know that our info will be ready before bodyAdded is triggered
|
||||
super.addOccupantInfo(body, info);
|
||||
}
|
||||
|
||||
/**
|
||||
* Give our new body a starting location.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user