PlayerSound(self, playersound_taunt, CHAN_VOICE, VOICETYPE_AUTOTAUNT);\r
break;\r
case TAUNTTYPE_VOREPRED:\r
- PlayerSound(self, playersound_pred, CHAN_VOICE, VOICETYPE_AUTOTAUNT); // change this properly\r
+ PlayerSound(self, playersound_pred, CHAN_VOICE, VOICETYPE_AUTOTAUNT);\r
break;\r
case TAUNTTYPE_VOREPREY:\r
- PlayerSound(self, playersound_prey, CHAN_VOICE, VOICETYPE_AUTOTAUNT); // change this properly\r
+ PlayerSound(self, playersound_prey, CHAN_VOICE, VOICETYPE_AUTOTAUNT);\r
break;\r
default:\r
dprint("Incorrect autotaunt type\n");\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
void GlobalSound(string sample, float chan, float voicetype)\r
{\r
float n;\r
tauntrand = random();\r
FOR_EACH_REALCLIENT(msg_entity)\r
if (tauntrand < msg_entity.cvar_cl_autotaunt)\r
+ if not (self.taunt_soundtimefiltered && msg_entity.soundtimefilter > time)\r
{\r
if (msg_entity.cvar_cl_voice_directional >= 1)\r
{\r
}\r
else\r
soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);\r
+\r
+ if(self.taunt_soundtimefiltered)\r
+ msg_entity.soundtimefilter = time + msg_entity.cvar_cl_autotaunt_repeat;\r
}\r
break;\r
case VOICETYPE_TAUNT:\r
.float teamkill_soundtime;\r
.entity teamkill_soundsource;\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
+{\r
+ e.taunt_soundtime = t_soundtime;\r
+ e.taunt_soundtimefiltered = t_soundtimefiltered;\r
+ e.taunt_soundtype = soundtype;\r
+}\r
\r
float IsDifferentTeam(entity a, entity b)\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
- attacker.taunt_soundtime = time + 1;\r
- attacker.taunt_soundtype = TAUNTTYPE_DEATH;\r
+ SetAutoTaunt(attacker, time + 1, FALSE, 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
- attacker.taunt_soundtime = time + 1;\r
- attacker.taunt_soundtype = TAUNTTYPE_DEATH;\r
+ SetAutoTaunt(attacker, time + 1, FALSE, TAUNTTYPE_DEATH);\r
}\r
}\r
\r
}\r
}\r
\r
+void Vore_AutoTaunt()\r
+{\r
+ // triggers ambient vore taunts, for both pred and prey\r
+\r
+ // predator taunts\r
+ if(self.stomach_load)\r
+ {\r
+ // taunt_soundtime is set to 0 after the taunt has played, so this indicates a new start\r
+ if(!self.taunt_soundtime)\r
+ {\r
+ SetAutoTaunt(self, time, TRUE, TAUNTTYPE_VOREPRED);\r
+ }\r
+ }\r
+ else if(self.taunt_soundtype == TAUNTTYPE_VOREPRED)\r
+ {\r
+ // we have a predator taunt scheduled, but we're no longer a predator, so remove it\r
+ SetAutoTaunt(self, 0, FALSE, 0);\r
+ }\r
+}\r
+\r
void Vore()\r
{\r
// main vore code, this is where it all happens\r
return;\r
}\r
\r
+ Vore_AutoTaunt();\r
+\r
// wash the goo away from players once they leave the stomach\r
if(self.predator.classname != "player")\r
if(stov(cvar_string("g_vore_regurgitatecolor_release")))\r