X-Git-Url: http://de.git.xonotic.org/?p=voretournament%2Fvoretournament.git;a=blobdiff_plain;f=data%2Fqcsrc%2Fserver%2Fg_damage.qc;h=483ff0c7347dc4f7c9c3c29a595e8f9e5e11bb27;hp=0562a14496616fb67e37862459784f79b512e845;hb=3c344811f2558a51041374ffe7d9771e3d57547a;hpb=f9fc47664b7d8c904a9e07ac87e2c7817e9a9126 diff --git a/data/qcsrc/server/g_damage.qc b/data/qcsrc/server/g_damage.qc index 0562a144..483ff0c7 100644 --- a/data/qcsrc/server/g_damage.qc +++ b/data/qcsrc/server/g_damage.qc @@ -56,8 +56,15 @@ float damage_headshotbonus; // bonus multiplier for head shots, set to 0 after u .float teamkill_soundtime; .entity teamkill_soundsource; .entity pusher; + .float taunt_soundtime; +.float taunt_soundtype; +void SetAutoTaunt(entity e, float t_soundtime, float soundtype) +{ + e.taunt_soundtime = t_soundtime; + e.taunt_soundtype = soundtype; +} float IsDifferentTeam(entity a, entity b) { @@ -367,13 +374,13 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype) centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, a,"^1 made you their meal ^7", GetAdvancedDeathReports(attacker))); } else { if((cvar("sv_fragmessage_information_typefrag")) && (targ.BUTTON_CHAT)) { - centerprint(attacker, strcat(DAMAGE_CENTERPRINT_SPACER, blood_message, "^1You typeate ^7", s, GetAdvancedDeathReports(targ))); - centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, victim_message, "^1You were typeeaten by ^7", a, GetAdvancedDeathReports(attacker))); + centerprint(attacker, strcat(DAMAGE_CENTERPRINT_SPACER, blood_message, "^1You type-ate ^7", s, GetAdvancedDeathReports(targ))); + centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, victim_message, "^1You were type-eaten by ^7", a, GetAdvancedDeathReports(attacker))); } else { centerprint(attacker, strcat(DAMAGE_CENTERPRINT_SPACER, blood_message, "^4You ate ^7", s, GetAdvancedDeathReports(targ))); centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, victim_message, "^1You were eaten by ^7", a, GetAdvancedDeathReports(attacker))); } - attacker.taunt_soundtime = time + 1; + SetAutoTaunt(attacker, time + 1, TAUNTTYPE_DEATH); } } else @@ -383,13 +390,13 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype) centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, a,"^1 scored against you ^7", GetAdvancedDeathReports(attacker))); } else { if((cvar("sv_fragmessage_information_typefrag")) && (targ.BUTTON_CHAT)) { - centerprint(attacker, strcat(DAMAGE_CENTERPRINT_SPACER, blood_message, "^1You typefragged ^7", s, GetAdvancedDeathReports(targ))); - centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, victim_message, "^1You were typefragged by ^7", a, GetAdvancedDeathReports(attacker))); + centerprint(attacker, strcat(DAMAGE_CENTERPRINT_SPACER, blood_message, "^1You type-ate ^7", s, GetAdvancedDeathReports(targ))); + centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, victim_message, "^1You were type-eaten by ^7", a, GetAdvancedDeathReports(attacker))); } else { centerprint(attacker, strcat(DAMAGE_CENTERPRINT_SPACER, blood_message, "^4You killed ^7", s, GetAdvancedDeathReports(targ))); centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, victim_message, "^1You were killed by ^7", a, GetAdvancedDeathReports(attacker))); } - attacker.taunt_soundtime = time + 1; + SetAutoTaunt(attacker, time + 1, TAUNTTYPE_DEATH); } } @@ -471,7 +478,12 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype) GiveFrags(attacker, targ, 0); // for logging } else - GiveFrags(attacker, targ, 1); + { + if(cvar("g_vore_reversescoring") && deathtype == DEATH_DIGESTION) // reversed vore scoring + GiveFrags(targ, attacker, 1); + else + GiveFrags(attacker, targ, 1); + } if (targ.killcount > 2) { if(sv_gentle) @@ -827,13 +839,12 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float { if(deathtype != DEATH_FIRE) attacker.typehitsound += 1; - if(mirrordamage > 0) - if(time > attacker.teamkill_complain) - { - attacker.teamkill_complain = time + 5; - attacker.teamkill_soundtime = time + 0.4; - attacker.teamkill_soundsource = targ; - } + if(time > attacker.teamkill_complain) + { + attacker.teamkill_complain = time + 5; + attacker.teamkill_soundtime = time + 0.4; + attacker.teamkill_soundsource = targ; + } } } }