From 0127ccba96a44c1e56b2a4f11040249002bb0378 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Fri, 31 Dec 2004 05:30:38 +0000 Subject: [PATCH] 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 --- src/java/com/threerings/parlor/game/GameController.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/java/com/threerings/parlor/game/GameController.java b/src/java/com/threerings/parlor/game/GameController.java index 26136ffdc..1d3b0bc4a 100644 --- a/src/java/com/threerings/parlor/game/GameController.java +++ b/src/java/com/threerings/parlor/game/GameController.java @@ -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);