From 2d2fff3bc7e95a11e4a2d02c3b20b72225a81bf6 Mon Sep 17 00:00:00 2001 From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Mon, 24 Jan 2022 15:28:23 +0100 Subject: [PATCH] make vehicle behaviour outside of ring configurable --- gamemodes-server.cfg | 1 + qcsrc/common/gamemodes/gamemode/br/sv_br.qc | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gamemodes-server.cfg b/gamemodes-server.cfg index e2b282f42..907fc13cc 100644 --- a/gamemodes-server.cfg +++ b/gamemodes-server.cfg @@ -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" diff --git a/qcsrc/common/gamemodes/gamemode/br/sv_br.qc b/qcsrc/common/gamemodes/gamemode/br/sv_br.qc index 0788c2e41..650b0280e 100644 --- a/qcsrc/common/gamemodes/gamemode/br/sv_br.qc +++ b/qcsrc/common/gamemodes/gamemode/br/sv_br.qc @@ -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 -- 2.39.2