CEngineSharp_Server.World.Entities.Player.JoinMap C# (CSharp) Method

JoinMap() public method

public JoinMap ( Map map ) : void
map CEngineSharp_Server.World.Maps.Map
return void
        public void JoinMap(Map map)
        {
            if (this.Map != null)
                this.LeaveMap(false);

            map.AddPlayer(this);
            this.Map = map;
            this.MapNum = ContentManager.Instance.MapManager.GetMapIndex(map);

            this.InMap = false;

            Packet packet = new Packet(PacketType.MapCheckPacket);
            packet.Message.Write(this.Map.Name);
            packet.Message.Write(this.Map.Version);
            this.Connection.SendMessage(packet.Message, NetDeliveryMethod.ReliableOrdered, (int)ChannelTypes.WORLD);
        }