\r
// taunts and voices\r
seta cl_autotaunt 0.75 "automatically taunt enemies when fragging them"\r
+seta cl_autotaunt_repeat 5 "how many seconds to attempt playing repeatable taunts"\r
seta sv_taunt 1 "allow taunts on the server"\r
seta sv_autotaunt 1 "allow autotaunts on the server"\r
seta cl_voice_directional 1 "0 = all voices are non-directional, 1 = all voices are directional, 2 = only taunts are directional"\r
if(self.taunt_soundtime)\r
if(time > self.taunt_soundtime)\r
{\r
+ switch(self.taunt_soundtype)\r
+ {\r
+ case TAUNTTYPE_DEATH:\r
+ PlayerSound(self, playersound_taunt, CHAN_VOICE, VOICETYPE_AUTOTAUNT);\r
+ break;\r
+ case TAUNTTYPE_VORE:\r
+ PlayerSound(self, playersound_taunt, CHAN_VOICE, VOICETYPE_AUTOTAUNT); // change this properly\r
+ break;\r
+ default:\r
+ dprint("Incorrect autotaunt type\n");\r
+ break;\r
+ }\r
+\r
self.taunt_soundtime = 0;\r
- PlayerSound(self, playersound_taunt, CHAN_VOICE, VOICETYPE_AUTOTAUNT);\r
+ self.taunt_soundtype = 0;\r
}\r
\r
target_voicescript_next(self);\r
#define VOICETYPE_TAUNT 15\r
#define VOICETYPE_GURGLE 16\r
\r
+#define TAUNTTYPE_DEATH 1\r
+#define TAUNTTYPE_VORE 2\r
+\r
void PrecachePlayerSounds(string f);\r
void PrecacheGlobalSound(string samplestring);\r
void UpdatePlayerSounds();\r
\r
// autotaunt system\r
.float cvar_cl_autotaunt;\r
+.float cvar_cl_autotaunt_repeat;\r
.float cvar_cl_voice_directional;\r
.float cvar_cl_voice_directional_taunt_attenuation;\r
\r
.entity teamkill_soundsource;\r
.entity pusher;\r
.float taunt_soundtime;\r
+.float taunt_soundtype;\r
\r
\r
float IsDifferentTeam(entity a, entity b)\r
centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, victim_message, "^1You were eaten by ^7", a, GetAdvancedDeathReports(attacker)));\r
}\r
attacker.taunt_soundtime = time + 1;\r
+ attacker.taunt_soundtype = TAUNTTYPE_DEATH;\r
}\r
}\r
else\r
centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, victim_message, "^1You were killed by ^7", a, GetAdvancedDeathReports(attacker)));\r
}\r
attacker.taunt_soundtime = time + 1;\r
+ attacker.taunt_soundtype = TAUNTTYPE_DEATH;\r
}\r
}\r
\r
GetCvars_handleString_Fixup(s, f, cvar_cl_weaponpriorities[8], "cl_weaponpriority8", W_FixWeaponOrder_AllowIncomplete);\r
GetCvars_handleString_Fixup(s, f, cvar_cl_weaponpriorities[9], "cl_weaponpriority9", W_FixWeaponOrder_AllowIncomplete);\r
GetCvars_handleFloat(s, f, cvar_cl_autotaunt, "cl_autotaunt");\r
+ GetCvars_handleFloat(s, f, cvar_cl_autotaunt_repeat, "cl_autotaunt_repeat");\r
GetCvars_handleFloat(s, f, cvar_cl_noantilag, "cl_noantilag");\r
GetCvars_handleFloat(s, f, cvar_cl_voice_directional, "cl_voice_directional");\r
GetCvars_handleFloat(s, f, cvar_cl_voice_directional_taunt_attenuation, "cl_voice_directional_taunt_attenuation");\r