]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add a quickmenu command to select a player to spectate
authorterencehill <piuntn@gmail.com>
Fri, 25 Oct 2019 19:44:38 +0000 (21:44 +0200)
committerterencehill <piuntn@gmail.com>
Fri, 25 Oct 2019 19:44:38 +0000 (21:44 +0200)
qcsrc/client/hud/panel/quickmenu.qc

index 6fc078921c994dc09eac92f276ed274f06dfcfe5..005a25d5c61eb58633df6771686146373135ccf8 100644 (file)
@@ -858,6 +858,11 @@ void QuickMenu_Default(string target_submenu)
                QUICKMENU_ENTRY(CTX(_("QMCMD^Shuffle teams")), "vcall shuffleteams")
        QUICKMENU_SMENU(CTX(_("QMCMD^Call a vote")), "Call a vote")
 
+       if(spectatee_status != 0)
+       {
+       QUICKMENU_SMENU_PL(CTX(_("QMCMD^Spectate a player")), "Spectate a player", "spectate \"%s^7\"", 0, 1)
+       }
+
        if(target_submenu != "" && !target_submenu_found)
        {
                LOG_INFOF("Couldn't find submenu \"%s\"", target_submenu);