From: Mario Date: Sat, 7 Sep 2019 07:00:41 +0000 (+0000) Subject: Merge branch 'martin-t/mg-solidpen' into 'master' X-Git-Tag: xonotic-v0.8.5~1307 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0980e2f5d9715eaa91a2140bdb7aa5d9c8e85817;p=xonotic%2Fxonotic-data.pk3dir.git Merge branch 'martin-t/mg-solidpen' into 'master' Increase MG solidpenetration See merge request xonotic/xonotic-data.pk3dir!619 --- 0980e2f5d9715eaa91a2140bdb7aa5d9c8e85817 diff --cc qcsrc/server/weapons/tracing.qc index 91c23563f,09e9eab98..06bebeba2 --- a/qcsrc/server/weapons/tracing.qc +++ b/qcsrc/server/weapons/tracing.qc @@@ -330,20 -330,24 +330,19 @@@ void fireBullet_trace_callback(vector s fireBullet_last_hit = NULL; } -void fireBullet(entity this, .entity weaponentity, vector start, vector dir, float spread, float max_solid_penetration, float damage, float force, float dtype, entity tracer_effect) +void fireBullet_antilag(entity this, .entity weaponentity, vector start, vector dir, float spread, float max_solid_penetration, float damage, float force, float dtype, entity tracer_effect, bool do_antilag) { - vector end; - dir = normalize(dir + randomvec() * spread); - end = start + dir * max_shot_distance; + vector end = start + dir * max_shot_distance; fireBullet_last_hit = NULL; fireBullet_trace_callback_eff = tracer_effect; - float solid_penetration_left = 1; + float solid_penetration_fraction = 1; + float damage_fraction = 1; float total_damage = 0; - float lag = ((IS_REAL_CLIENT(this)) ? ANTILAG_LATENCY(this) : 0); - if(lag < 0.001) - lag = 0; - bool noantilag = ((IS_CLIENT(this)) ? CS(this).cvar_cl_noantilag : false); - if(autocvar_g_antilag == 0 || noantilag) - lag = 0; // only do hitscan, but no antilag + float lag = ((do_antilag) ? antilag_getlag(this) : 0); if(lag) antilag_takeback_all(this, lag);