]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Allow cvars to toggle each helper
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 2 Aug 2011 17:24:13 +0000 (20:24 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 2 Aug 2011 17:24:13 +0000 (20:24 +0300)
data/qcsrc/client/View.qc

index f6ef25a0bc8129b2d1d58f736837c8701c73462b..0927a5a11f4683fa5fd362fcb9669d23be1e3eee 100644 (file)
@@ -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.\r
                        helper_health = TRUE;\r
                        helper_armor = TRUE;\r
+                       helper_ammo = TRUE;\r
                }\r
                else if(helper_pause <= time)\r
                {\r
                        // health helper\r
                        if(getstati(STAT_HEALTH) <= cvar("cl_helper_item_health"))\r
                        {\r
-                               if(!helper_health)\r
+                               if(cvar("cl_helper_item_health") && !helper_health)\r
                                {\r
                                        sound(self, CHAN_VOICE, strcat("helper/", cvar_string("cl_helper_voice"), "/health.wav"), VOL_BASEVOICE, ATTN_NONE);\r
                                        helper_health = TRUE;\r
@@ -327,7 +328,7 @@ void CSQC_UpdateView(float w, float h)
                        // armor helper\r
                        if(getstati(STAT_ARMOR) <= cvar("cl_helper_item_armor"))\r
                        {\r
-                               if(!helper_armor)\r
+                               if(cvar("cl_helper_item_armor") && !helper_armor)\r
                                {\r
                                        sound(self, CHAN_VOICE, strcat("helper/", cvar_string("cl_helper_voice"), "/armor.wav"), VOL_BASEVOICE, ATTN_NONE);\r
                                        helper_armor = TRUE;\r
@@ -340,7 +341,7 @@ void CSQC_UpdateView(float w, float h)
                        // ammo helper\r
                        if(getstati(STAT_FUEL) <= cvar("cl_helper_item_ammo_fuel"))\r
                        {\r
-                               if(!helper_ammo)\r
+                               if(cvar("cl_helper_item_ammo_fuel") && !helper_ammo)\r
                                {\r
                                        sound(self, CHAN_VOICE, strcat("helper/", cvar_string("cl_helper_voice"), "/ammo.wav"), VOL_BASEVOICE, ATTN_NONE);\r
                                        helper_ammo = TRUE;\r
@@ -353,7 +354,7 @@ void CSQC_UpdateView(float w, float h)
                        // speed helper\r
                        if(vlen(pmove_vel) >= cvar("cl_helper_item_speed"))\r
                        {\r
-                               if(!helper_speed)\r
+                               if(cvar("cl_helper_item_speed") && !helper_speed)\r
                                {\r
                                        sound(self, CHAN_VOICE, strcat("helper/", cvar_string("cl_helper_voice"), "/speed.wav"), VOL_BASEVOICE, ATTN_NONE);\r
                                        helper_speed = TRUE;\r
@@ -366,7 +367,7 @@ void CSQC_UpdateView(float w, float h)
                        // stomach load helper\r
                        if(getstati(STAT_VORE_LOAD) / getstati(STAT_VORE_MAXLOAD) >= cvar("cl_helper_item_stomachload"))\r
                        {\r
-                               if(!helper_stomachload)\r
+                               if(cvar("cl_helper_item_stomachload") && !helper_stomachload)\r
                                {\r
                                        sound(self, CHAN_VOICE, strcat("helper/", cvar_string("cl_helper_voice"), "/stomachload.wav"), VOL_BASEVOICE, ATTN_NONE);\r
                                        helper_stomachload = TRUE;\r