From: Rudolf Polzer Date: Sat, 4 Dec 2010 15:23:38 +0000 (+0100) Subject: Merge remote branch 'origin/fruitiex/glowmodreset' X-Git-Tag: xonotic-v0.1.0preview~65^2~5 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=16496d2a82fba46621a4096a9de394ef400c0b1e;p=xonotic%2Fxonotic-data.pk3dir.git Merge remote branch 'origin/fruitiex/glowmodreset' Conflicts: qcsrc/server/w_nex.qc --- 16496d2a82fba46621a4096a9de394ef400c0b1e diff --cc qcsrc/server/w_nex.qc index 3a8840f0a,7d5b76920..d3b768fef --- a/qcsrc/server/w_nex.qc +++ b/qcsrc/server/w_nex.qc @@@ -91,32 -91,29 +91,29 @@@ float w_nex(float req } else if (req == WR_THINK) { - if(cvar("g_balance_nex_charge") && self.nex_charge < cvar("g_balance_nex_charge_limit")) - self.nex_charge = min(1, self.nex_charge + cvar("g_balance_nex_charge_rate") * frametime / W_TICSPERFRAME); + if(autocvar_g_balance_nex_charge && self.nex_charge < autocvar_g_balance_nex_charge_limit) + self.nex_charge = min(1, self.nex_charge + autocvar_g_balance_nex_charge_rate * frametime / W_TICSPERFRAME); - if(cvar("g_balance_nex_charge")) + if(autocvar_g_balance_nex_charge) { - self.weaponentity.weaponentity.glowmod = '0 0 0'; // reset - - self.weaponentity.weaponentity.glowmod_x = cvar("g_weapon_charge_colormod_hdrmultiplier") * cvar("g_weapon_charge_colormod_red_half") * bound(0, self.nex_charge / cvar("g_balance_nex_charge_limit"), 1); - self.weaponentity.weaponentity.glowmod_y = cvar("g_weapon_charge_colormod_hdrmultiplier") * cvar("g_weapon_charge_colormod_green_half") * bound(0, self.nex_charge / cvar("g_balance_nex_charge_limit"), 1); - self.weaponentity.weaponentity.glowmod_z = cvar("g_weapon_charge_colormod_hdrmultiplier") * cvar("g_weapon_charge_colormod_blue_half") * bound(0, self.nex_charge / cvar("g_balance_nex_charge_limit"), 1); + self.weaponentity.weaponentity.glowmod_x = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_half * bound(0, self.weaponentity.weaponentity.glowmod_y + self.nex_charge / autocvar_g_balance_nex_charge_limit, 1); + self.weaponentity.weaponentity.glowmod_y = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_half * bound(0, self.weaponentity.weaponentity.glowmod_y + self.nex_charge / autocvar_g_balance_nex_charge_limit, 1); + self.weaponentity.weaponentity.glowmod_z = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_blue_half * bound(0, self.weaponentity.weaponentity.glowmod_z + self.nex_charge / autocvar_g_balance_nex_charge_limit, 1); - if(self.nex_charge > cvar("g_balance_nex_charge_limit")) + if(self.nex_charge > autocvar_g_balance_nex_charge_limit) { - self.weaponentity.weaponentity.glowmod_x = self.weaponentity.weaponentity.glowmod_x + cvar("g_weapon_charge_colormod_hdrmultiplier") * cvar("g_weapon_charge_colormod_red_full") * (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 + cvar("g_weapon_charge_colormod_hdrmultiplier") * cvar("g_weapon_charge_colormod_green_full") * (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 + cvar("g_weapon_charge_colormod_hdrmultiplier") * cvar("g_weapon_charge_colormod_blue_full") * (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 + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_full * (self.nex_charge - autocvar_g_balance_nex_charge_limit) / (1 - autocvar_g_balance_nex_charge_limit); + self.weaponentity.weaponentity.glowmod_y = self.weaponentity.weaponentity.glowmod_y + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_full * (self.nex_charge - autocvar_g_balance_nex_charge_limit) / (1 - autocvar_g_balance_nex_charge_limit); + self.weaponentity.weaponentity.glowmod_z = self.weaponentity.weaponentity.glowmod_z + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_blue_full * (self.nex_charge - autocvar_g_balance_nex_charge_limit) / (1 - autocvar_g_balance_nex_charge_limit); } - self.exteriorweaponentity.glowmod = self.weaponentity.weaponentity.glowmod; } - if(cvar("g_balance_nex_secondary_charge_pool")) - if(self.nex_charge_pool_ammo < 1) + if(autocvar_g_balance_nex_secondary_chargepool) + if(self.nex_chargepool_ammo < 1) { - if(self.nex_charge_pool_pauseregen_finished < time) - self.nex_charge_pool_ammo = min(1, self.nex_charge_pool_ammo + cvar("g_balance_nex_secondary_charge_pool_regen") * frametime / W_TICSPERFRAME); - self.pauseregen_finished = max(self.pauseregen_finished, time + cvar("g_balance_nex_secondary_charge_pool_pause_health_regen")); + if(self.nex_chargepool_pauseregen_finished < time) + self.nex_chargepool_ammo = min(1, self.nex_chargepool_ammo + autocvar_g_balance_nex_secondary_chargepool_regen * frametime / W_TICSPERFRAME); + self.pauseregen_finished = max(self.pauseregen_finished, time + autocvar_g_balance_nex_secondary_chargepool_pause_health_regen); } if (self.BUTTON_ATCK)