X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fweapons%2Ftracing.qc;h=a1d16b50b0cb6b91861ca21ec76c8d5fdf779a62;hb=c66a78d068945e0dce54d7eb640395c782207fb0;hp=570d976db1d664505d01f6484fdaab7db7fa518d;hpb=5ec0fae66f230a5e4a003fe4defc72d75aaca270;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/weapons/tracing.qc b/qcsrc/server/weapons/tracing.qc index 570d976db..a1d16b50b 100644 --- a/qcsrc/server/weapons/tracing.qc +++ b/qcsrc/server/weapons/tracing.qc @@ -57,7 +57,7 @@ void W_SetupShot_Dir_ProjectileSize_Range(entity ent, .entity weaponentity, vect // track max damage if (IS_PLAYER(ent) && accuracy_canbegooddamage(ent)) - accuracy_add(ent, wep.m_id, maxdamage, 0); + accuracy_add(ent, wep, maxdamage, 0); if(IS_PLAYER(ent)) W_HitPlotAnalysis(ent, wep, v_forward, v_right, v_up); @@ -266,7 +266,7 @@ void FireRailgunBullet (entity this, .entity weaponentity, vector start, vector //explosion = spawn(); // Find all non-hit players the beam passed close by - if(deathtype == WEP_VAPORIZER.m_id || deathtype == WEP_VORTEX.m_id) + if(deathtype == WEP_VAPORIZER.m_id || deathtype == WEP_VORTEX.m_id) // WEAPONTODO { FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != this, { if(!it.railgunhit) @@ -321,7 +321,8 @@ void FireRailgunBullet (entity this, .entity weaponentity, vector start, vector IL_CLEAR(g_railgunhit); // calculate hits and fired shots for hitscan - accuracy_add(this, this.(weaponentity).m_weapon.m_id, 0, min(bdamage, totaldmg)); + if(this.(weaponentity)) + accuracy_add(this, this.(weaponentity).m_weapon, 0, min(bdamage, totaldmg)); trace_endpos = endpoint; trace_ent = endent; @@ -421,7 +422,7 @@ void fireBullet(entity this, .entity weaponentity, vector start, vector dir, flo // do not exceed 100% float added_damage = min(damage - total_damage, damage * solid_penetration_left); total_damage += damage * solid_penetration_left; - accuracy_add(this, this.(weaponentity).m_weapon.m_id, 0, added_damage); + accuracy_add(this, this.(weaponentity).m_weapon, 0, added_damage); } }