]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Enable sv_teamnagger in CA, remove HideTeamNagger mutator hook
authorbones_was_here <bones_was_here@xonotic.au>
Sun, 9 Jun 2024 16:07:19 +0000 (02:07 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Mon, 5 Aug 2024 16:26:25 +0000 (02:26 +1000)
sv_teamnagger seems to work fine in CA and is already disabled in
gametypes without teams.

qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc
qcsrc/common/gamemodes/gamemode/cts/sv_cts.qc
qcsrc/common/gamemodes/gamemode/race/sv_race.qc
qcsrc/server/client.qc
qcsrc/server/command/vote.qc
qcsrc/server/mutators/events.qh

index dbb089ab0e6244e8dc47e1c3de4f92896f3297bb..5315d1e88f017e05ae6aea4246000abad13a2936 100644 (file)
@@ -641,11 +641,6 @@ MUTATOR_HOOKFUNCTION(ca, ClientCommand_Spectate)
        return MUT_SPECCMD_CONTINUE;
 }
 
-MUTATOR_HOOKFUNCTION(ca, HideTeamNagger)
-{
-       return true; // doesn't work well with the whole spectator as player thing
-}
-
 MUTATOR_HOOKFUNCTION(ca, SetWeaponArena)
 {
        if (M_ARGV(0, string) == "0" || M_ARGV(0, string) == "")
index fc13875b159471b43f23f83ca748ba727b326fa4..f9003089547b1fd1a0bbe25b7c47ef25169f5d7c 100644 (file)
@@ -347,11 +347,6 @@ MUTATOR_HOOKFUNCTION(cts, Race_FinalCheckpoint)
                ClientKill_Silent(player, autocvar_g_cts_finish_kill_delay);
 }
 
-MUTATOR_HOOKFUNCTION(cts, HideTeamNagger)
-{
-       return true; // doesn't work so well (but isn't cts a teamless mode?)
-}
-
 MUTATOR_HOOKFUNCTION(cts, FixClientCvars)
 {
        entity player = M_ARGV(0, entity);
index f06df370d0668bb271f5ad1b43e15ec6c30ea387..04221792865b6f837939a40b1d76093016578fee 100644 (file)
@@ -357,11 +357,6 @@ MUTATOR_HOOKFUNCTION(rc, GetRecords)
        M_ARGV(1, string) = ret_string;
 }
 
-MUTATOR_HOOKFUNCTION(rc, HideTeamNagger)
-{
-       return true; // doesn't work so well
-}
-
 MUTATOR_HOOKFUNCTION(rc, FixClientCvars)
 {
        entity player = M_ARGV(0, entity);
index 0d804177bcf08a4055f41008f790e0e825879f27..e41cd9d4d3f67dee221eba53cfbaf9e199d96ed6 100644 (file)
@@ -141,7 +141,6 @@ bool ClientData_Send(entity this, entity to, int sf)
        if (autocvar_sv_showspectators == 1 || (autocvar_sv_showspectators && IS_SPEC(to)))
                                        sf |= BIT(4); // show spectators
        if (autocvar_sv_teamnagger && teamplay && !(autocvar_bot_vs_human && AVAILABLE_TEAMS == 2))
-               if (!MUTATOR_CALLHOOK(HideTeamNagger, this)) // enable teamnagger
                                                  sf |= (autocvar_sv_teamnagger & 0x03) << 5; // BIT(5) | BIT(6)
 
        WriteHeader(MSG_ENTITY, ENT_CLIENT_CLIENTDATA);
index 57e1f89909726f75705f43ea27b98be93effc6fd..0d0598a41fea9326b5bfd354ea5038cefae43c30 100644 (file)
@@ -552,7 +552,7 @@ void ReadyCount()
        // This allows warmup to end with zero players to prevent complaints
        // of server never changing map with legacy config (sv_autopause 0).
        bool badteams = (teamplay && total_players && autocvar_sv_teamnagger)
-               ? !MUTATOR_CALLHOOK(HideTeamNagger, NULL) && TeamBalance_SizeDifference(NULL) >= autocvar_sv_teamnagger
+               ? TeamBalance_SizeDifference(NULL) >= autocvar_sv_teamnagger
                : false;
 
        if (total_players < minplayers || badteams)
index 533484d0b0462d0e1e675d757c49de56b357b35b..34155a4d3c908335832d2f245073f92bebe033b8 100644 (file)
@@ -1190,12 +1190,6 @@ enum {
     MUT_FUSREAC_TARG_INVALID // return this flag to make the function return false (invalid target)
 };
 
-/** return true to hide the 'teamnumbers are imbalanced' message */
-#define EV_HideTeamNagger(i, o) \
-    /** player */ i(entity, MUTATOR_ARGV_0_entity) \
-    /**/
-MUTATOR_HOOKABLE(HideTeamNagger, EV_HideTeamNagger);
-
 /** return true to show a waypoint while the item is spawning */
 #define EV_Item_ScheduleRespawn(i, o) \
     /** item */             i(entity, MUTATOR_ARGV_0_entity) \