added inValidLocation() to check if an player is in a non-portal location
within the room. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1496 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: SpotSceneManager.java,v 1.8 2002/06/14 23:03:44 ray Exp $
|
// $Id: SpotSceneManager.java,v 1.9 2002/06/19 23:22:51 ray Exp $
|
||||||
|
|
||||||
package com.threerings.whirled.spot.server;
|
package com.threerings.whirled.spot.server;
|
||||||
|
|
||||||
@@ -216,6 +216,21 @@ public class SpotSceneManager extends SceneManager
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return true if the specified user is in the scene and
|
||||||
|
* in a valid location (not on a portal).
|
||||||
|
*/
|
||||||
|
protected boolean inValidLocation (BodyObject body)
|
||||||
|
{
|
||||||
|
int bodyOid = body.getOid();
|
||||||
|
for (int ii=0; ii < _locationOccs.length; ii++) {
|
||||||
|
if (_locationOccs[ii] == bodyOid) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When an occupant leaves the room, we want to clear out any location
|
* When an occupant leaves the room, we want to clear out any location
|
||||||
* they may have occupied.
|
* they may have occupied.
|
||||||
|
|||||||
Reference in New Issue
Block a user