_=Gigant=_
Well-known member
- Joined
- Mar 21, 2017
- Messages
- 353
- Reaction score
- 16
Code:
HRESULT proxyIDirect3DDevice9::DrawIndexedPrimitive ( D3DPRIMITIVETYPE PrimitiveType, INT BaseVertexIndex,
UINT MinVertexIndex, UINT NumVertices, UINT startIndex,
UINT primCount )
{
DWORD dwRet_addr = ( DWORD ) _ReturnAddress();
//////////////////////////////////////////////////////////////////
if (bTroughtWalls && !cheat_state->_generic.cheat_panic_enabled)
{
// actors
if (dwRet_addr == 0x761142)
{
origIDirect3DDevice9->SetRenderState(D3DRS_ZENABLE, false);
// actor behind wall
origIDirect3DDevice9->SetRenderState(D3DRS_FILLMODE, D3DFILL_SOLID);
origIDirect3DDevice9->DrawIndexedPrimitive(PrimitiveType, BaseVertexIndex, MinVertexIndex, NumVertices,
startIndex, primCount);
// actor infront wall
origIDirect3DDevice9->SetRenderState(D3DRS_ZENABLE, true);
origIDirect3DDevice9->DrawIndexedPrimitive(PrimitiveType, BaseVertexIndex, MinVertexIndex, NumVertices,
startIndex, primCount);
return origIDirect3DDevice9->SetRenderState(D3DRS_FILLMODE, D3DFILL_SOLID);
}
}
///////////////////////////////////////////////////////////////////
return origIDirect3DDevice9->DrawIndexedPrimitive( PrimitiveType, BaseVertexIndex, MinVertexIndex, NumVertices,
startIndex, primCount );
}
cool stuff :3