Notes
1. this is not my source code ....
No smoke CSS By Zooom
Removes 3rd person smoke so must be a few feet away.
1st person smoke still there.
Code:
DWORD Smokebase = NULL;
HRESULT WINAPI DrawIndexedPrimitive_Detour
( LPDIRECT3DDEVICE9 Device_Interface, D3DPRIMITIVETYPE Type,
INT BaseIndex, UINT MinIndex, UINT NumVertices,
UINT StartIndex, UINT PrimitiveCount)
{
LPDIRECT3DVERTEXBUFFER9 Stream_Data;
LPDIRECT3DBASETEXTURE9 pTexture = NULL;
UINT Offset = 0;
UINT Stride = 0;
if(Device_Interface->GetStreamSource(0, &Stream_Data, &Offset, &Stride) == D3D_OK)
Stream_Data->Release();
Device_Interface->GetTexture( 0, &pTexture );
DWORD dwTexture = (DWORD)pTexture;
if( pTexture ) pTexture->Release();
if( NumVertices == 256 && PrimitiveCount == 128 && Stride == 48 )
{
Smokebase = dwTexture;
}
if( Smokebase && Smokebase == dwTexture )
return D3D_OK;
return DrawIndexedPrimitive_Pointer( Device_Interface, Type, BaseIndex,
MinIndex, NumVertices, StartIndex, PrimitiveCount );
}