]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove the null weapon check from W_SetupShot and make sure accuracy_add doesn't...
authorMario <mario@smbclan.net>
Mon, 26 Feb 2018 05:20:45 +0000 (15:20 +1000)
committerMario <mario@smbclan.net>
Mon, 26 Feb 2018 05:20:45 +0000 (15:20 +1000)
qcsrc/server/weapons/accuracy.qc
qcsrc/server/weapons/tracing.qc

index c0441ca162a375e20daa917385a118539f12e18b..1eda4e25b1066c86831ef2cb679bccd7993a6ce8 100644 (file)
@@ -67,6 +67,7 @@ void accuracy_add(entity this, int w, int fired, int hit)
        entity a = CS(this).accuracy;
        if (!a) return;
        if (!hit && !fired) return;
+       if (w == WEP_Null.m_id) return;
        w -= WEP_FIRST;
        int b = accuracy_byte(a.accuracy_hit[w], a.accuracy_fired[w]);
        if (hit)    a.accuracy_hit  [w] += hit;
index 8501e5186deea6ece233d94113104add0d5b5012..a3898c627720059dbf6aecb3eef1c29e3a71c5aa 100644 (file)
@@ -30,8 +30,6 @@ void W_SetupShot_Dir_ProjectileSize_Range(entity ent, .entity weaponentity, vect
        float nudge = 1; // added to traceline target and subtracted from result  TOOD(divVerent): do we still need this? Doesn't the engine do this now for us?
        float oldsolid = ent.dphitcontentsmask;
        Weapon wep = DEATH_WEAPONOF(deathtype);
-    if (wep == WEP_Null)
-       wep = ent.(weaponentity).m_weapon; // TODO: don't fall back, if the attack isn't a weapon we don't want it to affect the user's held weapon!
        if(!IS_CLIENT(ent))
                antilag = false; // no antilag for non-clients!
        if (IS_PLAYER(ent) && (wep.spawnflags & WEP_FLAG_PENETRATEWALLS))