From 1c130c47026c653d1e118b3760c4b7f873ffca44 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 19 Jun 2016 07:41:31 +1000 Subject: [PATCH] Remove a useless tracebox causing some overhead when entering a vehicle, also lower the number of attempts to find an exit location for the player --- qcsrc/common/vehicles/sv_vehicles.qc | 3 +-- qcsrc/common/vehicles/sv_vehicles.qh | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qcsrc/common/vehicles/sv_vehicles.qc b/qcsrc/common/vehicles/sv_vehicles.qc index a797f84c8..b8b44ce6e 100644 --- a/qcsrc/common/vehicles/sv_vehicles.qc +++ b/qcsrc/common/vehicles/sv_vehicles.qc @@ -768,7 +768,7 @@ vector vehicles_findgoodexit(entity this, vector prefer_spot) float i; vector v, v2; v2 = 0.5 * (this.absmin + this.absmax); - for(i = 0; i < 100; ++i) + for(i = 0; i < autocvar_g_vehicles_exit_attempts; ++i) { v = randomvec(); v_z = 0; @@ -1005,7 +1005,6 @@ void vehicles_enter(entity pl, entity veh) veh.vehicle_hudmodel.viewmodelforclient = pl; - tracebox(pl.origin, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), pl.origin, false, pl); pl.crouch = false; pl.view_ofs = STAT(PL_VIEW_OFS, NULL); setsize (pl, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL)); diff --git a/qcsrc/common/vehicles/sv_vehicles.qh b/qcsrc/common/vehicles/sv_vehicles.qh index 8c53724b5..8dcf18dc3 100644 --- a/qcsrc/common/vehicles/sv_vehicles.qh +++ b/qcsrc/common/vehicles/sv_vehicles.qh @@ -16,6 +16,7 @@ float autocvar_g_vehicles_crush_force = 50; bool autocvar_g_vehicles_delayspawn = true; float autocvar_g_vehicles_delayspawn_jitter = 10; float autocvar_g_vehicles_allow_bots; +int autocvar_g_vehicles_exit_attempts = 25; AUTOCVAR(g_vehicles_teams, bool, true, "allow team specific vehicles"); float autocvar_g_vehicles_teleportable; -- 2.39.2