Need to abstract out the assignment of the starting location of a body. We use this in yohoho for pets to put them somewhere other than a portal.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@26 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -190,6 +190,15 @@ public class SpotSceneManager extends SceneManager
|
|||||||
|
|
||||||
// we don't actually populate their occupant info, but instead assign
|
// we don't actually populate their occupant info, but instead assign
|
||||||
// them their starting location in the scene
|
// them their starting location in the scene
|
||||||
|
assignStartingLocation(body);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Give our new body a starting location.
|
||||||
|
* @param body The new body entering the scene.
|
||||||
|
*/
|
||||||
|
protected void assignStartingLocation (BodyObject body)
|
||||||
|
{
|
||||||
int portalId = _enterers.remove(body.getOid());
|
int portalId = _enterers.remove(body.getOid());
|
||||||
Portal entry;
|
Portal entry;
|
||||||
if (portalId != -1) {
|
if (portalId != -1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user