From: Mario Date: Sat, 10 Sep 2016 14:02:11 +0000 (+1000) Subject: Add an option to allow bullets to penetrate weapon clips (disabled by default) X-Git-Tag: xonotic-v0.8.2~604 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=64c5403b271432150972626d3104064e3ec51f16;p=xonotic%2Fxonotic-data.pk3dir.git Add an option to allow bullets to penetrate weapon clips (disabled by default) --- diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 538e3549f..892921f3a 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -1091,6 +1091,7 @@ set g_showweaponspawns 1 "1: display waypoints for weapon spawns found on the ma set g_ballistics_mindistance 2 // enable ballistics starting from 2 qu set g_ballistics_density_player 0.50 // players are 2x as easy to pass as walls set g_ballistics_density_corpse 0.10 // corpses are 10x as easy to pass as walls +set g_ballistics_penetrate_clips 0 "allow ballistics to pass through weapon clips" set cl_stripcolorcodes 0 "experimental feature (notes: strips ALL color codes from messages!)" diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index a1bb5fb95..6faddf4dd 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -92,6 +92,7 @@ float autocvar_g_balance_teams_scorefactor; float autocvar_g_ballistics_density_corpse; float autocvar_g_ballistics_density_player; float autocvar_g_ballistics_mindistance; +bool autocvar_g_ballistics_penetrate_clips; float autocvar_g_ban_default_bantime; float autocvar_g_ban_default_masksize; float autocvar_g_ban_sync_interval; diff --git a/qcsrc/server/weapons/tracing.qc b/qcsrc/server/weapons/tracing.qc index 176b69e6b..051a72548 100644 --- a/qcsrc/server/weapons/tracing.qc +++ b/qcsrc/server/weapons/tracing.qc @@ -445,7 +445,7 @@ void fireBullet(entity this, vector start, vector dir, float spread, float max_s } } - if (is_weapclip) + if (is_weapclip && !autocvar_g_ballistics_penetrate_clips) break; // go through solid!