rollback r4636 due to interference with non-yohoho projects

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4637 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Elizabeth Fong
2007-03-27 21:49:25 +00:00
parent f76825c76e
commit 3c7a546472
3 changed files with 3 additions and 30 deletions
@@ -26,11 +26,8 @@ import java.util.Iterator;
import com.threerings.util.Name;
import com.threerings.presents.dobj.DObject;
import com.threerings.presents.dobj.DObjectManager;
import com.threerings.presents.dobj.DSet;
import com.threerings.presents.dobj.MessageEvent;
import com.threerings.presents.dobj.OidList;
import com.threerings.presents.server.LocalDObjectMgr;
import com.threerings.crowd.Log;
import com.threerings.crowd.chat.data.SpeakMarshaller;
@@ -57,33 +54,14 @@ public class PlaceObject extends DObject
// AUTO-GENERATED: FIELDS END
/**
* Exists solely to make calls into the client's DObjManager look sensible:
* Exists solely to make calls into the manager look sensible:
* <pre>_plobj.manager.invoke("someMethod", args);</pre>
*/
public class ManagerCaller
{
public ManagerCaller ()
{
// Avoid NPE boochery if we're in singleplayer mode in yohoho:
// It turns out that GameController posts events directly to the queue
// of the DObjectManager of the GameObject, which is in this case the
// DObjectManager instead of the ClientDObjectMgr, so the sourceOid is
// unchanged, leading to the nasty problem of caller being null as the
// message was not actually received from any connected outside client.
DObjectManager clomgr = LocalDObjectMgr.clomgr;
if (clomgr != null) {
_mgr = clomgr;
} else {
_mgr = PlaceObject.this.getManager();
}
}
public void invoke (String method, Object ... args) {
_mgr.postEvent(new MessageEvent(_oid, method, args));
postMessage(method, args);
}
protected DObjectManager _mgr;
}
/**