.float teamkill_soundtime;\r
.entity teamkill_soundsource;\r
.entity pusher;\r
+\r
.float taunt_soundtime;\r
+.float taunt_soundtype;\r
\r
+void SetAutoTaunt(entity e, float t_soundtime, float t_soundtype)\r
+{\r
+ e.taunt_soundtime = t_soundtime;\r
+ e.taunt_soundtype = t_soundtype;\r
+}\r
\r
float IsDifferentTeam(entity a, entity b)\r
{\r
bprint ("^1",s, "^1 burned to death\n");\r
else if (deathtype == DEATH_DIGESTION)\r
bprint ("^1",s, "^1 was digested\n");\r
+ else if (deathtype == DEATH_REGURGITATION)\r
+ bprint ("^1",s, "^1 regurgitated to death\n");\r
else if (deathtype == DEATH_STOMACHKICK)\r
bprint ("^1",s, "^1 was ripped apart from the inside\n");\r
else if (deathtype != DEATH_TEAMCHANGE && deathtype != DEATH_QUIET)\r
centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, a,"^1 made you their meal ^7", GetAdvancedDeathReports(attacker)));\r
} else {\r
if((cvar("sv_fragmessage_information_typefrag")) && (targ.BUTTON_CHAT)) {\r
- centerprint(attacker, strcat(DAMAGE_CENTERPRINT_SPACER, blood_message, "^1You typeate ^7", s, GetAdvancedDeathReports(targ)));\r
- centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, victim_message, "^1You were typeeaten by ^7", a, GetAdvancedDeathReports(attacker)));\r
+ centerprint(attacker, strcat(DAMAGE_CENTERPRINT_SPACER, blood_message, "^1You type-ate ^7", s, GetAdvancedDeathReports(targ)));\r
+ centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, victim_message, "^1You were type-eaten by ^7", a, GetAdvancedDeathReports(attacker)));\r
} else {\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
+ SetAutoTaunt(attacker, time + 1, TAUNTTYPE_DEATH);\r
}\r
+ portrait(attacker, targ);\r
}\r
else\r
{\r
centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, a,"^1 scored against you ^7", GetAdvancedDeathReports(attacker)));\r
} else {\r
if((cvar("sv_fragmessage_information_typefrag")) && (targ.BUTTON_CHAT)) {\r
- centerprint(attacker, strcat(DAMAGE_CENTERPRINT_SPACER, blood_message, "^1You typefragged ^7", s, GetAdvancedDeathReports(targ)));\r
- centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, victim_message, "^1You were typefragged by ^7", a, GetAdvancedDeathReports(attacker)));\r
+ centerprint(attacker, strcat(DAMAGE_CENTERPRINT_SPACER, blood_message, "^1You type-ate ^7", s, GetAdvancedDeathReports(targ)));\r
+ centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, victim_message, "^1You were type-eaten by ^7", a, GetAdvancedDeathReports(attacker)));\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
+ SetAutoTaunt(attacker, time + 1, TAUNTTYPE_DEATH);\r
}\r
+ portrait(attacker, targ);\r
}\r
\r
if(sv_gentle) {\r
bprint ("^1",s, "^1 was burnt to death by ^1", a, "\n");\r
else if (deathtype == DEATH_DIGESTION)\r
bprint ("^1",s, "^1 was digested by ^1", a, "\n");\r
+ else if (deathtype == DEATH_REGURGITATION)\r
+ bprint ("^1",s, "^1 regurgitated to death due to ^1", a, "\n");\r
else if (deathtype == DEATH_STOMACHKICK)\r
bprint ("^1",s, "^1 was ripped apart from the inside by ^1", a, "\n");\r
else if (deathtype == DEATH_CUSTOM)\r
GiveFrags(attacker, targ, 0); // for logging\r
}\r
else\r
- GiveFrags(attacker, targ, 1);\r
+ {\r
+ if(cvar("g_vore_reversescoring") && deathtype == DEATH_DIGESTION) // reversed vore scoring\r
+ GiveFrags(targ, attacker, 1);\r
+ else\r
+ GiveFrags(attacker, targ, 1);\r
+ }\r
\r
if (targ.killcount > 2) {\r
if(sv_gentle)\r
LogDeath("accident", deathtype, targ, targ);\r
}\r
\r
+ // we lose all armor when we die\r
+ targ.armorvalue = 0;\r
+\r
targ.death_origin = targ.origin;\r
if(targ != attacker)\r
targ.killer_origin = attacker.origin;\r
if (attacker.isbot)\r
damage = damage * bound(0.1, (skill + 5) * 0.1, 1);\r
\r
+ // if a predator is taking damage, check if he should regurgitate his prey, based on the damage he took\r
+ if(cvar("g_balance_vore_escapeprobability"))\r
+ if(targ.stomach_load && random() < cvar("g_balance_vore_escapeprobability") * damage)\r
+ targ.regurgitate_prepare = -1;\r
+\r
// nullify damage if teamplay is on\r
if(deathtype != DEATH_TELEFRAG)\r
if(attacker.classname == "player")\r
{\r
teamdamage0 = max(attacker.dmg_team, cvar("g_teamdamage_threshold"));\r
attacker.dmg_team = attacker.dmg_team + damage;\r
- if(attacker.dmg_team > teamdamage0 && !g_ca)\r
+ if(attacker.dmg_team > teamdamage0 && !g_ca && deathtype != DEATH_REGURGITATION)\r
mirrordamage = cvar("g_mirrordamage") * (attacker.dmg_team - teamdamage0);\r
mirrorforce = cvar("g_mirrordamage") * vlen(force);\r
if(g_ca)\r
force = force * cvar("g_ctf_flagcarrier_selfforce");\r
}\r
\r
+ // skill-based damage offset for bots\r
+ if(skill && cvar("skill_offset"))\r
+ {\r
+ float ofs;\r
+ ofs = pow(skill / cvar("skill_offset_center"), cvar("skill_offset"));\r
+ if(clienttype(attacker) == CLIENTTYPE_BOT)\r
+ damage *= ofs;\r
+ if(clienttype(targ) == CLIENTTYPE_BOT)\r
+ damage /= ofs;\r
+ }\r
+\r
// count the damage\r
if(attacker)\r
if(!targ.deadflag)\r
}\r
}\r
}\r
- else\r
+ else if(deathtype != DEATH_REGURGITATION)\r
{\r
if(deathtype != DEATH_FIRE)\r
attacker.typehitsound += 1;\r
- if(mirrordamage > 0)\r
- if(time > attacker.teamkill_complain)\r
- {\r
- attacker.teamkill_complain = time + 5;\r
- attacker.teamkill_soundtime = time + 0.4;\r
- attacker.teamkill_soundsource = targ;\r
- }\r
+ if(time > attacker.teamkill_complain)\r
+ {\r
+ attacker.teamkill_complain = time + 5;\r
+ attacker.teamkill_soundtime = time + 0.4;\r
+ attacker.teamkill_soundsource = targ;\r
+ portrait(targ, attacker);\r
+ }\r
}\r
}\r
}\r
// Savage: vampire mode\r
if (g_vampire)\r
if (time >= self.spawnshieldtime)\r
+ if (deathtype != DEATH_DIGESTION) // a different vampire system is used for this\r
{\r
attacker.health += damage;\r
}\r