/// <summary>
    /// Player drop weapon if he have him
    /// </summary>
    public void DropWeapon()
    {
        if (weaponOnMe)
        {
            weaponOnMe.DropWeapon(true);

            Message_Sr.DropWeapon_Sr dropped = new Message_Sr.DropWeapon_Sr();
            dropped.index = index;
            RoomsManager.SendReliableAtRoom(Networking_msgType_Sr.DropWeapon, dropped, index);
        }
    }
示例#2
0
    public static void HandleDropWeapon(NetworkMessage netMsg)
    {
        Message_Sr.DropWeapon_Sr drop = netMsg.ReadMessage <Message_Sr.DropWeapon_Sr>();

        if (Networking_OnConnect.AccountVerefication(drop.index, drop.log, drop.pass))
        {
            Player_MovePlayer controll = GetPlayerController(drop.index);
            if (controll)
            {
                controll.DropWeapon();
            }
        }
    }