From c5830cba44748183325aa5337af237c987e15a89 Mon Sep 17 00:00:00 2001 From: Des Date: Tue, 10 Dec 2024 09:29:31 -0300 Subject: [PATCH] DRAFT: cl_hideotherplayers, works but when unset doesn't reset the NO_DRAW effect, so other players reapear after a respawn, not instantly. --- qcsrc/client/csqcmodel_hooks.qc | 4 ++++ qcsrc/client/csqcmodel_hooks.qh | 1 + xonotic-client.cfg | 1 + 3 files changed, 6 insertions(+) diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index 99368d393..b14343156 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -147,6 +147,10 @@ void CSQCPlayer_ModelAppearance_Apply(entity this, bool islocalplayer) if(MUTATOR_CALLHOOK(ForcePlayermodels_Skip, this, islocalplayer)) goto skipforcemodels; + //LOG_INFOF("e: %d, model \"%s\", isplayermodel: %d, ISPLAYER_CLIENT: %d, islocalplayer: %d", this.entnum, this.model, this.isplayermodel, ISPLAYER_CLIENT, islocalplayer); + if (this.isplayermodel && !islocalplayer && autocvar_cl_hideotherplayers) + this.csqcmodel_effects |= EF_NODRAW; + // FORCEMODEL // which one is ALWAYS good? if (!forceplayermodels_goodmodel) diff --git a/qcsrc/client/csqcmodel_hooks.qh b/qcsrc/client/csqcmodel_hooks.qh index d7ccc5213..47b7476e4 100644 --- a/qcsrc/client/csqcmodel_hooks.qh +++ b/qcsrc/client/csqcmodel_hooks.qh @@ -5,6 +5,7 @@ int autocvar_cl_playerdetailreduction; int autocvar_cl_modeldetailreduction; float autocvar_cl_loddistance1 = 768; float autocvar_cl_loddistance2 = 2048; +bool autocvar_cl_hideotherplayers = false; bool autocvar_cl_forceplayermodels; bool autocvar_cl_forceplayercolors; bool autocvar_cl_forceuniqueplayercolors; diff --git a/xonotic-client.cfg b/xonotic-client.cfg index 58c29f8b9..ff1a38038 100644 --- a/xonotic-client.cfg +++ b/xonotic-client.cfg @@ -798,6 +798,7 @@ set cl_accuracy_data_receive 0 "1 receive weapon accuracy data statistics at the set developer_csqcentities 0 "csqc entity spam" +seta cl_hideotherplayers 0 "make everyone else invisible" seta cl_forceplayermodels 0 "make everyone look like your own model (requires server to have sv_defaultcharacter 0)" seta cl_forceplayercolors 0 "make enemies look like your own color (requires server to have sv_defaultcharacter 0); 1: in all game modes without teams (if cl_forceuniqueplayercolors is 0), 2: always, 3: only in Duel, 4: only in game modes with 2 teams, 5: in team games and Duel" seta cl_forceuniqueplayercolors 0 "assign each enemy unique colors in all game modes without teams except duel (requires server to have sv_defaultcharacter 0)" -- 2.39.2