\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_vore_autotaunt_repeat 5 "how many seconds to attempt playing voew 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
}\r
\r
self.taunt_soundtime = 0;\r
- self.taunt_soundtimefiltered = FALSE;\r
self.taunt_soundtype = 0;\r
}\r
\r
LoadPlayerSounds(strcat(self.model, ".sounds"), 0);\r
}\r
\r
-.float soundtimefilter;\r
-.entity soundownerfilter;\r
void GlobalSound(string sample, float chan, float voicetype)\r
{\r
float n;\r
tauntrand = random();\r
FOR_EACH_REALCLIENT(msg_entity)\r
{\r
- msg_entity.soundownerfilter = self;\r
if (tauntrand < msg_entity.cvar_cl_autotaunt)\r
- if not (self.taunt_soundtimefiltered && msg_entity.soundownerfilter.soundtimefilter > time)\r
+ if (msg_entity.cvar_cl_voice_directional >= 1)\r
{\r
- if (msg_entity.cvar_cl_voice_directional >= 1)\r
- {\r
- if(self.predator.classname == "player")\r
- soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE * bound(0, cvar("g_vore_soundocclusion"), 1), bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX));\r
- else\r
- soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX));\r
- }\r
+ if(self.predator.classname == "player")\r
+ soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE * bound(0, cvar("g_vore_soundocclusion"), 1), bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX));\r
else\r
- soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);\r
-\r
- if(self.taunt_soundtimefiltered)\r
- msg_entity.soundownerfilter.soundtimefilter = time + msg_entity.cvar_cl_autotaunt_repeat;\r
+ soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX));\r
}\r
+ else\r
+ soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);\r
}\r
break;\r
case VOICETYPE_TAUNT:\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 pusher;\r
\r
.float taunt_soundtime;\r
-.float taunt_soundtimefiltered;\r
.float taunt_soundtype;\r
\r
-void SetAutoTaunt(entity e, float t_soundtime, float t_soundtimefiltered, float soundtype)\r
+void SetAutoTaunt(entity e, float t_soundtime, float soundtype)\r
{\r
e.taunt_soundtime = t_soundtime;\r
- e.taunt_soundtimefiltered = t_soundtimefiltered;\r
e.taunt_soundtype = soundtype;\r
}\r
\r
centerprint(attacker, strcat(DAMAGE_CENTERPRINT_SPACER, blood_message, "^4You ate ^7", s, GetAdvancedDeathReports(targ)));\r
centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, victim_message, "^1You were eaten by ^7", a, GetAdvancedDeathReports(attacker)));\r
}\r
- SetAutoTaunt(attacker, time + 1, FALSE, TAUNTTYPE_DEATH);\r
+ SetAutoTaunt(attacker, time + 1, TAUNTTYPE_DEATH);\r
}\r
}\r
else\r
centerprint(attacker, strcat(DAMAGE_CENTERPRINT_SPACER, blood_message, "^4You killed ^7", s, GetAdvancedDeathReports(targ)));\r
centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, victim_message, "^1You were killed by ^7", a, GetAdvancedDeathReports(attacker)));\r
}\r
- SetAutoTaunt(attacker, time + 1, FALSE, TAUNTTYPE_DEATH);\r
+ SetAutoTaunt(attacker, time + 1, 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
if(self.stomach_load && !Stomach_TeamMates_check(self))\r
{\r
if(!self.taunt_soundtime)\r
- SetAutoTaunt(self, time, TRUE, TAUNTTYPE_VOREPRED);\r
+ SetAutoTaunt(self, time + cvar("sv_vore_autotaunt_repeat"), TAUNTTYPE_VOREPRED);\r
}\r
else if(self.taunt_soundtype == TAUNTTYPE_VOREPRED)\r
{\r
// we have a predator taunt scheduled, but are no longer a (suitable) predator, so remove it\r
- SetAutoTaunt(self, 0, FALSE, 0);\r
+ SetAutoTaunt(self, 0, 0);\r
}\r
}\r
else\r
if(self.predator.classname == "player" && !(teams_matter && self.team == self.predator.team))\r
{\r
if(!self.taunt_soundtime)\r
- SetAutoTaunt(self, time, TRUE, TAUNTTYPE_VOREPREY);\r
+ SetAutoTaunt(self, time + cvar("sv_vore_autotaunt_repeat"), TAUNTTYPE_VOREPREY);\r
}\r
else if(self.taunt_soundtype == TAUNTTYPE_VOREPREY)\r
{\r
// we have a prey taunt scheduled, but are no longer a (suitable) prey, so remove it\r
- SetAutoTaunt(self, 0, FALSE, 0);\r
+ SetAutoTaunt(self, 0, 0);\r
}\r
}\r
}\r