]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Hide bot team from the scoreboard on single player mode
authorMattia Basaglia <mattia.basaglia@gmail.com>
Sun, 19 Mar 2017 21:53:13 +0000 (21:53 +0000)
committerMattia Basaglia <mattia.basaglia@gmail.com>
Sun, 19 Mar 2017 21:53:13 +0000 (21:53 +0000)
qcsrc/client/hud/panel/scoreboard.qc
qcsrc/menu/xonotic/util.qc
qcsrc/server/mutators/mutator/gamemode_singleplayer.qc

index b8c9a3ea1579cae0e226eff1dc647572dd099c5b..2716a2fd6bb51a00a7735e9c29cc2513dcd9ea2b 100644 (file)
@@ -1539,6 +1539,8 @@ void Scoreboard_Draw()
                                continue;
                        if(!tm.team)
                                continue;
+                       if(tm.team != NUM_TEAM_1 && gametype == MAPINFO_TYPE_SINGLE_PLAYER)
+                               continue;
 
                        draw_beginBoldFont();
                        vector rgb = Team_ColorRGB(tm.team);
index 7f038a85fb53efe0f28d7e02a0efbd4855bce3b1..aabccaf307cd96ad472104c7db67f8556135a377 100644 (file)
@@ -694,6 +694,7 @@ float updateCompression()
        GAMETYPE(MAPINFO_TYPE_ONSLAUGHT) \
        GAMETYPE(MAPINFO_TYPE_ASSAULT) \
        /* GAMETYPE(MAPINFO_TYPE_INVASION) */ \
+       GAMETYPE(MAPINFO_TYPE_SINGLE_PLAYER) \
        /**/
 
 // hidden gametypes come last so indexing always works correctly
index 627aea66d1826eefb80bc4543c14c9e25ff01550..371f906af01c976d75411e936a608e32355858fe 100644 (file)
@@ -256,7 +256,9 @@ MUTATOR_HOOKFUNCTION(sp, PlayerPreThink)
 {
     entity player = M_ARGV(0, entity);
     if ( IS_BOT_CLIENT(player) && !player.sp_spawn_spot )
+    {
         bot_remove(player);
+    }
 }
 
 // Prevents bots from being able to pick up items
@@ -268,7 +270,7 @@ MUTATOR_HOOKFUNCTION(sp, ItemTouch)
     return MUT_ITEMTOUCH_CONTINUE;
 }
 
-// revents bots from being willing to pick up items
+// Prevents bots from being willing to pick up items
 MUTATOR_HOOKFUNCTION(sp, Item_Spawn)
 {
     entity item = M_ARGV(0, entity);