X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fg_damage.qc;h=6f8c9490ef907175c088a5c51315dcaef1ce8f38;hp=7108fd3dbea18530d278c237c753405fe912db39;hb=4fc59bbd7e2d4f25ba21952ed50ae754295a7faa;hpb=3c3d7d44f47a050c65fbfe990c0042c5d85159e1 diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index 7108fd3dbe..6f8c9490ef 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -278,7 +278,7 @@ void Send_CSQC_Centerprint(entity e, string s1, string s2, float msg, float type void Obituary (entity attacker, entity inflictor, entity targ, float deathtype) { string s, a, msg; - float p, w, type; + float w, type; if (targ.classname == "player" || targ.classname == "corpse") { @@ -342,7 +342,6 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype) } else { - string blood_message, victim_message; if (!checkrules_firstblood) { checkrules_firstblood = TRUE; @@ -753,6 +752,8 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float if(deathtype & HITTYPE_HEADSHOT) headshot = 1; } + if(g_ca) + PlayerScore_Add(attacker, SP_SCORE, damage * cvar("g_ca_damage2score_multiplier")); } } else @@ -850,20 +851,6 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float } } -vector NearestPointOnBox(entity box, vector org) -{ - vector m1, m2, nearest; - - m1 = box.mins + box.origin; - m2 = box.maxs + box.origin; - - nearest_x = bound(m1_x, org_x, m2_x); - nearest_y = bound(m1_y, org_y, m2_y); - nearest_z = bound(m1_z, org_z, m2_z); - - return nearest; -} - void Damage_RecordDamage(entity attacker, float deathtype, float damage) { float weaponid; @@ -1168,9 +1155,7 @@ void Fire_ApplyDamage(entity e) if not(Fire_IsBurning(e)) return; - o = e.owner; - while(o.owner) - o = o.owner; + for(t = 0, o = e.owner; o.owner && t < 16; o = o.owner, ++t); if(clienttype(o) == CLIENTTYPE_NOTACLIENT) o = e.fire_owner;