From 4b2c4851f320c96e1fd51953ccb604ddd1a5cb7b Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 6 Jul 2016 14:16:00 +1000 Subject: [PATCH] Clean up racer target locking trace --- qcsrc/common/vehicles/vehicle/racer.qc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/qcsrc/common/vehicles/vehicle/racer.qc b/qcsrc/common/vehicles/vehicle/racer.qc index 9c0f40210..334320b32 100644 --- a/qcsrc/common/vehicles/vehicle/racer.qc +++ b/qcsrc/common/vehicles/vehicle/racer.qc @@ -199,12 +199,6 @@ bool racer_frame(entity this) PHYS_INPUT_BUTTON_ZOOM(this) = PHYS_INPUT_BUTTON_CROUCH(this) = false; - if(time >= vehic.vehicle_last_trace) - { - crosshair_trace(this); - vehic.vehicle_last_trace = time + autocvar_g_vehicle_racer_thinkrate; - } - vehic.angles_x *= -1; // Yaw @@ -337,10 +331,16 @@ bool racer_frame(entity this) if(autocvar_g_vehicle_racer_rocket_locktarget) { - if(vehic.vehicle_last_trace == time + autocvar_g_vehicle_racer_thinkrate) - vehicles_locktarget(vehic, (1 / autocvar_g_vehicle_racer_rocket_locking_time) * frametime, - (1 / autocvar_g_vehicle_racer_rocket_locking_releasetime) * frametime, - autocvar_g_vehicle_racer_rocket_locked_time); + if(time >= vehic.vehicle_last_trace) + { + crosshair_trace(this); + + vehicles_locktarget(vehic, (1 / autocvar_g_vehicle_racer_rocket_locking_time) * frametime, + (1 / autocvar_g_vehicle_racer_rocket_locking_releasetime) * frametime, + autocvar_g_vehicle_racer_rocket_locked_time); + + vehic.vehicle_last_trace = time + autocvar_g_vehicle_racer_thinkrate; + } if(vehic.lock_target) { -- 2.39.2