]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
make vehicle behaviour outside of ring configurable
authorJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Mon, 24 Jan 2022 14:28:23 +0000 (15:28 +0100)
committerJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Mon, 24 Jan 2022 14:28:31 +0000 (15:28 +0100)
gamemodes-server.cfg
qcsrc/common/gamemodes/gamemode/br/sv_br.qc

index e2b282f42571dbdb3213c95b53aecacc5d752374..907fc13cc0d97b01527fa64e1727a763e6f0ff9a 100644 (file)
@@ -605,3 +605,4 @@ set g_br_ring_strength "2.5 5 10 20 50" "damage values for each stage including
 set g_br_ring_wait 30 "wait time before each ring stage"
 set g_br_ring_center_factor 0.25 "factor by which the ring can deviate from the center of the map, 0 means always completely centered, 1 means completely random within world bounds"
 set g_br_ring_fadedistance 2000 "distance at which the ring slowly becomes visible until it reaches g_br_ring_alpha when standing right in front of it"
+set g_br_ring_exitvehicle 0 "players can't use vehicles outside of the ring"
index 0788c2e4172679fb15bf618ebb5fd8506b71fcda..650b0280ef9534d9e7d2acfe9e6f0719f9ca81b2 100644 (file)
@@ -41,6 +41,7 @@ float autocvar_g_br_drop_speed_vertical = 1.5;
 bool autocvar_g_br_squad_colors = true;
 float autocvar_g_br_drop_acceleration = 1200;
 bool autocvar_g_br_startweapons = false;
+bool autocvar_g_br_ring_exitvehicle = false;
 
 .vector br_drop_velocity;
 .vector br_drop_angles;
@@ -243,7 +244,7 @@ MUTATOR_HOOKFUNCTION(br, PlayerPreThink, CBC_ORDER_FIRST)
                 Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_BR_RING_WARN);
             }
 
-            if (player.vehicle) // if a player is controlling vehicles
+            if(player.vehicle && autocvar_g_br_ring_exitvehicle) // if the player is controlling a vehicle
                 vehicles_exit(player.vehicle, VHEF_RELEASE); // begone!
      
             Damage(player, ring, ring, ring.strength * frametime, DEATH_RING.m_id, DMG_NOWEP, player.origin, '0 0 0'); // ring damage