.float istypefrag;
.float taunt_soundtime;
-
-float IsDifferentTeam(entity a, entity b)
-{
- if(teamplay)
- {
- if(a.team == b.team)
- return 0;
- }
- else
- {
- if(a == b)
- return 0;
- }
- return 1;
-}
-
float IsFlying(entity a)
{
if(a.flags & FL_ONGROUND)
GiveFrags_randomweapons.classname = "GiveFrags_randomweapons";
}
- if(inWarmupStage)
+ if(warmup_stage)
GiveFrags_randomweapons.weapons = warmup_start_weapons;
else
GiveFrags_randomweapons.weapons = start_weapons;
{
if(deathent.death_msgmurder)
{
- Send_Notification_WOVA(
+ Send_Notification_WOCOVA(
NOTIF_ONE,
notif_target,
MSG_MULTI,
s1, s2, s3, "",
f1, f2, f3, 0
);
- Send_Notification_WOVA(
+ Send_Notification_WOCOVA(
NOTIF_ALL_EXCEPT,
notif_target,
MSG_INFO,
{
if(deathent.death_msgself)
{
- Send_Notification_WOVA(
+ Send_Notification_WOCOVA(
NOTIF_ONE,
notif_target,
MSG_MULTI,
s1, s2, s3, "",
f1, f2, f3, 0
);
- Send_Notification_WOVA(
+ Send_Notification_WOCOVA(
NOTIF_ALL_EXCEPT,
notif_target,
MSG_INFO,
if(death_message)
{
- Send_Notification_WOVA(
+ Send_Notification_WOCOVA(
NOTIF_ONE,
notif_target,
MSG_MULTI,
s1, s2, s3, "",
f1, f2, 0, 0
);
- Send_Notification_WOVA(
+ Send_Notification_WOCOVA(
NOTIF_ALL_EXCEPT,
notif_target,
MSG_INFO,
// ======
else if(IS_PLAYER(attacker))
{
- if(!IsDifferentTeam(attacker, targ))
+ if(SAME_TEAM(attacker, targ))
{
LogDeath("tk", deathtype, attacker, targ);
GiveFrags(attacker, targ, -1, deathtype);
kill_count_to_target = 0;
}
- float verbose_allowed = (autocvar_notification_server_allows_frag_verbose && ((autocvar_notification_server_allows_frag_verbose == 2) || inWarmupStage));
if(targ.istypefrag)
{
- if(attacker.FRAG_VERBOSE && verbose_allowed)
- Send_Notification(NOTIF_ONE, attacker, MSG_CENTER, CENTER_DEATH_MURDER_TYPEFRAG_VERBOSE, targ.netname, kill_count_to_attacker, (IS_BOT_CLIENT(targ) ? NO_MSG : targ.ping));
- else
- Send_Notification(NOTIF_ONE, attacker, MSG_CENTER, CENTER_DEATH_MURDER_TYPEFRAG, targ.netname, kill_count_to_attacker);
-
- if(targ.FRAG_VERBOSE && verbose_allowed)
- Send_Notification(NOTIF_ONE, targ, MSG_CENTER, CENTER_DEATH_MURDER_TYPEFRAGGED_VERBOSE, attacker.netname, kill_count_to_target, attacker.health, attacker.armorvalue, (IS_BOT_CLIENT(attacker) ? NO_MSG : attacker.ping));
- else
- Send_Notification(NOTIF_ONE, targ, MSG_CENTER, CENTER_DEATH_MURDER_TYPEFRAGGED, attacker.netname, kill_count_to_target);
+ Send_Notification(
+ NOTIF_ONE,
+ attacker,
+ MSG_CHOICE,
+ CHOICE_TYPEFRAG,
+ targ.netname,
+ kill_count_to_attacker,
+ (IS_BOT_CLIENT(targ) ? NO_MSG : targ.ping)
+ );
+ Send_Notification(
+ NOTIF_ONE,
+ targ,
+ MSG_CHOICE,
+ CHOICE_TYPEFRAGGED,
+ attacker.netname,
+ kill_count_to_target,
+ attacker.health,
+ attacker.armorvalue,
+ (IS_BOT_CLIENT(attacker) ? NO_MSG : attacker.ping)
+ );
}
else
{
- if(attacker.FRAG_VERBOSE && verbose_allowed)
- Send_Notification(NOTIF_ONE, attacker, MSG_CENTER, CENTER_DEATH_MURDER_FRAG_VERBOSE, targ.netname, kill_count_to_attacker, (IS_BOT_CLIENT(targ) ? NO_MSG : targ.ping));
- else
- Send_Notification(NOTIF_ONE, attacker, MSG_CENTER, CENTER_DEATH_MURDER_FRAG, targ.netname, kill_count_to_attacker);
-
- if(targ.FRAG_VERBOSE && verbose_allowed)
- Send_Notification(NOTIF_ONE, targ, MSG_CENTER, CENTER_DEATH_MURDER_FRAGGED_VERBOSE, attacker.netname, kill_count_to_target, attacker.health, attacker.armorvalue, (IS_BOT_CLIENT(attacker) ? NO_MSG : attacker.ping));
- else
- Send_Notification(NOTIF_ONE, targ, MSG_CENTER, CENTER_DEATH_MURDER_FRAGGED, attacker.netname, kill_count_to_target);
+ Send_Notification(
+ NOTIF_ONE,
+ attacker,
+ MSG_CHOICE,
+ CHOICE_FRAG,
+ targ.netname,
+ kill_count_to_attacker,
+ (IS_BOT_CLIENT(targ) ? NO_MSG : targ.ping)
+ );
+ Send_Notification(
+ NOTIF_ONE,
+ targ,
+ MSG_CHOICE,
+ CHOICE_FRAGGED,
+ attacker.netname,
+ kill_count_to_target,
+ attacker.health,
+ attacker.armorvalue,
+ (IS_BOT_CLIENT(attacker) ? NO_MSG : attacker.ping)
+ );
}
if not(Obituary_WeaponDeath(targ, TRUE, deathtype, targ.netname, attacker.netname, deathlocation, targ.killcount, kill_count_to_attacker))
if(DEATH_ISWEAPON(deathtype, WEP_HOOK) || DEATH_ISWEAPON(deathtype, WEP_TUBA))
{
if(IS_PLAYER(targ))
- if not(IsDifferentTeam(targ, attacker))
+ if(SAME_TEAM(targ, attacker))
{
self = oldself;
return;
if(deathtype == DEATH_KILL || deathtype == DEATH_TEAMCHANGE || deathtype == DEATH_AUTOTEAMCHANGE)
{
+ // exit the vehicle before killing (fixes a crash)
+ if(IS_PLAYER(targ) && targ.vehicle)
+ vehicles_exit(VHEF_RELESE);
+
// These are ALWAYS lethal
// No damage modification here
// Instead, prepare the victim for his death...
damage = 0;
force = '0 0 0';
}
- else if(!IsDifferentTeam(attacker, targ))
+ else if(SAME_TEAM(attacker, targ))
{
if(autocvar_teamplay_mode == 1)
damage = 0;
if(IS_PLAYER(victim) || victim.turrcaps_flags & TFL_TURRCAPS_ISTURRET || victim.flags & FL_MONSTER)
{
- if(IsDifferentTeam(victim, attacker))
+ if(DIFF_TEAM(victim, attacker))
{
if(damage > 0)
{