예제 #1
0
        private void HandleWorldCacheURL(NetworkMessage msg)
        {
            if (WorldURL != string.Empty)
            {
                return;
            }

            MsgCacheURL url = msg as MsgCacheURL;

            WorldURL = url.URL;

            NetClient.SendMessage(new MsgWantWHash()); // fastmap servers send the world cache before the hash, so send the hash request again so they know we wants it
        }
예제 #2
0
        private static void HandleWorldCacheURL(NetworkMessage msg)
        {
            if (GotURL)
            {
                return;
            }

            GotURL = true;
            MsgCacheURL url = msg as MsgCacheURL;

            WriteLine("Received Cache URL" + url.URL);

            client.SendMessage(new MsgWantWHash());
        }
예제 #3
0
        public override void Setup()
        {
            SettingsCache = new MsgGameSettings();

            byte[] worldBuffer = World.GetWorldData();
            SettingsCache.WorldSize           = worldBuffer.Length;
            SettingsCache.GameType            = Config.GameData.GameType;
            SettingsCache.GameOptions         = Config.GameData.GameOptions;
            SettingsCache.MaxPlayers          = Config.GameData.MaxPlayers;
            SettingsCache.MaxShots            = Config.GameData.MaxShots;
            SettingsCache.MaxFlags            = FlagManager.MaxFlagID;
            SettingsCache.LinearAcceleration  = Config.GameData.LinearAcceleration;
            SettingsCache.AngularAcceleration = Config.GameData.AngularAcceleration;

            HashCache             = new MsgWantWHash();
            HashCache.IsRandomMap = World.IsRandom;
            HashCache.WorldHash   = BZFlag.Data.Utils.Cryptography.MD5Hash(worldBuffer);

            URLCache     = new MsgCacheURL();
            URLCache.URL = Config.GameData.MapURL;
        }