]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove a useless tracebox causing some overhead when entering a vehicle, also lower...
authorMario <mario@smbclan.net>
Sat, 18 Jun 2016 21:41:31 +0000 (07:41 +1000)
committerMario <mario@smbclan.net>
Sat, 18 Jun 2016 21:41:31 +0000 (07:41 +1000)
qcsrc/common/vehicles/sv_vehicles.qc
qcsrc/common/vehicles/sv_vehicles.qh

index a797f84c8db90877ddaf48b6dc8ad8c9b92c0f46..b8b44ce6ebec013cd14894d579c01a96b8cbd7da 100644 (file)
@@ -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));
index 8c53724b578525c50b0fd70337a53c42b8de624e..8dcf18dc338ae05cef5409462acfd42af0302e31 100644 (file)
@@ -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;