]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Initialize viewloc_mousepos to the center of the screen (even if it's unused)
authorMario <mario@smbclan.net>
Fri, 23 Mar 2018 14:34:58 +0000 (00:34 +1000)
committerMario <mario@smbclan.net>
Fri, 23 Mar 2018 14:34:58 +0000 (00:34 +1000)
qcsrc/common/viewloc.qc

index e4e5ba991bec4fafa3dfc4bfbe278d69f4e2214c..f2dab7bfd22cd7c8620f3b69e7c10d9f37ece242 100644 (file)
@@ -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