Only Yohoho needs the game object registered as an auxiliary source
because it plays games in a special place rather than actually moving the player into the game room which naturally registers the place object as a chat source. Fortunately, we can implement the necessary hackery to support Yohoho in a reasonably generic manner. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3291 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -85,8 +85,13 @@ public abstract class GameController extends PlaceController
|
||||
// obtain a casted reference
|
||||
_gobj = (GameObject)plobj;
|
||||
|
||||
_ctx.getChatDirector().addAuxiliarySource(
|
||||
_gobj, GameCodes.GAME_CHAT_TYPE);
|
||||
// if this place object is not our current location we'll need to
|
||||
// add it as an auxiliary chat source
|
||||
BodyObject bobj = (BodyObject)_ctx.getClient().getClientObject();
|
||||
if (bobj.location != plobj.getOid()) {
|
||||
_ctx.getChatDirector().addAuxiliarySource(
|
||||
_gobj, GameCodes.GAME_CHAT_TYPE);
|
||||
}
|
||||
|
||||
// and add ourselves as a listener
|
||||
_gobj.addListener(this);
|
||||
|
||||
Reference in New Issue
Block a user