Пример #1
0
        private static void HandleGameSettings(NetworkMessage msg)
        {
            MsgGameSettings g = msg as MsgGameSettings;

            WriteLine("MsgGameSettings " + g.CodeAbreviation.ToString());
            WriteLine("\tGame Style " + g.GameType.ToString());
            WriteLine("\tOptions " + g.GameOptions.ToString());
            WriteLine("\tMax Shots " + g.MaxShots.ToString() + " Max Players " + g.MaxPlayers.ToString());
            WriteLine("\tShake Wins " + g.ShakeWins.ToString() + " Shake Timeout " + g.ShakeTimeout.ToString());
        }
Пример #2
0
        private void HandleGameSettings(NetworkMessage msg)
        {
            MsgGameSettings st = msg as MsgGameSettings;

            if (st == null)
            {
                return;
            }

            GameSettings = st;

            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;
        }