]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Stomach load helper
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 2 Aug 2011 16:39:33 +0000 (19:39 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 2 Aug 2011 16:39:33 +0000 (19:39 +0300)
data/defaultVT.cfg
data/qcsrc/client/View.qc
data/qcsrc/client/miscfunctions.qc
data/sound/helper/default/stomach_load.wav [new file with mode: 0644]

index 9af077ee790d4f9918b62f9e061430182fe7adf8..0ecc71ba76c0ac474e09b9c234255594009830c7 100644 (file)
@@ -681,6 +681,7 @@ seta cl_helper_health_value 25 "the helper will warn you when going below this a
 seta cl_helper_armor_value 25 "the helper will warn you when going below this amount of armor"\r
 seta cl_helper_ammo_fuel 25 "the helper will warn you when going below this amount of ammo"\r
 seta cl_helper_speed_value 1000 "the helper will warn you when going faster than this speed"\r
+seta cl_helper_stomachload_value 0.75 "the helper will warn you when your stomach is dangerously loaded by this amount"\r
 \r
 seta cl_eventchase_death 1 "camera goes into 3rd person mode when the player is dead"\r
 seta cl_eventchase_distance 140 "final camera distance"\r
index d1bc5ce4d60ad521c9a882e30ba2f233c7bf5417..01f152979182b259eec23e0bc996b459077b0c53 100644 (file)
@@ -258,7 +258,7 @@ float stomachsplash_alpha;
 float volume_modify_1, volume_modify_2, volume_modify_default_1, volume_modify_default_2;\r
 float volume_modify_changed_1, volume_modify_changed_2;\r
 float eventchase_current_distance;\r
-float helper_pause, helper_health, helper_armor, helper_ammo, helper_speed;\r
+float helper_pause, helper_health, helper_armor, helper_ammo, helper_speed, helper_stomachload;\r
 vector myhealth_gentlergb;\r
 vector liquidcolor_prev;\r
 vector damage_blurpostprocess, content_blurpostprocess;\r
@@ -362,6 +362,19 @@ void CSQC_UpdateView(float w, float h)
                        }\r
                        else if(helper_speed)\r
                                helper_speed = FALSE;\r
+\r
+                       // stomach load helper\r
+                       if(getstati(STAT_VORE_LOAD) / getstati(STAT_VORE_MAXLOAD) >= cvar("cl_helper_stomachload_value"))\r
+                       {\r
+                               if(!helper_stomachload)\r
+                               {\r
+                                       sound(self, CHAN_VOICE, strcat("helper/", cvar_string("cl_helper_voice"), "/stomach_load.wav"), VOL_BASEVOICE, ATTN_NONE);\r
+                                       helper_stomachload = TRUE;\r
+                                       helper_pause = time + cvar("cl_helper_pause");\r
+                               }\r
+                       }\r
+                       else if(helper_stomachload)\r
+                               helper_stomachload = FALSE;\r
                }\r
        }\r
 \r
index 33d61d61f4ef960e9c58454f5e8a9f17e83c2eea..d0de7e0d7b6a7181a4dac955f9d7782b3ac7857a 100644 (file)
@@ -185,6 +185,7 @@ void Announcer_Precache () {
        precache_sound (strcat("helper/", cvar_string("cl_helper_voice"), "/armor_low.wav"));\r
        precache_sound (strcat("helper/", cvar_string("cl_helper_voice"), "/ammo_low.wav"));\r
        precache_sound (strcat("helper/", cvar_string("cl_helper_voice"), "/speed_fast.wav"));\r
+       precache_sound (strcat("helper/", cvar_string("cl_helper_voice"), "/stomach_load.wav"));\r
 }\r
 \r
 void AuditLists()\r
diff --git a/data/sound/helper/default/stomach_load.wav b/data/sound/helper/default/stomach_load.wav
new file mode 100644 (file)
index 0000000..c21ff7f
Binary files /dev/null and b/data/sound/helper/default/stomach_load.wav differ