From 4372a8fa5a8e7f775f6fdd3ffae5411020fc7d8a Mon Sep 17 00:00:00 2001 From: samual Date: Sun, 8 Nov 2009 18:20:44 +0000 Subject: [PATCH] g_nodepthtestitems -- Allows you to disable depth testing on items using EF_NODEPTHTESTING - just like g_nodepthtestplayers! :P :P :P git-svn-id: svn://svn.icculus.org/nexuiz/trunk@8254 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/defaultNexuiz.cfg | 1 + data/qcsrc/server/t_items.qc | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/data/defaultNexuiz.cfg b/data/defaultNexuiz.cfg index b4f524afc..2b2c1aa39 100644 --- a/data/defaultNexuiz.cfg +++ b/data/defaultNexuiz.cfg @@ -473,6 +473,7 @@ set g_forced_respawn 0 "if set to 1 and a player died, that player gets automati set g_fullbrightplayers 0 "brightens up player models (note that the color, skin or model of the players does not change!)" set g_fullbrightitems 0 "brightens up items" set g_nodepthtestplayers 0 "disables depth testing on players" +set g_nodepthtestitems 0 "disables depth testing on items" set g_casings 2 "specifies which casings (0: none, 1: only shotgun casings, 2: shotgun and machine gun casings) are sent to the client" set g_norecoil 0 "if set to 1 shooting weapons won't make you crosshair to move upwards (recoil)" set g_maplist_mostrecent "" "contains the name of the maps that were most recently played" diff --git a/data/qcsrc/server/t_items.qc b/data/qcsrc/server/t_items.qc index 8c9c3b7ef..1f30ca73b 100644 --- a/data/qcsrc/server/t_items.qc +++ b/data/qcsrc/server/t_items.qc @@ -64,7 +64,7 @@ float Item_Customize() void Item_Show (entity e, float mode) { - e.effects &~= EF_ADDITIVE | EF_STARDUST | EF_FULLBRIGHT; + e.effects &~= EF_ADDITIVE | EF_STARDUST | EF_FULLBRIGHT | EF_NODEPTHTEST; if (mode > 0) { // make the item look normal, and be touchable @@ -124,6 +124,8 @@ void Item_Show (entity e, float mode) if (e.strength_finished || e.invincible_finished) e.effects |= EF_ADDITIVE | EF_FULLBRIGHT; + if (cvar("g_nodepthtestitems")) + e.effects |= EF_NODEPTHTEST; if (cvar("g_fullbrightitems")) e.effects |= EF_FULLBRIGHT; -- 2.39.2