From ee01b4572b78bf2f8b185b00fef162a518bf7c9d Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 24 Mar 2018 00:34:58 +1000 Subject: [PATCH] Initialize viewloc_mousepos to the center of the screen (even if it's unused) --- qcsrc/common/viewloc.qc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qcsrc/common/viewloc.qc b/qcsrc/common/viewloc.qc index e4e5ba991..f2dab7bfd 100644 --- a/qcsrc/common/viewloc.qc +++ b/qcsrc/common/viewloc.qc @@ -199,4 +199,10 @@ void viewloc_SetViewLocation() } } +STATIC_INIT_LATE(viewloc_cursor) +{ + // fix the mouse position on init so it isn't in the corner + viewloc_mousepos = '0.5 0 0' * autocvar_vid_conwidth + '0 0.5 0' * autocvar_vid_conheight; +} + #endif -- 2.39.2