From 93e764b023435d430834cab6dd76e20d8756ef78 Mon Sep 17 00:00:00 2001 From: terencehill Date: Tue, 24 Mar 2020 15:42:07 +0100 Subject: [PATCH] Small optimization to the crosshair code --- qcsrc/client/view.qc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index 57cd15a78..1b448b8eb 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -1450,8 +1450,10 @@ void HUD_Crosshair(entity this) if(time < wcross_name_changedonetime && wcross_name != wcross_name_goal_prev_prev && wcross_name_goal_prev_prev) { f = (wcross_name_changedonetime - time) / (wcross_name_changedonetime - wcross_name_changestarttime); + vector wcross_size_save = wcross_size; wcross_size = draw_getimagesize(wcross_name_goal_prev_prev) * wcross_scale; CROSSHAIR_DRAW(wcross_resolution_goal_prev_prev, wcross_name_goal_prev_prev, wcross_alpha * f * wcross_name_alpha_goal_prev_prev); + wcross_size = wcross_size_save; f = 1 - f; } else @@ -1460,7 +1462,6 @@ void HUD_Crosshair(entity this) } wcross_name_alpha_goal_prev = f; - wcross_size = draw_getimagesize(wcross_name) * wcross_scale; CROSSHAIR_DRAW(wcross_resolution, wcross_name, wcross_alpha * f); if(autocvar_crosshair_dot) -- 2.39.5