From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Mon, 24 Jan 2022 14:28:23 +0000 (+0100) Subject: make vehicle behaviour outside of ring configurable X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2d2fff3bc7e95a11e4a2d02c3b20b72225a81bf6;p=xonotic%2Fxonotic-data.pk3dir.git make vehicle behaviour outside of ring configurable --- 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