]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make orb visible from the inside, also show a tint to teammates who enter it
authorMario <mario@smbclan.net>
Sun, 12 Jun 2016 18:01:16 +0000 (04:01 +1000)
committerMario <mario@smbclan.net>
Sun, 12 Jun 2016 18:01:16 +0000 (04:01 +1000)
qcsrc/common/mutators/mutator/nades/nades.qc
scripts/nades.shader

index 22b80aa331d56f403cc74f4132c47ec75ebd9970..36ce979aef9b39df0ccea336e07cfed627835cd9 100644 (file)
@@ -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;
        }
 }
 
index 5930e1961c2065424db9ff344f418d2cd954145e..0ed8b42b44d6b031d16065943f59559f5d4266e0 100644 (file)
@@ -1,5 +1,6 @@
 nade_orb
 {
+       cull none
        dpnoshadow
        surfaceparm nolightmap