]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add an option to allow bullets to penetrate weapon clips (disabled by default)
authorMario <mario@smbclan.net>
Sat, 10 Sep 2016 14:02:11 +0000 (00:02 +1000)
committerMario <mario@smbclan.net>
Sat, 10 Sep 2016 14:02:11 +0000 (00:02 +1000)
defaultXonotic.cfg
qcsrc/server/autocvars.qh
qcsrc/server/weapons/tracing.qc

index 538e3549fc5cc41ca4d8bebb03226129243a0f4a..892921f3af09076fa5543b5329c18f42d83e50e3 100644 (file)
@@ -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!)"
 
index a1bb5fb958d5da0cdf69d86759fc9b48bfe7de82..6faddf4dde63d51399a626be342967caf0def555 100644 (file)
@@ -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;
index 176b69e6b6c9e5f720f2dfc09fb9af13367c1ff8..051a725480088097d1bf0803b4a2e014834b06d7 100644 (file)
@@ -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!