From: MirceaKitsune Date: Tue, 2 Aug 2011 16:39:33 +0000 (+0300) Subject: Stomach load helper X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a06bd3915536e8f00cb0011255a676c93b43abad;p=voretournament%2Fvoretournament.git Stomach load helper --- diff --git a/data/defaultVT.cfg b/data/defaultVT.cfg index 9af077ee..0ecc71ba 100644 --- a/data/defaultVT.cfg +++ b/data/defaultVT.cfg @@ -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" seta cl_helper_ammo_fuel 25 "the helper will warn you when going below this amount of ammo" seta cl_helper_speed_value 1000 "the helper will warn you when going faster than this speed" +seta cl_helper_stomachload_value 0.75 "the helper will warn you when your stomach is dangerously loaded by this amount" seta cl_eventchase_death 1 "camera goes into 3rd person mode when the player is dead" seta cl_eventchase_distance 140 "final camera distance" diff --git a/data/qcsrc/client/View.qc b/data/qcsrc/client/View.qc index d1bc5ce4..01f15297 100644 --- a/data/qcsrc/client/View.qc +++ b/data/qcsrc/client/View.qc @@ -258,7 +258,7 @@ float stomachsplash_alpha; float volume_modify_1, volume_modify_2, volume_modify_default_1, volume_modify_default_2; float volume_modify_changed_1, volume_modify_changed_2; float eventchase_current_distance; -float helper_pause, helper_health, helper_armor, helper_ammo, helper_speed; +float helper_pause, helper_health, helper_armor, helper_ammo, helper_speed, helper_stomachload; vector myhealth_gentlergb; vector liquidcolor_prev; vector damage_blurpostprocess, content_blurpostprocess; @@ -362,6 +362,19 @@ void CSQC_UpdateView(float w, float h) } else if(helper_speed) helper_speed = FALSE; + + // stomach load helper + if(getstati(STAT_VORE_LOAD) / getstati(STAT_VORE_MAXLOAD) >= cvar("cl_helper_stomachload_value")) + { + if(!helper_stomachload) + { + sound(self, CHAN_VOICE, strcat("helper/", cvar_string("cl_helper_voice"), "/stomach_load.wav"), VOL_BASEVOICE, ATTN_NONE); + helper_stomachload = TRUE; + helper_pause = time + cvar("cl_helper_pause"); + } + } + else if(helper_stomachload) + helper_stomachload = FALSE; } } diff --git a/data/qcsrc/client/miscfunctions.qc b/data/qcsrc/client/miscfunctions.qc index 33d61d61..d0de7e0d 100644 --- a/data/qcsrc/client/miscfunctions.qc +++ b/data/qcsrc/client/miscfunctions.qc @@ -185,6 +185,7 @@ void Announcer_Precache () { precache_sound (strcat("helper/", cvar_string("cl_helper_voice"), "/armor_low.wav")); precache_sound (strcat("helper/", cvar_string("cl_helper_voice"), "/ammo_low.wav")); precache_sound (strcat("helper/", cvar_string("cl_helper_voice"), "/speed_fast.wav")); + precache_sound (strcat("helper/", cvar_string("cl_helper_voice"), "/stomach_load.wav")); } void AuditLists() diff --git a/data/sound/helper/default/stomach_load.wav b/data/sound/helper/default/stomach_load.wav new file mode 100644 index 00000000..c21ff7fd Binary files /dev/null and b/data/sound/helper/default/stomach_load.wav differ