From: MirceaKitsune Date: Tue, 2 Aug 2011 17:24:13 +0000 (+0300) Subject: Allow cvars to toggle each helper X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ff81ca08e487c9e306b0b9080bbd126c2870685e;p=voretournament%2Fvoretournament.git Allow cvars to toggle each helper --- diff --git a/data/qcsrc/client/View.qc b/data/qcsrc/client/View.qc index f6ef25a0..0927a5a1 100644 --- a/data/qcsrc/client/View.qc +++ b/data/qcsrc/client/View.qc @@ -307,13 +307,14 @@ void CSQC_UpdateView(float w, float h) // Otherwise, if you don't have any start armor for instance, the helper will complain about low armor when we spawn. helper_health = TRUE; helper_armor = TRUE; + helper_ammo = TRUE; } else if(helper_pause <= time) { // health helper if(getstati(STAT_HEALTH) <= cvar("cl_helper_item_health")) { - if(!helper_health) + if(cvar("cl_helper_item_health") && !helper_health) { sound(self, CHAN_VOICE, strcat("helper/", cvar_string("cl_helper_voice"), "/health.wav"), VOL_BASEVOICE, ATTN_NONE); helper_health = TRUE; @@ -327,7 +328,7 @@ void CSQC_UpdateView(float w, float h) // armor helper if(getstati(STAT_ARMOR) <= cvar("cl_helper_item_armor")) { - if(!helper_armor) + if(cvar("cl_helper_item_armor") && !helper_armor) { sound(self, CHAN_VOICE, strcat("helper/", cvar_string("cl_helper_voice"), "/armor.wav"), VOL_BASEVOICE, ATTN_NONE); helper_armor = TRUE; @@ -340,7 +341,7 @@ void CSQC_UpdateView(float w, float h) // ammo helper if(getstati(STAT_FUEL) <= cvar("cl_helper_item_ammo_fuel")) { - if(!helper_ammo) + if(cvar("cl_helper_item_ammo_fuel") && !helper_ammo) { sound(self, CHAN_VOICE, strcat("helper/", cvar_string("cl_helper_voice"), "/ammo.wav"), VOL_BASEVOICE, ATTN_NONE); helper_ammo = TRUE; @@ -353,7 +354,7 @@ void CSQC_UpdateView(float w, float h) // speed helper if(vlen(pmove_vel) >= cvar("cl_helper_item_speed")) { - if(!helper_speed) + if(cvar("cl_helper_item_speed") && !helper_speed) { sound(self, CHAN_VOICE, strcat("helper/", cvar_string("cl_helper_voice"), "/speed.wav"), VOL_BASEVOICE, ATTN_NONE); helper_speed = TRUE; @@ -366,7 +367,7 @@ void CSQC_UpdateView(float w, float h) // stomach load helper if(getstati(STAT_VORE_LOAD) / getstati(STAT_VORE_MAXLOAD) >= cvar("cl_helper_item_stomachload")) { - if(!helper_stomachload) + if(cvar("cl_helper_item_stomachload") && !helper_stomachload) { sound(self, CHAN_VOICE, strcat("helper/", cvar_string("cl_helper_voice"), "/stomachload.wav"), VOL_BASEVOICE, ATTN_NONE); helper_stomachload = TRUE;