\r
void player_setupanimsformodel()\r
{\r
+ // if this is the stomach model (or any model that can't be animated), don't attempt to animate\r
+ if(substring(self.model, strlen(self.model) - 3, 3) == "md3") // check model extension\r
+ return;\r
+\r
local string animfilename;\r
local float animfile;\r
// defaults for legacy .zym models without animinfo files\r
\r
void player_anim (void)\r
{\r
+ // if this is the stomach model (or any model that can't be animated), don't attempt to animate\r
+ if(substring(self.model, strlen(self.model) - 3, 3) == "md3") // check model extension\r
+ return;\r
+\r
updateanim(self);\r
if (self.weaponentity)\r
updateanim(self.weaponentity);\r
setanim(self.weaponentity, self.weaponentity.anim_idle, TRUE, FALSE, FALSE);\r
}\r
\r
-void SpawnThrownWeapon (vector org, float w)\r
+void SpawnThrownWeapon (vector org, float w, float doreduce)\r
{\r
- W_ThrowWeapon(randomvec() * 125 + '0 0 200', org - self.origin, FALSE);\r
+ W_ThrowWeapon(randomvec() * 125 + '0 0 200', org - self.origin, doreduce);\r
}\r
\r
void PlayerCorpseDamage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)\r
self.dmg_take = self.dmg_take + take;//max(take - 10, 0);\r
self.dmg_inflictor = inflictor;\r
\r
- if (self.health <= -75 && self.modelindex != 0)\r
+ if (self.health <= -cvar("sv_gibhealth") && self.modelindex != 0)\r
{\r
// don't use any animations as a gib\r
self.frame = 0;\r
// clear selected player display\r
ClearSelectedPlayer();\r
// throw a weapon\r
- SpawnThrownWeapon (self.origin + (self.mins + self.maxs) * 0.5, self.switchweapon);\r
+ SpawnThrownWeapon (self.origin + (self.mins + self.maxs) * 0.5, self.switchweapon, FALSE);\r
// print an obituary message\r
Obituary (attacker, inflictor, self, deathtype);\r
race_PreDie();\r
if(!self.dropweapon_check)\r
if(self.predator.team != self.team) // don't disarm team mates when swallowing them\r
if(random() < cvar("g_balance_vore_swallow_dropweapon"))\r
- SpawnThrownWeapon (self.origin + (self.mins + self.maxs) * 0.5, self.switchweapon);\r
+ SpawnThrownWeapon (self.origin + (self.mins + self.maxs) * 0.5, self.switchweapon, TRUE);\r
self.dropweapon_check = TRUE;\r
}\r
else\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
break;\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
- }\r
+ else\r
+ soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);\r
break;\r
case VOICETYPE_TAUNT:\r
if(self.classname == "player")\r