diff --git a/cl_dll/cdll_int.cpp b/cl_dll/cdll_int.cpp index 80fdfe81..d9e1101f 100644 --- a/cl_dll/cdll_int.cpp +++ b/cl_dll/cdll_int.cpp @@ -146,6 +146,24 @@ int DLLEXPORT Initialize( cl_enginefunc_t *pEnginefuncs, int iVersion ) return 1; } +/* +================= +HUD_GetRect + +VGui stub +================= +*/ +int *HUD_GetRect( void ) +{ + static int extent[4]; + + extent[0] = gEngfuncs.GetWindowCenterX() - ScreenWidth / 2; + extent[1] = gEngfuncs.GetWindowCenterY() - ScreenHeight / 2; + extent[2] = gEngfuncs.GetWindowCenterX() + ScreenWidth / 2; + extent[3] = gEngfuncs.GetWindowCenterY() + ScreenHeight / 2; + + return extent; +} /* ========================== @@ -241,6 +259,7 @@ Called by engine every frame that client .dll is loaded void DLLEXPORT HUD_Frame( double time ) { + gEngfuncs.VGui_ViewportPaintBackground(HUD_GetRect()); }