if(!STAT(FROZEN, frag_target) || !autocvar_g_freezetag_revive_nade)
toss_nade(frag_target, true, '0 0 100', max(frag_target.nade.wait, time + 0.05));
- float killcount_bonus = ((frag_attacker.killcount >= 1) ? bound(0, autocvar_g_nades_bonus_score_minor * frag_attacker.killcount, autocvar_g_nades_bonus_score_medium) : autocvar_g_nades_bonus_score_minor);
-
if(IS_PLAYER(frag_attacker))
{
+ float killcount_bonus = ((CS(frag_attacker).killcount >= 1) ? bound(0, autocvar_g_nades_bonus_score_minor * CS(frag_attacker).killcount, autocvar_g_nades_bonus_score_medium) : autocvar_g_nades_bonus_score_minor);
+
if (SAME_TEAM(frag_attacker, frag_target) || frag_attacker == frag_target)
nades_RemoveBonus(frag_attacker);
else if(frag_target.flagcarried)
nades_GiveBonus(frag_attacker, autocvar_g_nades_bonus_score_medium);
- else if(autocvar_g_nades_bonus_score_spree && frag_attacker.killcount > 1)
+ else if(autocvar_g_nades_bonus_score_spree && CS(frag_attacker).killcount > 1)
{
#define SPREE_ITEM(counta,countb,center,normal,gentle) \
case counta: { nades_GiveBonus(frag_attacker, autocvar_g_nades_bonus_score_spree); break; }
- switch(frag_attacker.killcount)
+ switch(CS(frag_attacker).killcount)
{
KILL_SPREE_LIST
default: nades_GiveBonus(frag_attacker, autocvar_g_nades_bonus_score_minor); break;
{
case DEATH_MIRRORDAMAGE:
{
- Obituary_SpecialDeath(targ, false, deathtype, targ.netname, deathlocation, "", targ.killcount, 0, 0);
+ Obituary_SpecialDeath(targ, false, deathtype, targ.netname, deathlocation, "", CS(targ).killcount, 0, 0);
break;
}
default:
{
- Obituary_SpecialDeath(targ, false, deathtype, targ.netname, deathlocation, "", targ.killcount, 0, 0);
+ Obituary_SpecialDeath(targ, false, deathtype, targ.netname, deathlocation, "", CS(targ).killcount, 0, 0);
break;
}
}
}
}
- else if (!Obituary_WeaponDeath(targ, false, deathtype, targ.netname, deathlocation, "", targ.killcount, 0))
+ else if (!Obituary_WeaponDeath(targ, false, deathtype, targ.netname, deathlocation, "", CS(targ).killcount, 0))
{
backtrace("SUICIDE: what the hell happened here?\n");
return;
LogDeath("tk", deathtype, attacker, targ);
GiveFrags(attacker, targ, -1, deathtype);
- attacker.killcount = 0;
+ CS(attacker).killcount = 0;
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.netname);
- Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(targ.team, INFO_DEATH_TEAMKILL), targ.netname, attacker.netname, deathlocation, targ.killcount);
+ Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(targ.team, INFO_DEATH_TEAMKILL), targ.netname, attacker.netname, 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...
GiveFrags(attacker, targ, 1, deathtype);
CS(attacker).taunt_soundtime = time + 1;
- attacker.killcount = attacker.killcount + 1;
+ CS(attacker).killcount = CS(attacker).killcount + 1;
attacker.killsound += 1;
PS_GR_P_ADDVAL(attacker, PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_##counta, 1); \
break; \
}
- switch(attacker.killcount)
+ switch(CS(attacker).killcount)
{
KILL_SPREE_LIST
default: break;
}
else
{
- kill_count_to_attacker = attacker.killcount;
+ kill_count_to_attacker = CS(attacker).killcount;
kill_count_to_target = 0;
}
if(deathtype == DEATH_BUFF.m_id)
f3 = buff_FirstFromFlags(attacker.buffs).m_id;
- if (!Obituary_WeaponDeath(targ, true, deathtype, targ.netname, attacker.netname, deathlocation, targ.killcount, kill_count_to_attacker))
- Obituary_SpecialDeath(targ, true, deathtype, targ.netname, attacker.netname, deathlocation, targ.killcount, kill_count_to_attacker, f3);
+ if (!Obituary_WeaponDeath(targ, true, deathtype, targ.netname, attacker.netname, deathlocation, CS(targ).killcount, kill_count_to_attacker))
+ Obituary_SpecialDeath(targ, true, deathtype, targ.netname, attacker.netname, deathlocation, CS(targ).killcount, kill_count_to_attacker, f3);
}
}
targ.netname,
inflictor.message,
deathlocation,
- targ.killcount,
+ CS(targ).killcount,
0,
0);
break;
targ.netname,
((strstrofs(deathmessage, "%", 0) < 0) ? strcat("%s ", deathmessage) : deathmessage),
deathlocation,
- targ.killcount,
+ CS(targ).killcount,
0,
0);
break;
default:
{
- Obituary_SpecialDeath(targ, false, deathtype, targ.netname, deathlocation, "", targ.killcount, 0, 0);
+ Obituary_SpecialDeath(targ, false, deathtype, targ.netname, deathlocation, "", CS(targ).killcount, 0, 0);
break;
}
}
}
// reset target kill count
- if(targ.killcount) { targ.killcount = 0; }
+ CS(targ).killcount = 0;
}
void Ice_Think(entity this)
float mirrordamage = 0;
float mirrorforce = 0;
- if (game_stopped || targ.killcount == FRAGS_SPECTATOR)
+ if (game_stopped || (IS_CLIENT(targ) && CS(targ).killcount == FRAGS_SPECTATOR))
return;
entity attacker_save = attacker;