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

index d0c83f28ca117e3672f061602601b2962dd7d460..9af077ee790d4f9918b62f9e061430182fe7adf8 100644 (file)
@@ -680,6 +680,7 @@ seta cl_helper_pause 2 "number of seconds that must pass before the helper syste
 seta cl_helper_health_value 25 "the helper will warn you when going below this amount of health"\r
 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
 \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 0b4bde252bca64ef8fed06d5c38dbb8911c567b0..d1bc5ce4d60ad521c9a882e30ba2f233c7bf5417 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;\r
+float helper_pause, helper_health, helper_armor, helper_ammo, helper_speed;\r
 vector myhealth_gentlergb;\r
 vector liquidcolor_prev;\r
 vector damage_blurpostprocess, content_blurpostprocess;\r
@@ -349,6 +349,19 @@ void CSQC_UpdateView(float w, float h)
                        }\r
                        else if(helper_ammo)\r
                                helper_ammo = FALSE;\r
+\r
+                       // speed helper\r
+                       if(vlen(pmove_vel) >= cvar("cl_helper_speed_value"))\r
+                       {\r
+                               if(!helper_speed)\r
+                               {\r
+                                       sound(self, CHAN_VOICE, strcat("helper/", cvar_string("cl_helper_voice"), "/speed_fast.wav"), VOL_BASEVOICE, ATTN_NONE);\r
+                                       helper_speed = TRUE;\r
+                                       helper_pause = time + cvar("cl_helper_pause");\r
+                               }\r
+                       }\r
+                       else if(helper_speed)\r
+                               helper_speed = FALSE;\r
                }\r
        }\r
 \r
index 39fc32f844090a4a0bfe0ff68961d9adcb9c28a1..33d61d61f4ef960e9c58454f5e8a9f17e83c2eea 100644 (file)
@@ -184,6 +184,7 @@ void Announcer_Precache () {
        precache_sound (strcat("helper/", cvar_string("cl_helper_voice"), "/health_low.wav"));\r
        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
 }\r
 \r
 void AuditLists()\r
diff --git a/data/sound/helper/default/speed_fast.wav b/data/sound/helper/default/speed_fast.wav
new file mode 100644 (file)
index 0000000..27e1218
Binary files /dev/null and b/data/sound/helper/default/speed_fast.wav differ