From: Mario Date: Sat, 18 Jun 2016 21:41:31 +0000 (+1000) Subject: Remove a useless tracebox causing some overhead when entering a vehicle, also lower... X-Git-Tag: xonotic-v0.8.2~794 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1c130c47026c653d1e118b3760c4b7f873ffca44;p=xonotic%2Fxonotic-data.pk3dir.git 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 --- 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;