sound(NULL, CH_INFO, SND_TYPEHIT, VOL_BASE, ATTN_NONE);
typehit_time_prev = typehit_time;
}
+
+ static float kill_time_prev = 0;
+ float kill_time = STAT(KILL_TIME);
+ if (COMPARE_INCREASING(kill_time, kill_time_prev) > autocvar_cl_hitsound_antispam_time)
+ {
+ sound(NULL, CH_INFO, SND_KILL, VOL_BASE, ATTN_NONE);
+ kill_time_prev = kill_time;
+ }
}
vector crosshair_getcolor(entity this, float health_stat)
SOUND(HIT, "misc/hit");
SOUND(TYPEHIT, "misc/typehit");
+SOUND(KILL, "misc/kill");
SOUND(SPAWN, "misc/spawn");
REGISTER_STAT(ENTRAP_ORB, float)
REGISTER_STAT(ENTRAP_ORB_ALPHA, float)
REGISTER_STAT(ITEMSTIME, int, autocvar_sv_itemstime)
+REGISTER_STAT(KILL_TIME, float)
#ifdef SVQC
int autocvar_g_multijump;
.float dmgtime;
.float killcount;
-.float damage_dealt, typehitsound;
+.float damage_dealt, typehitsound, killsound;
.float watersound_finished;
.float iscreature;
.float hit_time = _STAT(HIT_TIME);
.float typehit_time = _STAT(TYPEHIT_TIME);
+.float kill_time = _STAT(KILL_TIME);
.float damage_dealt_total = _STAT(DAMAGE_DEALT_TOTAL);
attacker.taunt_soundtime = time + 1;
attacker.killcount = attacker.killcount + 1;
+ attacker.killsound += 1;
+
#define SPREE_ITEM(counta,countb,center,normal,gentle) \
case counta: \
{ \
entity e = IS_SPEC(it) ? it.enemy : it;
if (e.typehitsound) {
it.typehit_time = time;
+ } else if (e.killsound) {
+ it.kill_time = time;
} else if (e.damage_dealt) {
it.hit_time = time;
it.damage_dealt_total += ceil(e.damage_dealt);
FOREACH_CLIENT(true, {
it.typehitsound = false;
it.damage_dealt = 0;
+ it.killsound = false;
antilag_record(it, CS(it), altime);
});
IL_EACH(g_monsters, true,