Deal gracefully with moving to a non-existent location.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1385 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Walter Korman
2002-05-22 21:47:14 +00:00
parent b4982af8bc
commit ed25692d93
2 changed files with 13 additions and 9 deletions
@@ -1,5 +1,5 @@
// //
// $Id: ChatDirector.java,v 1.20 2002/04/30 17:27:30 mdb Exp $ // $Id: ChatDirector.java,v 1.21 2002/05/22 21:44:54 shaper Exp $
package com.threerings.crowd.chat; package com.threerings.crowd.chat;
@@ -186,8 +186,10 @@ public class ChatDirector
// listen to the new object // listen to the new object
_place = place; _place = place;
if (_place != null) {
_place.addListener(this); _place.addListener(this);
} }
}
// documentation inherited // documentation inherited
public void locationChangeFailed (int placeId, String reason) public void locationChangeFailed (int placeId, String reason)
@@ -1,5 +1,5 @@
// //
// $Id: OccupantDirector.java,v 1.1 2002/04/15 14:38:45 shaper Exp $ // $Id: OccupantDirector.java,v 1.2 2002/05/22 21:47:14 shaper Exp $
package com.threerings.crowd.client; package com.threerings.crowd.client;
@@ -118,6 +118,7 @@ public class OccupantDirector
// listen to the new one // listen to the new one
_place = place; _place = place;
if (_place != null) {
_place.addListener(this); _place.addListener(this);
// cache the occupant info for the occupants in this room // cache the occupant info for the occupants in this room
@@ -127,6 +128,7 @@ public class OccupantDirector
_ocache.put(info.getBodyOid(), info); _ocache.put(info.getBodyOid(), info);
} }
} }
}
// inherit documentation // inherit documentation
public void locationChangeFailed (int placeId, String reason) public void locationChangeFailed (int placeId, String reason)