From b19e96796ce24f22c213dae20fc3584b12a775eb Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Thu, 28 Jun 2007 07:02:47 +0000 Subject: [PATCH] Check autoReady_v1 in a backwards compatible way (old games won't have set it at all). git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@338 c613c5cb-e716-0410-b11b-feb51c14d237 --- src/as/com/threerings/ezgame/client/GameControlBackend.as | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/as/com/threerings/ezgame/client/GameControlBackend.as b/src/as/com/threerings/ezgame/client/GameControlBackend.as index f2613cdd..f35c5090 100644 --- a/src/as/com/threerings/ezgame/client/GameControlBackend.as +++ b/src/as/com/threerings/ezgame/client/GameControlBackend.as @@ -140,8 +140,12 @@ public class GameControlBackend evt.ezProps = new Object(); populateProperties(evt.ezProps); + // determine whether to automatically start the game in a backwards compatible way + var autoReady :Boolean = + ("autoReady_v1" in evt.userProps) ? evt.userProps["autoReady_v1"] : true; + // ok, we're now hooked-up with the game code - _ctrl.userCodeIsConnected(evt.userProps["autoReady_v1"]); + _ctrl.userCodeIsConnected(autoReady); } protected function setUserCodeProperties (o :Object) :void