From ec1a243d19ff76cfb1c7c912d186c4e099711f22 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Wed, 17 Oct 2007 21:33:52 +0000 Subject: [PATCH] When we start and end a transaction in EZGame do so on the InvocationDirector as that's where all of our messages are generated. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@454 c613c5cb-e716-0410-b11b-feb51c14d237 --- .../ezgame/client/GameControlBackend.as | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/as/com/threerings/ezgame/client/GameControlBackend.as b/src/as/com/threerings/ezgame/client/GameControlBackend.as index 04082067..cb6e193d 100644 --- a/src/as/com/threerings/ezgame/client/GameControlBackend.as +++ b/src/as/com/threerings/ezgame/client/GameControlBackend.as @@ -889,20 +889,20 @@ public class GameControlBackend } /** - * Start a dobj transaction on the game object. + * Starts a transaction that will group all game state changes into a single message. */ protected function startTransaction_v1 () :void { validateConnected(); - _ezObj.startTransaction(); + _ctx.getClient().getInvocationDirector().startTransaction(); } /** - * Commit a dobj transaction on the game object. + * Commits a transaction started with {@link #startTransaction_v1}. */ protected function commitTransaction_v1 () :void { - _ezObj.commitTransaction(); + _ctx.getClient().getInvocationDirector().commitTransaction(); } /** @@ -919,8 +919,7 @@ public class GameControlBackend protected var _ctx :CrowdContext; - protected var _userListener :MessageAdapter = - new MessageAdapter(messageReceivedOnUserObject); + protected var _userListener :MessageAdapter = new MessageAdapter(messageReceivedOnUserObject); protected var _container :GameContainer; @@ -931,8 +930,8 @@ public class GameControlBackend protected var _userFuncs :Object; - /** The function on the EZGameControl which we can use to directly - * dispatch events to the user's game. */ + /** The function on the EZGameControl which we can use to directly dispatch events to the + * user's game. */ protected var _ezDispatcher :Function; protected var _gameData :Object;