16
July 2023
July 3
Contagion Lite - Updated
July 3
Contagion Lite - Updated
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
void CClientVirtualReality::Deactivate()
{
if( !UseVR() )
return;
g_pSourceVR->Deactivate();
g_pMatSystemSurface->ForceScreenSizeOverride(false, 0, 0 );
g_pMaterialSystem->GetRenderContext()->Viewport( 0, 0, m_nNonVRWidth, m_nNonVRHeight );
g_pMatSystemSurface->SetFullscreenViewportAndRenderTarget( 0, 0, m_nNonVRWidth, m_nNonVRHeight, NULL );
static ConVarRef cl_software_cursor( "cl_software_cursor" );
void __thiscall sub_100F7700(_DWORD *this)
{
int RenderContext; // eax
if ( dword_1058D9B4 && (*(*dword_1058D9B4 + 36))(dword_1058D9B4) )
{
(*(*dword_1058D9B4 + 104))(dword_1058D9B4);
(*(*g_pMatSystemSurface + 544))(g_pMatSystemSurface, 0, 0, 0);
RenderContext = (*(*g_pMaterialSystem + 412))(g_pMaterialSystem);
(*(*RenderContext + 152))(RenderContext, 0, 0, this[128], this[129]);
(*(*g_pMatSystemSurface + 704))(g_pMatSystemSurface, 0, 0, this[128], this[129], 0);
if ( (dword_1058F218 & 1) == 0 )
{
dword_1058F218 |= 1u;
sub_10341DF0("cl_software_cursor");
class CMaterialRenderContext
{
public:
BYTE pad0[0xc];
void** pad1;
uintptr_t RenderEntity;
__forceinline void* GetCurrentEnt()
{
if (RenderEntity == 0)
return nullptr;
return (void*)(RenderEntity - 4);
}
};
HRESULT __stdcall MyDrawIndexedPrimitive(IDirect3DDevice9* Device, D3DPRIMITIVETYPE PrimType, int BaseVertexIndex, unsigned int MinIndex, unsigned int NumVertices, unsigned int StartIndex, unsigned int PrimitiveCount)
{
if (!chams)
return OriginalDrawIndexedPrimitive(Device, PrimType, BaseVertexIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount);
bool FillChanged = false;
static SourceEngine::CMaterialRenderContext* RenderCtx = nullptr;
if (!IsValidPointer(RenderCtx))
{
DbgLog(L"[Dx9 Dip] Trying to find Render Ctx\n");
//TODO: If the vfunc is called, it needs releaseing because its refcounted
RenderCtx = SourceEngine::s_Material->GetRenderContext();
}
if (IsValidPointer(RenderCtx))
{
SourceEngine::CValveEnt* Ent = (SourceEngine::CValveEnt*)RenderCtx->GetCurrentEnt();