]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
tweak the glow
authorFruitieX <fruitiex@gmail.com>
Thu, 2 Dec 2010 19:49:20 +0000 (21:49 +0200)
committerFruitieX <fruitiex@gmail.com>
Thu, 2 Dec 2010 19:49:20 +0000 (21:49 +0200)
qcsrc/server/w_nex.qc
textures/nexgun.tga
textures/nexgun_glow.tga

index 5b1943b5da68fceecf92850e0a614ccd04ea70de..4401abfa84f9446051137a5faefc5c4cdc3e2fd1 100644 (file)
@@ -96,13 +96,18 @@ float w_nex(float req)
 
         if(cvar("g_balance_nex_charge"))
         {
-            self.weaponentity.weaponentity.glowmod = '1 1 1' * self.nex_charge;
-            self.exteriorweaponentity.glowmod = '1 1 1' * self.nex_charge;
+            self.weaponentity.weaponentity.glowmod = '0 0 0'; // reset
+
+            self.weaponentity.weaponentity.glowmod_y = 0.5 * bound(0, self.weaponentity.weaponentity.glowmod_y + self.nex_charge / cvar("g_balance_nex_charge_limit"), 1);
+            self.weaponentity.weaponentity.glowmod_z = bound(0, self.weaponentity.weaponentity.glowmod_z + self.nex_charge / cvar("g_balance_nex_charge_limit"), 1);
+
             if(self.nex_charge > cvar("g_balance_nex_charge_limit"))
             {
-                self.weaponentity.weaponentity.glowmod_y -= 0.5 * (self.nex_charge - cvar("g_balance_nex_charge_limit")) / (1 - cvar("g_balance_nex_charge_limit"));
-                self.weaponentity.weaponentity.glowmod_z -= 0.5 * (self.nex_charge - cvar("g_balance_nex_charge_limit")) / (1 - cvar("g_balance_nex_charge_limit"));
+                self.weaponentity.weaponentity.glowmod_x = self.weaponentity.weaponentity.glowmod_x + (self.nex_charge - cvar("g_balance_nex_charge_limit")) / (1 - cvar("g_balance_nex_charge_limit"));
+                self.weaponentity.weaponentity.glowmod_y = self.weaponentity.weaponentity.glowmod_y - 0.5 * (self.nex_charge - cvar("g_balance_nex_charge_limit")) / (1 - cvar("g_balance_nex_charge_limit"));
+                self.weaponentity.weaponentity.glowmod_z = self.weaponentity.weaponentity.glowmod_z - (self.nex_charge - cvar("g_balance_nex_charge_limit")) / (1 - cvar("g_balance_nex_charge_limit"));
             }
+            self.exteriorweaponentity.glowmod = self.weaponentity.weaponentity.glowmod;
         }
 
                if(cvar("g_balance_nex_secondary_charge_pool"))
index 240695f03c7f0b2aede35eb56e8c5cca54d2a6c4..09fb1b224ace0529a9b159baa63341aabdd7a8d8 100644 (file)
Binary files a/textures/nexgun.tga and b/textures/nexgun.tga differ
index c58c009cb814567d8fa656342392b0d4ccea1ba9..e3befff7394c3ff2026092e11f8ff01f3647572e 100644 (file)
Binary files a/textures/nexgun_glow.tga and b/textures/nexgun_glow.tga differ