/// <summary>
    /// If the local player died, send the drop flag event to all players
    /// </summary>
    void HandleFlagDrop()
    {
        if (m_CarryingPlayer == null)
        {
            return;
        }
        bl_PlayerDamageManager playerhealth = m_CarryingPlayer.GetComponent <bl_PlayerDamageManager>();

        if (playerhealth.health <= 0)
        {
            DropFlag();
        }
    }
    void DrawGlobalSettings()
    {
        EditorGUILayout.BeginVertical("box");
        GUILayout.BeginHorizontal();
        GUILayout.Label("Weapon Info", EditorStyles.toolbarButton);
        if (playerSettings != null)
        {
            GUILayout.Space(2);
            if (GUILayout.Button("GameData", EditorStyles.toolbarButton, GUILayout.Width(70)))
            {
                Selection.activeObject = bl_GameData.Instance;
                EditorGUIUtility.PingObject(bl_GameData.Instance);
            }
            GUILayout.Space(2);
            if (GUILayout.Button("Export", EditorStyles.toolbarButton, GUILayout.Width(50)))
            {
                EditorWindow.GetWindow <bl_ImportExportWeapon>("Export", true).PrepareToExport(script, playerSettings.GetComponent <bl_PlayerSync>());
            }
        }
        GUILayout.EndHorizontal();

        EditorGUILayout.Space();
        script.GunID     = EditorGUILayout.Popup("Gun ID ", script.GunID, GameData.AllWeaponStringList(), EditorStyles.toolbarDropDown);
        script.Info.Type = bl_GameData.Instance.GetWeapon(script.GunID).Type;
        GunType t = script.Info.Type;

        if (t == GunType.Machinegun || t == GunType.Pistol || t == GunType.Burst)
        {
            EditorGUILayout.BeginHorizontal("box");
            int w = ((int)EditorGUIUtility.currentViewWidth / 3) - 25;
            GUI.enabled      = t != GunType.Machinegun;
            script.CanAuto   = EditorGUILayout.ToggleLeft("Auto", script.CanAuto, GUILayout.Width(w));
            GUI.enabled      = t != GunType.Burst;
            script.CanSemi   = EditorGUILayout.ToggleLeft("Semi", script.CanSemi, GUILayout.Width(w));
            GUI.enabled      = t != GunType.Pistol;
            script.CanSingle = EditorGUILayout.ToggleLeft("Single", script.CanSingle, GUILayout.Width(w));
            GUI.enabled      = true;
            EditorGUILayout.EndHorizontal();
        }
        script.CrossHairScale = EditorGUILayout.Slider("CrossHair Scale: ", script.CrossHairScale, 1, 30);
        EditorGUILayout.EndVertical();
    }