void Obituary_SpecialDeath(
entity notif_target,
+ entity attacker,
float murder,
int deathtype,
string s1, string s2, string s3,
f1, f2, f3, 0
);
}
+
+ if(deathtype == DEATH_TELEFRAG.m_id) {
+ Give_Medal(attacker, TELEFRAG);
+ }
}
float Obituary_WeaponDeath(
entity notif_target,
+ entity attacker,
float murder,
int deathtype,
string s1, string s2, string s3,
s1, s2, s3, "",
f1, f2, 0, 0
);
+
+ // z411 special medals
+ if(attacker) {
+ switch(death_message) {
+ case WEAPON_SHOTGUN_MURDER_SLAP:
+ if(!cvar("g_melee_only")) { // don't spam humiliation if we're in melee_only mode
+ Give_Medal(attacker, HUMILIATION);
+ }
+ break;
+ case WEAPON_ELECTRO_MURDER_COMBO:
+ Give_Medal(attacker, ELECTROBITCH);
+ break;
+ }
+ }
}
else
{
{
if(deathtype == DEATH_TEAMCHANGE.m_id || deathtype == DEATH_AUTOTEAMCHANGE.m_id)
{
- Obituary_SpecialDeath(targ, false, deathtype, targ.netname, deathlocation, "", targ.team, 0, 0);
+ Obituary_SpecialDeath(targ, NULL, false, deathtype, targ.netname, deathlocation, "", targ.team, 0, 0);
}
else
{
{
case DEATH_MIRRORDAMAGE:
{
- Obituary_SpecialDeath(targ, false, deathtype, targ.netname, deathlocation, "", CS(targ).killcount, 0, 0);
+ Obituary_SpecialDeath(targ, NULL, false, deathtype, targ.netname, deathlocation, "", CS(targ).killcount, 0, 0);
break;
}
case DEATH_HURTTRIGGER:
- Obituary_SpecialDeath(targ, false, deathtype, targ.netname, inflictor.message, deathlocation, CS(targ).killcount, 0, 0);
+ Obituary_SpecialDeath(targ, NULL, false, deathtype, targ.netname, inflictor.message, deathlocation, CS(targ).killcount, 0, 0);
break;
default:
{
- Obituary_SpecialDeath(targ, false, deathtype, targ.netname, deathlocation, "", CS(targ).killcount, 0, 0);
+ Obituary_SpecialDeath(targ, NULL, false, deathtype, targ.netname, deathlocation, "", CS(targ).killcount, 0, 0);
break;
}
}
}
}
- else if (!Obituary_WeaponDeath(targ, false, deathtype, targ.netname, deathlocation, "", CS(targ).killcount, 0))
+ else if (!Obituary_WeaponDeath(targ, NULL, false, deathtype, targ.netname, deathlocation, "", CS(targ).killcount, 0))
{
backtrace("SUICIDE: what the hell happened here?\n");
return;
}
LogDeath("suicide", deathtype, targ, targ);
+ Send_Notification(NOTIF_ONE, targ, MSG_ANNCE, ANNCE_SUICIDE);
if(deathtype != DEATH_AUTOTEAMCHANGE.m_id) // special case: don't negate frags if auto switched
GiveFrags(attacker, targ, -1, deathtype, weaponentity);
}
Send_Notification(NOTIF_ONE, attacker, MSG_CENTER, CENTER_DEATH_TEAMKILL_FRAG, targ.netname);
Send_Notification(NOTIF_ONE, targ, MSG_CENTER, CENTER_DEATH_TEAMKILL_FRAGGED, attacker_name);
- Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(targ.team, INFO_DEATH_TEAMKILL), targ.netname, attacker_name, deathlocation, CS(targ).killcount);
+ Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(targ.team, INFO_DEATH_TEAMKILL),
+ playername(targ.netname, targ.team, true), playername(attacker_name, attacker.team, true),
+ deathlocation, CS(targ).killcount);
// In this case, the death message will ALWAYS be "foo was betrayed by bar"
// No need for specific death/weapon messages...
CS(attacker).killcount = CS(attacker).killcount + 1;
attacker.killsound += 1;
-
+
// TODO: improve SPREE_ITEM and KILL_SPREE_LIST
// these 2 macros are spread over multiple files
#define SPREE_ITEM(counta,countb,center,normal,gentle) \
case counta: \
- Send_Notification(NOTIF_ONE, attacker, MSG_ANNCE, ANNCE_KILLSTREAK_##countb); \
+ Give_Medal(attacker, KILLSTREAK_##countb); \
if (!warmup_stage) \
PlayerStats_GameReport_Event_Player(attacker, PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_##counta, 1); \
break;
{
checkrules_firstblood = true;
notif_firstblood = true; // modify the current messages so that they too show firstblood information
+ Give_Medal(attacker, FIRSTBLOOD);
PlayerStats_GameReport_Event_Player(attacker, PLAYERSTATS_ACHIEVEMENT_FIRSTBLOOD, 1);
PlayerStats_GameReport_Event_Player(targ, PLAYERSTATS_ACHIEVEMENT_FIRSTVICTIM, 1);
kill_count_to_attacker = CS(attacker).killcount;
kill_count_to_target = 0;
}
+
+ // Excellent check
+ if(attacker.lastkill && attacker.lastkill > time - autocvar_g_medals_excellent_time) {
+ Give_Medal(attacker, EXCELLENT);
+ }
+ attacker.lastkill = time;
if(targ.istypefrag)
{
if(deathtype == DEATH_BUFF.m_id)
f3 = buff_FirstFromFlags(attacker).m_id;
- if (!Obituary_WeaponDeath(targ, true, deathtype, targ.netname, attacker_name, deathlocation, CS(targ).killcount, kill_count_to_attacker))
- Obituary_SpecialDeath(targ, true, deathtype, targ.netname, attacker_name, deathlocation, CS(targ).killcount, kill_count_to_attacker, f3);
+ if (!Obituary_WeaponDeath(targ, attacker, true, deathtype, playername(targ.netname, targ.team, true), playername(attacker_name, attacker.team, true), deathlocation, CS(targ).killcount, kill_count_to_attacker))
+ Obituary_SpecialDeath(targ, attacker, true, deathtype, playername(targ.netname, targ.team, true), playername(attacker_name, attacker.team, true), deathlocation, CS(targ).killcount, kill_count_to_attacker, f3);
}
}
// and there will be a REAL DEATH_VOID implementation which mappers will use.
case DEATH_HURTTRIGGER:
{
- Obituary_SpecialDeath(targ, false, deathtype,
- targ.netname,
+ Obituary_SpecialDeath(targ, NULL, false, deathtype,
+ playername(targ.netname, targ.team, true),
inflictor.message,
deathlocation,
CS(targ).killcount,
case DEATH_CUSTOM:
{
- Obituary_SpecialDeath(targ, false, deathtype,
- targ.netname,
+ Obituary_SpecialDeath(targ, NULL, false, deathtype,
+ playername(targ.netname, targ.team, true),
((strstrofs(deathmessage, "%", 0) < 0) ? strcat("%s ", deathmessage) : deathmessage),
deathlocation,
CS(targ).killcount,
default:
{
- Obituary_SpecialDeath(targ, false, deathtype, targ.netname, deathlocation, "", CS(targ).killcount, 0, 0);
+ Obituary_SpecialDeath(targ, NULL, false, deathtype, playername(targ.netname, targ.team, true), deathlocation, "", CS(targ).killcount, 0, 0);
break;
}
}
LogDeath("accident", deathtype, targ, targ);
+ Send_Notification(NOTIF_ONE, targ, MSG_ANNCE, ANNCE_ACCIDENT);
GiveFrags(targ, targ, -1, deathtype, weaponentity);
if(GameRules_scoring_add(targ, SCORE, 0) == -5)