From: FruitieX Date: Thu, 2 Dec 2010 19:49:20 +0000 (+0200) Subject: tweak the glow X-Git-Tag: xonotic-v0.1.0preview~76^2~3 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0d48c750ad8740fddaf0d239d2da6c59955e521c;p=xonotic%2Fxonotic-data.pk3dir.git tweak the glow --- diff --git a/qcsrc/server/w_nex.qc b/qcsrc/server/w_nex.qc index 5b1943b5d..4401abfa8 100644 --- a/qcsrc/server/w_nex.qc +++ b/qcsrc/server/w_nex.qc @@ -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")) diff --git a/textures/nexgun.tga b/textures/nexgun.tga index 240695f03..09fb1b224 100644 Binary files a/textures/nexgun.tga and b/textures/nexgun.tga differ diff --git a/textures/nexgun_glow.tga b/textures/nexgun_glow.tga index c58c009cb..e3befff73 100644 Binary files a/textures/nexgun_glow.tga and b/textures/nexgun_glow.tga differ