self.lip = oldself.lip;\r
self.colormap = oldself.colormap;\r
self.colormod = oldself.colormod;\r
self.lip = oldself.lip;\r
self.colormap = oldself.colormap;\r
self.colormod = oldself.colormod;\r
self.iscreature = oldself.iscreature;\r
self.angles = oldself.angles;\r
self.avelocity = oldself.avelocity;\r
self.iscreature = oldself.iscreature;\r
self.angles = oldself.angles;\r
self.avelocity = oldself.avelocity;\r
self.solid = oldself.solid;\r
self.takedamage = oldself.takedamage;\r
self.think = oldself.think;\r
self.solid = oldself.solid;\r
self.takedamage = oldself.takedamage;\r
self.think = oldself.think;\r
self.customizeentityforclient = oldself.customizeentityforclient;\r
self.uncustomizeentityforclient = oldself.uncustomizeentityforclient;\r
self.uncustomizeentityforclient_set = oldself.uncustomizeentityforclient_set;\r
self.customizeentityforclient = oldself.customizeentityforclient;\r
self.uncustomizeentityforclient = oldself.uncustomizeentityforclient;\r
self.uncustomizeentityforclient_set = oldself.uncustomizeentityforclient_set;\r
self.anim_backright = '21 1 1';\r
self.anim_backleft = '22 1 1';\r
animparseerror = FALSE;\r
self.anim_backright = '21 1 1';\r
self.anim_backleft = '22 1 1';\r
animparseerror = FALSE;\r
}\r
else\r
dprint("File ", animfilename, " not found, assuming legacy .zym model animation timings\n");\r
}\r
else\r
dprint("File ", animfilename, " not found, assuming legacy .zym model animation timings\n");\r
// reset animstate now\r
setanim(self, self.anim_idle, TRUE, FALSE, TRUE);\r
};\r
// reset animstate now\r
setanim(self, self.anim_idle, TRUE, FALSE, TRUE);\r
};\r
- if (!(self.flags & FL_ONGROUND))\r
+ if(self.stat_eaten)\r
+ {\r
+ if(self.BUTTON_ATCK || self.predator.digesting)\r
+ setanim(self, self.anim_pain2, FALSE, TRUE, FALSE); // looks good for prey attacking the stomach or being digested\r
+ else\r
+ setanim(self, self.anim_jump, FALSE, TRUE, FALSE); // looks good for prey idling inside the stomach\r
+ }\r
+ else if (!(self.flags & FL_ONGROUND))\r
{\r
if (self.crouch)\r
setanim(self, self.anim_duckjump, FALSE, TRUE, self.restart_jump);\r
{\r
if (self.crouch)\r
setanim(self, self.anim_duckjump, FALSE, TRUE, self.restart_jump);\r
setanim(self.weaponentity, self.weaponentity.anim_idle, TRUE, FALSE, FALSE);\r
}\r
\r
setanim(self.weaponentity, self.weaponentity.anim_idle, TRUE, FALSE, FALSE);\r
}\r
\r
}\r
\r
void PlayerCorpseDamage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)\r
}\r
\r
void PlayerCorpseDamage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)\r
self.armorvalue = self.armorvalue - save;\r
self.health = self.health - take;\r
// pause regeneration for 5 seconds\r
self.armorvalue = self.armorvalue - save;\r
self.health = self.health - take;\r
// pause regeneration for 5 seconds\r
- self.pauseregen_finished = max(self.pauseregen_finished, time + cvar("g_balance_pause_health_regen"));\r
+ self.pauseregenhealth_finished = max(self.pauseregenhealth_finished, time + cvar("g_balance_pause_health_regen"));\r
+ self.pauseregenarmor_finished = max(self.pauseregenarmor_finished, time + cvar("g_balance_pause_armor_regen"));\r
}\r
self.dmg_save = self.dmg_save + save;//max(save - 10, 0);\r
self.dmg_take = self.dmg_take + take;//max(take - 10, 0);\r
self.dmg_inflictor = inflictor;\r
\r
}\r
self.dmg_save = self.dmg_save + save;//max(save - 10, 0);\r
self.dmg_take = self.dmg_take + take;//max(take - 10, 0);\r
self.dmg_inflictor = inflictor;\r
\r
self.armorvalue = self.armorvalue - save;\r
self.health = self.health - take;\r
// pause regeneration for 5 seconds\r
self.armorvalue = self.armorvalue - save;\r
self.health = self.health - take;\r
// pause regeneration for 5 seconds\r
- self.pauseregen_finished = max(self.pauseregen_finished, time + cvar("g_balance_pause_health_regen"));\r
+ self.pauseregenhealth_finished = max(self.pauseregenhealth_finished, time + cvar("g_balance_pause_health_regen"));\r
+ self.pauseregenarmor_finished = max(self.pauseregenarmor_finished, time + cvar("g_balance_pause_armor_regen"));\r
- if(self.health > 75) // TODO make a "gentle" version?\r
+ if(deathtype == DEATH_FALL)\r
+ PlayerSound(self, playersound_fall, CHAN_PAIN, VOICETYPE_PLAYERSOUND);\r
+ else if(self.health > 75) // TODO make a "gentle" version?\r
PlayerSound(self, playersound_pain100, CHAN_PAIN, VOICETYPE_PLAYERSOUND);\r
else if(self.health > 50)\r
PlayerSound(self, playersound_pain75, CHAN_PAIN, VOICETYPE_PLAYERSOUND);\r
else if(self.health > 25)\r
PlayerSound(self, playersound_pain50, CHAN_PAIN, VOICETYPE_PLAYERSOUND);\r
PlayerSound(self, playersound_pain100, CHAN_PAIN, VOICETYPE_PLAYERSOUND);\r
else if(self.health > 50)\r
PlayerSound(self, playersound_pain75, CHAN_PAIN, VOICETYPE_PLAYERSOUND);\r
else if(self.health > 25)\r
PlayerSound(self, playersound_pain50, CHAN_PAIN, VOICETYPE_PLAYERSOUND);\r
PlayerSound(self, playersound_pain25, CHAN_PAIN, VOICETYPE_PLAYERSOUND);\r
}\r
}\r
PlayerSound(self, playersound_pain25, CHAN_PAIN, VOICETYPE_PLAYERSOUND);\r
}\r
}\r
// print an obituary message\r
Obituary (attacker, inflictor, self, deathtype);\r
race_PreDie();\r
// print an obituary message\r
Obituary (attacker, inflictor, self, deathtype);\r
race_PreDie();\r
- if(self.eater.team != self.team) // don't disarm team mates when swallowing them\r
- if(random() < cvar("g_vore_dropweapon"))\r
- SpawnThrownWeapon (self.origin + (self.mins + self.maxs) * 0.5, self.switchweapon);\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, TRUE);\r
+ // modified volume, used for attenuated (non-radio) voices\r
+ vol = VOL_BASEVOICE;\r
+ if(self.stat_eaten && cvar("g_vore_soundocclusion")) // reduce sound volume for prey, to simulate stomach culling\r
+ vol *= cvar("g_vore_soundocclusion");\r
+ if(cvar("g_healthsize") && cvar("g_healthsize_soundfactor")) // amplify or reduce sound volume based on the size of the player\r
+ vol *= (self.scale * cvar("g_healthsize_soundfactor"));\r
+ vol = bound(0, vol, 1);\r
+\r
- soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_MIN);\r
+ soundto(MSG_ONE, self, chan, sample, vol, ATTN_MIN);\r
else\r
soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);\r
}\r
else\r
soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);\r
}\r
- soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_MIN);\r
+ soundto(MSG_ONE, self, chan, sample, vol, ATTN_MIN);\r
else\r
soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);\r
}\r
else\r
soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);\r
}\r
- soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_MIN);\r
+ soundto(MSG_ONE, self, chan, sample, vol, ATTN_MIN);\r
else\r
soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);\r
}\r
else\r
soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);\r
}\r
- soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX));\r
+ soundto(MSG_ONE, self, chan, sample, vol, 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
else\r
soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);\r
}\r
- soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX));\r
+ soundto(MSG_ONE, self, chan, sample, vol, 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
case VOICETYPE_PLAYERSOUND:\r
else\r
soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);\r
}\r
case VOICETYPE_PLAYERSOUND:\r
- sound(self, chan, sample, VOL_BASE, ATTN_NORM);\r
+ sound(self, chan, sample, vol, ATTN_NORM);\r
- sound(self, chan, sample, VOL_BASE * self.stomach_load / cvar("g_balance_vore_swallow_limit"), ATTN_NORM);\r
+ sound(self, chan, sample, vol * self.stomach_load / g_balance_vore_swallow_limit, ATTN_NORM);\r