mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
remove streamoverlay hook
This commit is contained in:
parent
d4f9e68930
commit
2e3b4205c0
@ -654,21 +654,10 @@ RPakLoadedInfo_t* RTech::GetPakLoadedInfo(const char* szPakName)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
#if not defined DEDICATED && defined (GAMEDLL_S3)
|
||||
void RTech_GetStreamOverlay(const char* mode, char* buf, size_t bufSize)
|
||||
{
|
||||
// call original first to populate the buffer
|
||||
GetStreamOverlay(mode, buf, bufSize);
|
||||
|
||||
s_StreamOverlayBuf = std::string(buf);
|
||||
}
|
||||
#endif
|
||||
|
||||
void RTech_Utils_Attach()
|
||||
{
|
||||
#if not defined DEDICATED && defined (GAMEDLL_S3)
|
||||
DetourAttach((LPVOID*)&RTech_CreateDXTexture, &RTech::CreateDXTexture);
|
||||
DetourAttach((LPVOID*)&GetStreamOverlay, &RTech_GetStreamOverlay);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -676,7 +665,6 @@ void RTech_Utils_Detach()
|
||||
{
|
||||
#if not defined DEDICATED && defined (GAMEDLL_S3)
|
||||
DetourDetach((LPVOID*)&RTech_CreateDXTexture, &RTech::CreateDXTexture);
|
||||
DetourDetach((LPVOID*)&GetStreamOverlay, &RTech_GetStreamOverlay);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -452,9 +452,7 @@ inline CMemory p_RTech_CreateDXTexture;
|
||||
inline auto RTech_CreateDXTexture = p_RTech_CreateDXTexture.RCast<void(*)(RPakTextureHeader_t*, int64_t)>();
|
||||
|
||||
inline CMemory p_GetStreamOverlay;
|
||||
inline auto GetStreamOverlay = p_GetStreamOverlay.RCast<void(*)(const char*, char*, size_t)>();
|
||||
|
||||
inline std::string s_StreamOverlayBuf;
|
||||
inline auto GetStreamOverlay = p_GetStreamOverlay.RCast<void(*)(const char* mode, char* buf, size_t bufSize)>();
|
||||
#endif
|
||||
|
||||
inline RPakLoadedInfo_t* g_pLoadedPakInfo;
|
||||
|
@ -194,6 +194,7 @@ void ConVar::InitShipped(void) const
|
||||
staticProp_no_fade_scalar = g_pCVar->FindVar("staticProp_no_fade_scalar");
|
||||
staticProp_gather_size_weight = g_pCVar->FindVar("staticProp_gather_size_weight");
|
||||
stream_overlay = g_pCVar->FindVar("stream_overlay");
|
||||
stream_overlay_mode = g_pCVar->FindVar("stream_overlay_mode");
|
||||
old_gather_props = g_pCVar->FindVar("old_gather_props");
|
||||
mp_gamemode = g_pCVar->FindVar("mp_gamemode");
|
||||
hostname = g_pCVar->FindVar("hostname");
|
||||
|
@ -40,6 +40,7 @@ ConVar* r_drawWorldMeshesDepthOnly = nullptr;
|
||||
ConVar* r_drawWorldMeshesDepthAtTheEnd = nullptr;
|
||||
|
||||
ConVar* stream_overlay = nullptr;
|
||||
ConVar* stream_overlay_mode = nullptr;
|
||||
//-----------------------------------------------------------------------------
|
||||
// SERVER |
|
||||
ConVar* ai_ainDumpOnLoad = nullptr;
|
||||
|
@ -39,6 +39,7 @@ extern ConVar* r_drawWorldMeshesDepthOnly;
|
||||
extern ConVar* r_drawWorldMeshesDepthAtTheEnd;
|
||||
|
||||
extern ConVar* stream_overlay;
|
||||
extern ConVar* stream_overlay_mode;
|
||||
//-------------------------------------------------------------------------
|
||||
// SERVER |
|
||||
#ifndef CLIENT_DLL
|
||||
|
@ -218,11 +218,13 @@ void CLogSystem::DrawCrosshairMaterial(void) const
|
||||
|
||||
void CLogSystem::DrawStreamOverlay(void) const
|
||||
{
|
||||
std::string buf = s_StreamOverlayBuf;
|
||||
char buf[4096]{};
|
||||
|
||||
GetStreamOverlay(stream_overlay_mode->GetString(), buf, sizeof(buf));
|
||||
|
||||
static Color c = { 255, 255, 255, 255 };
|
||||
|
||||
CMatSystemSurface_DrawColoredText(g_pMatSystemSurface, v_Rui_GetFontFace(), m_nFontHeight, 20, 300, c.r(), c.g(), c.b(), c.a(), (char*)buf.c_str());
|
||||
CMatSystemSurface_DrawColoredText(g_pMatSystemSurface, v_Rui_GetFontFace(), m_nFontHeight, 20, 300, c.r(), c.g(), c.b(), c.a(), buf);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user