.float teamkill_soundtime;
.entity teamkill_soundsource;
.entity pusher;
+.float istypefrag;
.float taunt_soundtime;
PlayerStats_Event(targ, PLAYERSTATS_ACHIEVEMENT_FIRSTVICTIM, 1);
}
- if(targ.BUTTON_CHAT) {
+ if(targ.istypefrag) {
Send_CSQC_KillCenterprint(attacker, s, Obituary_ExtraFragInfo(targ), KILL_TYPEFRAG, MSG_KILL);
Send_CSQC_KillCenterprint(targ, a, Obituary_ExtraFragInfo(attacker), KILL_TYPEFRAGGED, MSG_KILL);
} else {
attacker.killcount = attacker.killcount + 1;
- if (attacker.killcount > 2) {
- Send_KillNotification(a, ftos(attacker.killcount), "", KILL_SPREE, MSG_SPREE);
- }
- else if (attacker.killcount == 3)
+ if (attacker.killcount == 3)
{
Send_KillNotification(a, "", "", KILL_SPREE_3, MSG_SPREE);
AnnounceTo(attacker, "03kills");
AnnounceTo(attacker, "30kills");
PlayerStats_Event(attacker, PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_30, 1);
}
+ else if (attacker.killcount > 2) {
+ Send_KillNotification(a, ftos(attacker.killcount), "", KILL_SPREE, MSG_SPREE);
+ }
LogDeath("frag", deathtype, attacker, targ);
}
}
if(autocvar_g_mirrordamage_virtual)
{
- vector v = healtharmor_applydamage(attacker.armorvalue, autocvar_g_balance_armor_blockpercent, mirrordamage);
+ vector v = healtharmor_applydamage(attacker.armorvalue, autocvar_g_balance_armor_blockpercent, mirrordamage);
attacker.dmg_take += v_x;
attacker.dmg_save += v_y;
attacker.dmg_inflictor = inflictor;
// LEMMA:
// Look at:
- // totaldamage = min(mindamage + d, maxdamage * maxdps)
+ // totaldamage = min(mindamage + d, maxtime * maxdps)
// We see:
- // totaldamage <= maxdamage * maxdps
+ // totaldamage <= maxtime * maxdps
// ==> totaldamage / maxdps <= maxtime.
// We also see:
// totaldamage / mindps = min(mindamage / mindps + d, maxtime * maxdps / mindps)
// b) totaltime = min(maxtime, totaldamage / maxdps) = maxtime
// assuming t <= mintime:
- // maxtime = mintime
+ // we get maxtime = mintime
// a) totaltime = max(mintime, ...) >= mintime, also totaltime <= maxtime by the lemma, therefore totaltime = mintime = maxtime
// b) totaltime = min(maxtime, ...) <= maxtime, also totaltime >= mintime by the lemma, therefore totaltime = mintime = maxtime
- // assuming dps <= mindps, we must have t > mintime
- // Now from dps <= mindps, we get mindps == maxdps.
+ // assuming dps <= mindps:
+ // we get mindps = maxdps.
// With this, the lemma says that mintime <= totaldamage / mindps = totaldamage / maxdps <= maxtime.
// a) totaltime = max(mintime, totaldamage / maxdps) = totaldamage / maxdps
// b) totaltime = min(maxtime, totaldamage / mindps) = totaldamage / maxdps