From: Mario Date: Fri, 23 Mar 2018 14:34:58 +0000 (+1000) Subject: Initialize viewloc_mousepos to the center of the screen (even if it's unused) X-Git-Tag: xonotic-v0.8.5~2221 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ee01b4572b78bf2f8b185b00fef162a518bf7c9d;p=xonotic%2Fxonotic-data.pk3dir.git Initialize viewloc_mousepos to the center of the screen (even if it's unused) --- 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