From a6dd40b852961f1acd4b9026c96618182909d26d Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 13 Jun 2016 04:01:16 +1000 Subject: [PATCH] Make orb visible from the inside, also show a tint to teammates who enter it --- qcsrc/common/mutators/mutator/nades/nades.qc | 16 ++++++++++------ scripts/nades.shader | 1 + 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/qcsrc/common/mutators/mutator/nades/nades.qc b/qcsrc/common/mutators/mutator/nades/nades.qc index 22b80aa33..36ce979ae 100644 --- a/qcsrc/common/mutators/mutator/nades/nades.qc +++ b/qcsrc/common/mutators/mutator/nades/nades.qc @@ -581,13 +581,17 @@ void nade_entrap_touch(entity this) #elif defined(CSQC) other.move_velocity = other.move_velocity * pow(autocvar_g_nades_entrap_strength, pushdeltatime); #endif + } - if ( IS_REAL_CLIENT(other) || IS_VEHICLE(other) ) - { - entity show_tint = (IS_VEHICLE(other)) ? other.owner : other; - STAT(ENTRAP_ORB, show_tint) = time + 0.1; - STAT(ENTRAP_ORB_ALPHA, show_tint) = 0.75 * (this.ltime - time) / this.orb_lifetime; - } + if ( IS_REAL_CLIENT(other) || IS_VEHICLE(other) ) + { + entity show_tint = (IS_VEHICLE(other)) ? other.owner : other; + STAT(ENTRAP_ORB, show_tint) = time + 0.1; + + float tint_alpha = 0.75; + if(SAME_TEAM(other, this.realowner)) + tint_alpha = 0.45; + STAT(ENTRAP_ORB_ALPHA, show_tint) = tint_alpha * (this.ltime - time) / this.orb_lifetime; } } diff --git a/scripts/nades.shader b/scripts/nades.shader index 5930e1961..0ed8b42b4 100644 --- a/scripts/nades.shader +++ b/scripts/nades.shader @@ -1,5 +1,6 @@ nade_orb { + cull none dpnoshadow surfaceparm nolightmap -- 2.39.2