]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/client/View.qc
Fix a mistake I made by reordering some lines of code
[voretournament/voretournament.git] / data / qcsrc / client / View.qc
index ca0fa126fb8f1583b4fcba4a740d096e5969f598..dec78f340977807bb2b6b4bff61e974d3e9a1a89 100644 (file)
@@ -1062,13 +1062,13 @@ void CSQC_UpdateView(float w, float h)
                                wcross_name_alpha_goal_prev = f;\r
 \r
                                // ring around crosshair representing bullets left in weapon clip\r
-                               a = cvar("crosshair_ring_alpha");\r
                                weapon_clipload = getstati(STAT_WEAPON_CLIPLOAD);\r
+                               a = cvar("crosshair_ring_alpha");\r
                                if (weapon_clipload && a)\r
                                {\r
-                                       f = bound(0, weapon_clipload / weapon_clipsize, 1);\r
-                                       ring_scale = cvar("crosshair_ring_size");\r
                                        weapon_clipsize = getstati(STAT_WEAPON_CLIPSIZE);\r
+                                       ring_scale = cvar("crosshair_ring_size");\r
+                                       f = bound(0, weapon_clipload / weapon_clipsize, 1);\r
                                        DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring.tga", f, wcross_color, wcross_alpha * a, DRAWFLAG_ADDITIVE);\r
                                }\r
                        }\r