Results 1 to 2 of 2
  1. #1
    Coders (+)_'s Avatar
    Join Date
    Jan 2010
    Location
    Earth
    Posts
    455

    Lightbulb D3d trigger final

    D3D TRIGGER FINAL
    By: SOH
    Credits: aBnet/UC/GD
    Game: Call of Duty 4
    Date: October 2 , 2013

    Works very good for D3D!
    Adjust to your needs.
    No FPS Loss!



    Main.h
    Code:
    #include <windows.h>
    #include <d3d9.h>
    #include <d3dx9.h>
    
    #pragma comment(lib, "d3d9.lib")
    #pragma comment(lib, "d3dx9.lib")
    
    #define D3DGetPixel( dwBits, scry, scrx, BPPIXEL, iPitch ) \
    	(PDWORD)( (dwBits) + ( ( (scry) * (iPitch) ) + ( (scrx) * ( (BPPIXEL) / 8 ) ) ) )
    
    #define D3D_RELEASE(D3D_PTR) if( D3D_PTR )\
    	{ D3D_PTR->Release( ); D3D_PTR	= NULL; }
    
    //#define DEBUG_STRETCHRECT
    #define TRIGGER_D3D
    
    VOID WINAPI HkD3D( PDWORD vTable );
    void *DetourFunc(BYTE *src, const BYTE *dst, const int len);
    Main.cpp
    Code:
    #include "Main.h"
    
    bool WINAPI bDataCompare( const BYTE* pData, const BYTE* bMask, const char* szMask )
    {
    	for( ; *szMask; ++szMask, ++pData, ++bMask )
    	{
    		if( *szMask == 'x' && *pData != *bMask )
    		{
    			return false;
    		}
    	}
    	return (*szMask) == NULL;
    }
    
    DWORD WINAPI dwFindPattern( DWORD dwAddress, DWORD dwSize, BYTE* pbMask, char* szMask )
    {
    	for( DWORD i = NULL; i < dwSize; i++ )
    	{
    		if( bDataCompare( (BYTE*)( dwAddress + i ), pbMask, szMask ) )
    		{
    			return (DWORD)( dwAddress + i );
    		}
    	}
    	return 0;
    }
    
    VOID WINAPI GetD3D( VOID )
    {
    	DWORD D3D9		= (DWORD)
    		LoadLibraryA( "d3d9.dll" );
    
    	Sleep( 1000 );
    
    	DWORD D3DPattern		= dwFindPattern( D3D9, 0x128000, 
    		(PBYTE)"\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x00\x00\x89\x86", 
    			"xx????xx????xx" );
    
    	while( !*(PDWORD)(D3DPattern+2) )
    		Sleep( 500 );
    
    	HkD3D( (PDWORD)*(PDWORD)(D3DPattern+2) );
    }
    
    void *DetourFunc(BYTE *src, const BYTE *dst, const int len)
    {
    	BYTE *jmp = (BYTE*)malloc(len+5);
    	DWORD dwback;
    
    	VirtualProtect(src, len, PAGE_READWRITE, &dwback);
    
    	memcpy(jmp, src, len);	jmp += len;
    	
    	jmp[0] = 0xE9;
    	*(DWORD*)(jmp+1) = (DWORD)(src+len - jmp) - 5;
    
    	src[0] = 0xE9;
    	*(DWORD*)(src+1) = (DWORD)(dst - src) - 5;
    
    	VirtualProtect(src, len, dwback, &dwback);
    
    	return (jmp-len);
    }
    
    BOOL WINAPI DllMain( HINSTANCE hModule, DWORD dwReason, LPVOID lpvReserved )
    {
    	if( dwReason == DLL_PROCESS_ATTACH )
    	{
    		DisableThreadLibraryCalls( hModule );
    		CreateThread( 0, 0, (LPTHREAD_START_ROUTINE)GetD3D, 0, 0, 0);
    	}
    
    	return TRUE;
    }
    D3D.cpp
    Code:
    #include "Main.h"
    #include "Models.h"
    
    /*
    	D3D TRIGGER FINAL
    	By: SOH
    	Credits: aBnet/UC/GD
    	Game: Call of Duty 4
    	Date: October 2 , 2013
    */
    
    HRESULT (WINAPI* pReset)(LPDIRECT3DDEVICE9, D3DPRESENT_PARAMETERS*);
    HRESULT (WINAPI* pEndScene)(LPDIRECT3DDEVICE9);
    HRESULT (WINAPI* pDrawPrim)(LPDIRECT3DDEVICE9, D3DPRIMITIVETYPE, INT, UINT, UINT, UINT, UINT);
    HRESULT (WINAPI* pPresent)(LPDIRECT3DSWAPCHAIN9, CONST RECT*, CONST RECT*, HWND, CONST RGNDATA*, DWORD );
    
    LPDIRECT3DSWAPCHAIN9 pSwap					= NULL;
    LPDIRECT3DDEVICE9 pDev							= NULL;
    DWORD ScreenHeightHalf								= NULL;
    DWORD ScreenWidthHalf								= NULL;
    
    FLOAT FSizeX												= NULL;
    FLOAT FSizeY												= NULL;
    
    BOOL BDepth												= FALSE;
    BOOL BAimThr												= FALSE;
    BOOL BFiring												= FALSE;
    INT iTeam														= 1;
    DWORD TrigTime											= 0;
    
    D3DVIEWPORT9 VP										= {NULL};
    
    LPDIRECT3DSURFACE9 pRender					= NULL;
    LPDIRECT3DSURFACE9 pStencil					= NULL;
    LPDIRECT3DSURFACE9 pAim							= NULL;
    LPDIRECT3DSURFACE9 pOff							= NULL;
    
    LPDIRECT3DSURFACE9 pTrig							= NULL;
    LPDIRECT3DSURFACE9 pTrigOff					= NULL;
    
    HRESULT WINAPI DrawPrim( LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE Type, INT Base, 
                                               UINT Min, UINT NumVertices, UINT Start, UINT PrimitiveCount )
    {
    	LPDIRECT3DVERTEXBUFFER9 Stream		= NULL;
    	UINT Offset			= 0;
    	UINT Stride			= 0;
    
    	if( !pSwap )
    		pDevice->GetSwapChain( 0, &pSwap );
    
    	if( pDevice->GetStreamSource( 0, &Stream, &Offset, &Stride ) == D3D_OK )
    		Stream->Release( );
    
    	if( BDepth && Stride == 32 )
    	{
    		if( (iTeam == 1 && (OpForces || MI28)) || (iTeam == 2 && (Marine_Sas || COBRA)) ||
    			(iTeam == 3 && (Spetznas || MI28)) || (iTeam == 4 && (Sas || COBRA)) )
    		{
    			LPDIRECT3DSURFACE9 pRen					= NULL;
    			LPDIRECT3DSURFACE9 pSten				= NULL;
    
    			if( pDevice->GetRenderTarget( 0, &pRen ) == D3D_OK )
    			{
    				if( pDevice->GetDepthStencilSurface( &pSten ) == D3D_OK )
    				{
    					pDevice->SetRenderTarget( 0, pRender );
    					pDevice->SetDepthStencilSurface( pStencil );
    
    					if( BAimThr )
    					{
    						pDevice->SetRenderState( D3DRS_ZENABLE, FALSE );
    						pDrawPrim( pDevice, Type, Base, Min, 
    							NumVertices, Start, PrimitiveCount );
    						pDevice->SetRenderState( D3DRS_ZENABLE, TRUE );
    					}
    
    					pDrawPrim( pDevice, Type, Base, Min, 
    						NumVertices, Start, PrimitiveCount );
    
    					pDevice->SetRenderTarget( 0, pRen );
    					pDevice->SetDepthStencilSurface( pSten );
    
    					D3D_RELEASE( pSten )
    				}
    
    				D3D_RELEASE( pRen )
    			}
    		}
    	}
    
    	return pDrawPrim( pDevice, Type, Base, Min, NumVertices, Start, PrimitiveCount );
    }
    
    HRESULT WINAPI Reset( LPDIRECT3DDEVICE9 pDevice, 
    					 D3DPRESENT_PARAMETERS* PPR )
    {
    	D3D_RELEASE( pRender )
    	D3D_RELEASE( pStencil )
    	D3D_RELEASE( pAim )
    	D3D_RELEASE( pOff )
    	D3D_RELEASE( pTrig )
    	D3D_RELEASE( pTrigOff )
    	return pReset( pDevice, PPR );
    }
    
    VOID WINAPI CreateSurface( LPDIRECT3DDEVICE9 pDevice )
    {
    	if( !pRender || !pStencil || !pAim || !pOff || !pTrig || !pTrigOff )
    	{
    		LPDIRECT3DSURFACE9 pRen						= NULL;
    		LPDIRECT3DSURFACE9 pSten					= NULL;
    
    		FSizeX			= (FLOAT)VP.Width / 10.0f;
    		FSizeY			= (FLOAT)VP.Height / 10.0f;
    
    		D3DSURFACE_DESC RDESC;
    		D3DSURFACE_DESC SDESC;
    
    		memset( &RDESC, 0, sizeof(D3DSURFACE_DESC) );
    		memset( &SDESC, 0, sizeof(D3DSURFACE_DESC) );
    
    		if( pDevice->GetRenderTarget( 0, &pRen ) == D3D_OK )
    		if( pRen->GetDesc( &RDESC ) == D3D_OK )
    		{
    			if( !pRender )
    				pDevice->CreateRenderTarget( RDESC.Width, RDESC.Height,
    					D3DFMT_A8R8G8B8, RDESC.MultiSampleType, RDESC.MultiSampleQuality,
    						FALSE, &pRender, NULL);
    		}
    
    		if( pDevice->GetDepthStencilSurface( &pSten ) == D3D_OK )
    		if( pSten->GetDesc( &SDESC ) == D3D_OK )
    		{
    			if( !pStencil )
    				pDevice->CreateDepthStencilSurface( SDESC.Width, SDESC.Height,
    					SDESC.Format, SDESC.MultiSampleType, SDESC.MultiSampleQuality, 
    						FALSE, &pStencil, NULL );
    		}
    		
    		if( !pAim )
    			pDevice->CreateRenderTarget( (DWORD)FSizeX, (DWORD)FSizeY,
    				D3DFMT_A8R8G8B8, D3DMULTISAMPLE_NONE, 0, 
    						FALSE, &pAim, NULL);
    
    		if( !pOff )
    			pDevice->CreateOffscreenPlainSurface( (DWORD)FSizeX, (DWORD)FSizeY,
    				D3DFMT_A8R8G8B8, D3DPOOL_SYSTEMMEM, &pOff, NULL );
    
    		if( !pTrig )
    			pDevice->CreateRenderTarget( 10, 10, D3DFMT_A8R8G8B8, 
    				D3DMULTISAMPLE_NONE, 0, FALSE, &pTrig, NULL);
    
    		if( !pTrigOff )
    			pDevice->CreateOffscreenPlainSurface( 10, 10, D3DFMT_A8R8G8B8, 
    				D3DPOOL_SYSTEMMEM, &pTrigOff, NULL );
    
    		D3D_RELEASE( pRen )
    		D3D_RELEASE( pSten )
    	}
    }
    
    BOOL WINAPI GetDepth( LPDIRECT3DDEVICE9 pDevice )
    {
    	if( !pStencil )
    		return FALSE;
    
    	LPDIRECT3DSURFACE9 pSten					= NULL;
    	BOOL Result												= FALSE;
    
    	if( pDevice->GetDepthStencilSurface( &pSten ) == D3D_OK )
    	{
    		if( SUCCEEDED(pDevice->StretchRect( pSten, NULL, pStencil, NULL, D3DTEXF_NONE )) )
    			Result			= TRUE;
    
    		D3D_RELEASE( pSten )
    	}
    	else
    		return FALSE;
    
    	return Result;
    }
    
    BOOL WINAPI Trigger( LPDIRECT3DDEVICE9 pDevice )
    {
    	if( !pTrig || !pTrigOff )
    		return FALSE;
    
    	D3DLOCKED_RECT D3DLR	= {NULL};
    	BOOL Result		= FALSE;
    	BOOL Fire			= FALSE;
    	RECT RTR			= {ScreenWidthHalf - 5,ScreenHeightHalf - 5,
    								ScreenWidthHalf + 5,ScreenHeightHalf + 5};
    
    	if( SUCCEEDED(pDevice->StretchRect( pRender, &RTR, 
    		pTrig, NULL, D3DTEXF_NONE )) )
    	{
    		if( SUCCEEDED(pDevice->GetRenderTargetData( pTrig, pTrigOff )) )
    		{
    			if( SUCCEEDED( pTrigOff->LockRect( &D3DLR, 
    				NULL, D3DLOCK_DISCARD )) )
    			{
    				for( long y = 0;y < 10;y++ )
    				{
    					for( long x = 0;x < 10;x++ )
    					{
    						PDWORD Pixel		= D3DGetPixel( (DWORD)
    							D3DLR.pBits, y, x, 32, D3DLR.Pitch );
    
    						if( *Pixel ) Fire			= TRUE;
    					}
    				}
    				pTrigOff->UnlockRect( );
    				Result		= TRUE;
    			}
    		}
    	}
    
    	if( Fire ) 
    	{
    		if( !BFiring )
    		{
    			mouse_event( MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0 );
    			mouse_event( MOUSEEVENTF_LEFTUP, 0, 0, 0, 0 );
    
    			TrigTime	= GetTickCount( );
    			BFiring		= TRUE;
    		}
    		else
    		{
    			if( GetTickCount( ) - TrigTime > 150 )
    				BFiring		= FALSE;
    		}
    	}
    	else
    	{
    		if( BFiring )
    			mouse_event( MOUSEEVENTF_LEFTUP, 0, 0, 0, 0 );
    
    		BFiring		= FALSE;
    	}
    
    	return Result;
    }
    
    VOID WINAPI ClearRenTarget( LPDIRECT3DDEVICE9 pDevice )
    {
    	if( pRender )
    	{
    		LPDIRECT3DSURFACE9 pRen					= NULL;
    		LPDIRECT3DSURFACE9 pSten				= NULL;
    
    		if( pDevice->GetRenderTarget( 0, &pRen ) == D3D_OK )
    		{	
    
    #ifdef TRIGGER_D3D
    			Trigger( pDevice );
    #endif
    
    #ifdef DEBUG_STRETCHRECT
    			RECT Debug		= {(VP.Width - (VP.Width / 4)) - 10,
    										10,VP.Width - 10,VP.Height / 4 + 10};
    
    			pDevice->StretchRect( pRender, NULL, pRen, &Debug, D3DTEXF_NONE );
    #endif
    
    			if( pDevice->GetDepthStencilSurface( &pSten ) == D3D_OK )
    			{
    				pDevice->SetRenderTarget( 0, pRender );
    				pDevice->SetDepthStencilSurface( pSten );
    
    				pDev->Clear( 0, NULL, D3DCLEAR_TARGET, 
    					D3DCOLOR_ARGB( 0, 0, 0, 0 ), 0,  0 ); 
    
    				pDevice->SetRenderTarget( 0, pRen );
    				pDevice->SetDepthStencilSurface( pSten );
    
    				D3D_RELEASE( pSten )
    			}
    
    			D3D_RELEASE( pRen )
    		}
    	}
    }
    
    VOID WINAPI KeyState( VOID )
    {
    	if( GetAsyncKeyState( VK_F1 ) &1 )
    		if( iTeam < 4 ) iTeam++;
    		else iTeam	= 1;
    }
    
    HRESULT WINAPI Present( LPDIRECT3DSWAPCHAIN9 pSwapChain, 
    					   CONST RECT* pSourceRect, CONST RECT* pDestRect, 
    						HWND hDestWindowOverride, CONST RGNDATA* pDirtyRegion, 
    							DWORD dwFlags )
    {
    
    	if( SUCCEEDED(pSwapChain->GetDevice( &pDev )) )
    	{
    		CreateSurface( pDev );
    		pDev->GetViewport( &VP );
    
    		BDepth									= GetDepth( pDev );
    
    		ScreenWidthHalf					=	VP.Width / 2;
    		ScreenHeightHalf					=	VP.Height / 2;
    
    		D3DRECT CrssRctA = {ScreenWidthHalf,ScreenHeightHalf -  5,
    										ScreenWidthHalf + 1,ScreenHeightHalf + 6};
    
    		pDev->Clear( 1, &CrssRctA, D3DCLEAR_TARGET, 
    			D3DCOLOR_ARGB( 255, 255, 20, 20 ), 0,  0 );
    
    		D3DRECT CrssRctB = {ScreenWidthHalf -  5,ScreenHeightHalf,
    										ScreenWidthHalf + 6,ScreenHeightHalf + 1};
    
    		pDev->Clear( 1, &CrssRctB, D3DCLEAR_TARGET, 
    			D3DCOLOR_ARGB( 255, 255, 20, 20 ), 0,  0 ); 
    	
    		ClearRenTarget( pDev );
    
    		KeyState( );
    	}
    
    	return pPresent( pSwapChain, pSourceRect, pDestRect, 
    		hDestWindowOverride, pDirtyRegion, dwFlags );
    }
    
    VOID WINAPI HkD3D( PDWORD vTable )
    {
    	*(PDWORD)&pDrawPrim	= (DWORD)DetourFunc( PBYTE(vTable[82]), PBYTE(DrawPrim), 5 );
    	*(PDWORD)&pReset			= (DWORD)DetourFunc( PBYTE(vTable[16]), PBYTE(Reset), 5 );
    
    	while( !pSwap )
    		Sleep( 500 );
    
    	PDWORD pSwapVTable		= *(DWORD**)pSwap;
    
    	*(PDWORD)&pPresent		= (DWORD)DetourFunc( PBYTE(pSwapVTable[3]), PBYTE(Present), 5 );
    }
    Models.h
    Code:
    #define OpForces ( Stride == 32 && ( Opfor_Assault || Opfor_SpecOps || Opfor_Gunner || Opfor_Demo || Opfor_Sniper ) )
    #define Marine_Sas ( Stride == 32 && ( MarSas_Assault || MarSas_SpecOps || MarSas_Gunner || MarSas_Demo || MarSas_Sniper ) )
    #define Spetznas ( Stride == 32 && ( Spetz_Assault || Spetz_SpecOps || Spetz_Gunner || Spetz_Demo || Spetz_Sniper || Spetz_Sniper2 ) )
    #define Sas ( Stride == 32 && ( Sas_Assault || Sas_SpecOps || Sas_Gunner || Sas_Demo || Sas_Sniper || Sas_Sniper2 ) )
    
    #define Opfor_Assault ( Opfor_Assault_Head || Opfor_Assault_Body || Opfor_Assault_Helmet_Scarf || Opfor_Assault_Body_Dynamic_LOD )
    #define Opfor_SpecOps ( Opfor_SpecOps_Head || Opfor_SpecOps_Body || Opfor_SpecOps_Body_Dynamic_LOD )
    #define Opfor_Gunner ( Opfor_Gunner_Head || Opfor_Gunner_Body || Opfor_Gunner_Hat || Opfor_Gunner_Body_Dynamic_LOD )
    #define Opfor_Demo ( Opfor_Demo_Head || Opfor_Demo_Body || Opfor_Demo_Scarf || Opfor_Demo_Vest || Opfor_Demo_Body_Dynamic_LOD )
    #define Opfor_Sniper ( Opfor_Sniper_Head || Opfor_Sniper_Body || Opfor_Sniper_Hat_Scarf || Opfor_Sniper_Body_Dynamic_LOD)
    
    #define MarSas_Assault ( MarSas_Assault_Head || MarSas_Assault_Body || MarSas_Assault_Hand || MarSas_Assault_Hat || MarSas_Assault_Body_Dynamic_LOD )
    #define MarSas_SpecOps ( MarSas_SpecOps_Head || MarSas_SpecOps_Body || MarSas_SpecOps_Hand_ETC || MarSas_SpecOps_Body_Dynamic_LOD )
    #define MarSas_Gunner ( MarSas_Gunner_Head || MarSas_Gunner_Body || MarSas_Gunner_Hand_ETC || MarSas_Gunner_Hat || MarSas_Gunner_Body_Dynamic_LOD )
    #define MarSas_Demo ( MarSas_Demo_Head || MarSas_Demo_Body || MarSas_Demo_Hand_ETC || MarSas_Demo_Body_Dynamic_LOD )
    #define MarSas_Sniper ( MarSas_Sniper_Head || MarSas_Sniper_Body || MarSas_Sniper_Hand || MarSas_Sniper_Body_Dynamic_LOD )
    
    #define Spetz_Assault ( Spetz_Assault_Head || Spetz_Assault_Body || Spetz_Assault_Hand || Spetz_Assault_Body_DLOD )
    #define Spetz_SpecOps ( Spetz_SpecOps_Head || Spetz_SpecOps_Body || Spetz_SpecOps_Hand|| Spetz_SpecOps_Body_DLOD )
    #define Spetz_Gunner ( Spetz_Gunner_Head || Spetz_Gunner_Body || Spetz_Gunner_Hand || Spetz_Gunner_Acc || Spetz_Gunner_Body_DLOD )
    #define Spetz_Demo ( Spetz_Demo_Head || Spetz_Demo_Body || Spetz_Demo_Hand || Spetz_Demo_Acc || Spetz_Demo_Body_DLOD )
    #define Spetz_Sniper ( Spetz_Sniper_Head || Spetz_Sniper_Body || Spetz_Sniper_Hand || Spetz_Sniper_Body_DLOD || Spetz_Sniper_Camo )
    #define Spetz_Sniper2 ( Spetz_Sniper2_Head || Spetz_Sniper2_Body || Spetz_Sniper2_Hand || Spetz_Sniper2_Body_DLOD )
    
    #define Sas_Assault (Sas_Assault_Head || Sas_Assault_Body || Sas_Assault_Body_DLOD )
    #define Sas_SpecOps ( Sas_SpecOps_Head || Sas_SpecOps_Body || Sas_SpecOps_Body_DLOD )
    #define Sas_Gunner ( Sas_Gunner_Head || Sas_Gunner_Body || Sas_Gunner_Body_DLOD )
    #define Sas_Demo ( Sas_Demo_Head || Sas_Demo_Body || Sas_Demo_Body_DLOD )
    #define Sas_Sniper ( Sas_Sniper_Head || Sas_Sniper_Body || Sas_Sniper_Hand || Sas_Sniper_Body_Dynamic_LOD || Sas_Sniper_Hand_Dynamic_LOD || Sas_Sniper_Camo )
    #define Sas_Sniper2 ( Sas_Sniper2_Head || Sas_Sniper2_Body || Sas_Sniper2_Body_DLOD )
    
    #define Opfor_Assault_Head \
    (( NumVertices == 776 && PrimitiveCount == 1212 ) ||  /*Head*/ \
    ( NumVertices == 440 && PrimitiveCount == 616 ))  /*Head DLOD*/
    
    #define Opfor_Assault_Body \
    (( NumVertices == 3124 && PrimitiveCount == 4132 ) ||  /*Body*/ \
    ( NumVertices == 842 && PrimitiveCount == 1276 ) ||  /*Hand*/ \
    ( NumVertices == 1970 && PrimitiveCount == 2186 ) ||  /*Body DLOD*/ \
    ( NumVertices == 544 && PrimitiveCount == 696 ))  /*Hand DLOD*/
    
    #define Opfor_Assault_Helmet_Scarf \
    (( NumVertices == 202 && PrimitiveCount == 324 ) ||  /*Helmet*/ \
    ( NumVertices == 282 && PrimitiveCount == 376 ) ||  /*Scarf*/ \
    ( NumVertices == 142 && PrimitiveCount == 132 ) ||  /*Helmet Strap*/ \
    ( NumVertices == 125 && PrimitiveCount == 160 ) ||  /*Helmet DLOD*/ \
    ( NumVertices == 153 && PrimitiveCount == 190 ) ||  /*Scarf DLOD*/\
    ( NumVertices == 112 && PrimitiveCount == 96 ))  /*Helmet Strap DLOD*/
    
    #define Opfor_Assault_Body_Dynamic_LOD \
    (( NumVertices == 1252 && PrimitiveCount == 1160 ) ||  /*Body Near*/ \
    ( NumVertices == 780 && PrimitiveCount == 780 ) ||  /*Hand & Head Near*/ \
    ( NumVertices == 470 && PrimitiveCount == 352 ) ||  /*Body Far*/ \
    ( NumVertices == 151 && PrimitiveCount == 118 ))  /*Hand & Head Far*/
    
    ////////////////////////////////////////////////////
    
    #define Opfor_SpecOps_Head \
    (( NumVertices == 830 && PrimitiveCount == 1206 ) ||  /*Head*/ \
    ( NumVertices == 491 && PrimitiveCount == 700 ))  /*Head DLOD*/
    
    #define Opfor_SpecOps_Body \
    (( NumVertices == 3531 && PrimitiveCount == 4526 ) ||  /*Body*/ \
    ( NumVertices == 760 && PrimitiveCount == 1192 ) ||  /*Hand*/ \
    ( NumVertices == 2188 && PrimitiveCount == 2386 ) ||  /*Body DLOD*/ \
    ( NumVertices == 422 && PrimitiveCount == 584 ))  /*Hand DLOD*/
    
    #define Opfor_SpecOps_Body_Dynamic_LOD \
    (( NumVertices == 103 && PrimitiveCount == 130 ) ||  /*Face Piece Near*/ \
    ( NumVertices == 1325 && PrimitiveCount == 1194 ) ||  /*Body Near*/ \
    ( NumVertices == 504 && PrimitiveCount == 536 ) ||  /*Head & Hand Near*/ \
    ( NumVertices == 499 && PrimitiveCount == 352 ) ||  /*Body Far*/ \
    ( NumVertices == 174 && PrimitiveCount == 182 ))  /*Head hanf Far*/
    
    ////////////////////////////////////////////////////
    
    #define Opfor_Gunner_Head \
    (( NumVertices == 928 && PrimitiveCount == 1392 ) ||  /*Head*/ \
    ( NumVertices == 602 && PrimitiveCount == 800 ))  /*Head DLOD*/
    
    #define Opfor_Gunner_Body \
    (( NumVertices == 2715 && PrimitiveCount == 3588 ) ||  /*Body*/ \
    ( NumVertices == 767 && PrimitiveCount == 1192 ) ||  /*Hand*/ \
    ( NumVertices == 1620 && PrimitiveCount == 1886 ) ||  /*Body DLOD*/ \
    ( NumVertices == 429 && PrimitiveCount == 584 ))  /*Hand DLOD*/
    
    #define Opfor_Gunner_Hat \
    (( NumVertices == 251 && PrimitiveCount == 304 ) ||  /*Hat*/ \
    ( NumVertices == 155 && PrimitiveCount == 138 ))  /*Hat DLOD*/
    
    #define Opfor_Gunner_Body_Dynamic_LOD \
    (( NumVertices == 943 && PrimitiveCount == 908 ) ||  /*Body Near*/ \
    ( NumVertices == 622 && PrimitiveCount == 612 ) ||  /*Head & Hand Near*/ \
    ( NumVertices == 441 && PrimitiveCount == 308 ) ||  /*Body Far*/ \
    ( NumVertices == 119 && PrimitiveCount == 86 ))  /*Head & Hand Far*/
    
    ////////////////////////////////////////////////////
    
    #define Opfor_Demo_Head \
    (( NumVertices == 808 && PrimitiveCount == 1220 ) ||  /*Head*/ \
    ( NumVertices == 540 && PrimitiveCount == 812 ))  /*Head DLOD*/
    
    #define Opfor_Demo_Body \
    (( NumVertices == 2816 && PrimitiveCount == 3642 ) ||  /*Body*/ \
    ( NumVertices == 760 && PrimitiveCount == 1192 ) ||  /*Hand*/ \
    ( NumVertices == 1773 && PrimitiveCount == 2022 ) ||  /*Body DLOD*/ \
    ( NumVertices == 422 && PrimitiveCount == 584 ))  /*Hand DLOD*/
    
    #define Opfor_Demo_Scarf \
    (( NumVertices == 280 && PrimitiveCount == 376 ) ||  /*Scarf*/ \
    ( NumVertices == 152 && PrimitiveCount == 190 ))  /*Scarf DLOD*/
    
    #define Opfor_Demo_Vest \
    (( NumVertices == 793 && PrimitiveCount == 796 ) ||  /*Vest*/ \
    ( NumVertices == 486 && PrimitiveCount == 412 ) ||  /*Vest DLOD Near*/ \
    ( NumVertices == 237 && PrimitiveCount == 216 ))  /*Vest DLOD Far*/
    
    #define Opfor_Demo_Body_Dynamic_LOD \
    (( NumVertices == 1150 && PrimitiveCount == 1086 ) ||  /*Body DLOD Near*/ \
    ( NumVertices == 648 && PrimitiveCount == 744 ) ||  /*Hand DLOD Near*/ \
    ( NumVertices == 435 && PrimitiveCount == 320 ) ||  /*Body DLOD Far*/ \
    ( NumVertices == 95 && PrimitiveCount == 94 ))  /*Hand DLOD Far*/
    
    ////////////////////////////////////////////////////
    
    #define Opfor_Sniper_Head \
    (( NumVertices == 890 && PrimitiveCount == 1390 ) ||  /*Head*/ \
    ( NumVertices == 539 && PrimitiveCount == 760 ) ||  /*Head DLOD Near*/ \
    ( NumVertices == 52 && PrimitiveCount == 28 ))  /*Eyeball DLOD Near*/
    
    #define Opfor_Sniper_Body \
    (( NumVertices == 2818 && PrimitiveCount == 3672 ) ||  /*Body*/ \
    ( NumVertices == 760 && PrimitiveCount == 1192 ) ||  /*Hand*/ \
    ( NumVertices == 1715 && PrimitiveCount == 1950 ) ||  /*Body DLOD*/ \
    ( NumVertices == 422 && PrimitiveCount == 584 ))  /*Hand DLOD*/
    
    #define Opfor_Sniper_Hat_Scarf \
    (( NumVertices == 250 && PrimitiveCount == 304 ) ||  /*Hat*/ \
    ( NumVertices == 281 && PrimitiveCount == 376 ) ||  /*Scarf*/ \
    ( NumVertices == 150 && PrimitiveCount == 142 ) ||  /*Hat DLOD*/ \
    ( NumVertices == 153 && PrimitiveCount == 190 ))  /*Scarf DLOD*/
    
    #define Opfor_Sniper_Body_Dynamic_LOD \
    (( NumVertices == 1101 && PrimitiveCount == 1066 ) ||  /*Body DLOD Near*/ \
    ( NumVertices == 602 && PrimitiveCount == 692 ) ||  /*Head & Hand DLOD Near*/ \
    ( NumVertices == 481 && PrimitiveCount == 350 ) ||  /*Body DLOD Far*/ \
    ( NumVertices == 135 && PrimitiveCount == 116 ))  /*Head & Hand DLOD Far*/
    
    ////////////////////////////////////////////////////
    
    #define MarSas_Assault_Head \
    (( NumVertices == 1001 && PrimitiveCount == 964 ) ||  /*Helmet*/ \
    ( NumVertices == 1092 && PrimitiveCount == 1402 ) ||  /*Head*/ \
    ( NumVertices == 552 && PrimitiveCount == 452 ) ||  /*Helmet DLOD*/ \
    ( NumVertices == 638 && PrimitiveCount == 738 ))  /*Head DLOD*/
    
    #define MarSas_Assault_Body \
    (( NumVertices == 1144 && PrimitiveCount == 814 ) ||  /*Vest Acc's Explv's & Right Leg Part*/ \
    ( NumVertices == 2613 && PrimitiveCount == 3248 ) ||  /*Body*/ \
    ( NumVertices == 455 && PrimitiveCount == 448 ) ||  /*Left Hip Grenade & Bag*/ \
    ( NumVertices == 114 && PrimitiveCount == 162 ) ||  /*Right Leg Part*/ \
    ( NumVertices == 151 && PrimitiveCount == 130 ) ||  /*Right Hip Pistol & Grenades & Mag*/ \
    ( NumVertices == 713 && PrimitiveCount == 496 ) ||  /*Vest Eplsv's  Acc's DLOD*/ \
    ( NumVertices == 1842 && PrimitiveCount == 1978 ) ||  /*Body DLOD*/ \
    ( NumVertices == 281 && PrimitiveCount == 220 ))  /*Left Hip Grenades & Bag DLOD*/
    
    #define MarSas_Assault_Hand \
    (( NumVertices == 356 && PrimitiveCount == 262 ) ||  /*Goggles*/ \
    ( NumVertices == 686 && PrimitiveCount == 952 ) ||  /*Hand*/ \
    ( NumVertices == 301 && PrimitiveCount == 192 ) ||  /*Goggles DLOD*/ \
    ( NumVertices == 568 && PrimitiveCount == 698 ))  /*Hand DLOD*/
    
    #define MarSas_Assault_Hat \
    (( NumVertices == 110 && PrimitiveCount == 122 ) ||  /*Hat*/ \
    ( NumVertices == 66 && PrimitiveCount == 64 ))  /*Hat DLOD*/ 
    
    #define MarSas_Assault_Lens \
    (( NumVertices == 34 && PrimitiveCount == 30 ) ||  /*Goggles Lens*/ \
    ( NumVertices == 25 && PrimitiveCount == 22 ))  /*Goggles Lens DLOD*/ 
    
    #define MarSas_Assault_Lens_Part \
    ( NumVertices == 28 && PrimitiveCount == 28 )
    
    #define MarSas_Assault_Body_Dynamic_LOD \
    (( NumVertices == 385 && PrimitiveCount == 196 ) ||  /*Vest Explsv's & Acc's DLOD Near*/ \
    ( NumVertices == 1034 && PrimitiveCount == 904 ) ||  /*Body DLOD Near*/ \
    ( NumVertices == 180 && PrimitiveCount == 118 ) ||  /*Left Hip Grenades & Bag DLOD Near*/ \
    ( NumVertices == 1021 && PrimitiveCount == 922 ) ||  /*Head & Hand DLOD Near*/ \
    ( NumVertices == 447 && PrimitiveCount == 312 ) ||  /*Body DLOD Far*/ \
    ( NumVertices == 248 && PrimitiveCount == 176 ))  /*Head & Hand DLOD Far*/
    
    ////////////////////////////////////////////////////
    
    #define MarSas_SpecOps_Head \
    (( NumVertices == 233 && PrimitiveCount == 330 ) ||  /*Helmet*/ \
    ( NumVertices == 976 && PrimitiveCount == 1372 ) ||  /*Head*/ \
    ( NumVertices == 142 && PrimitiveCount == 174 ) ||  /*Helmet DLOD*/ \
    ( NumVertices == 513 && PrimitiveCount == 674 ))  /*Head DLOD*/
    
    #define MarSas_SpecOps_Body \
    (( NumVertices == 623 && PrimitiveCount == 592 ) ||  /*Collar & Knife & Acc's*/ \
    ( NumVertices == 3790 && PrimitiveCount == 4078 ) ||  /*Body*/ \
    ( NumVertices == 49 && PrimitiveCount == 50 ) ||  /*Wrist Watch*/ \
    ( NumVertices == 165 && PrimitiveCount == 146 ) ||  /*String Behind Body*/ \
    ( NumVertices == 2784 && PrimitiveCount == 2384 ) ||  /*Body DLOD*/ \
    ( NumVertices == 40 && PrimitiveCount == 40 ))  /*Head Camera*/
    
    #define MarSas_SpecOps_Hand_ETC \
    (( NumVertices == 599 && PrimitiveCount == 418 ) ||  /*Goggles*/ \
    ( NumVertices == 855 && PrimitiveCount == 1100 ) ||  /*Hand*/ \
    ( NumVertices == 183 && PrimitiveCount == 112 ) ||  /*Head Camera Mount*/ \
    ( NumVertices == 296 && PrimitiveCount == 188 ) ||  /*Goggles DLOD*/ \
    ( NumVertices == 834 && PrimitiveCount == 770 ))  /*Hand DLOD*/
    
    #define MarSas_SpecOps_Lens \
    (( NumVertices == 34 && PrimitiveCount == 30 ) ||  /*Lens*/ \
    ( NumVertices == 25 && PrimitiveCount == 22 ))  /*Lens DLOD*/
    
    #define MarSas_SpecOps_Body_Dynamic_LOD \
    (( NumVertices == 1572 && PrimitiveCount == 1166 ) ||  /*Body DLOD Near*/ \
    ( NumVertices == 795 && PrimitiveCount == 704 ) ||  /*Hand DLOD Near*/ \
    ( NumVertices == 634 && PrimitiveCount == 372 ) ||  /*Body DLOD Far*/ \
    ( NumVertices == 150 && PrimitiveCount == 96 ))  /*Hand DLOD Far*/
    
    ////////////////////////////////////////////////////
    
    #define MarSas_Gunner_Head \
    (( NumVertices == 828 && PrimitiveCount == 1300 ) ||  /*Head*/ \
    ( NumVertices == 493 && PrimitiveCount == 688 ))  /*Head DLOD*/
    
    #define MarSas_Gunner_Body \
    (( NumVertices == 178 && PrimitiveCount == 166 ) ||  /*Right Leg Pistol*/ \
    ( NumVertices == 3597 && PrimitiveCount == 4280 ) ||  /*Body & Acc's*/ \
    ( NumVertices == 2301 && PrimitiveCount == 2364 ))  /*Body & Acc's DLOD*/
    
    #define MarSas_Gunner_Hand_ETC \
    (( NumVertices == 394 && PrimitiveCount == 274 ) ||  /*Head Phones*/ \
    ( NumVertices == 716 && PrimitiveCount == 962 ) ||  /*Hand*/ \
    ( NumVertices == 283 && PrimitiveCount == 170 ) ||  /*Head Phones DLOD*/ \
    ( NumVertices == 596 && PrimitiveCount == 704 ))  /*Hand DLOD*/
    
    #define MarSas_Gunner_Hat \
    (( NumVertices == 275 && PrimitiveCount == 322 ) ||  /*Hat*/ \
    ( NumVertices == 127 && PrimitiveCount == 124 ))  /*Hat DLOD*/
    
    #define MarSas_Gunner_Body_Dynamic_LOD \
    (( NumVertices == 1341 && PrimitiveCount == 1132 ) ||  /*Body DLOD Near*/ \
    ( NumVertices == 802 && PrimitiveCount == 800 ) ||  /*Hand DLOD Near*/ \
    ( NumVertices == 580 && PrimitiveCount == 380 ) ||  /*Body DLOD Far*/ \
    ( NumVertices == 193 && PrimitiveCount == 140 ))  /*Hand DLOD Far*/
    
    ////////////////////////////////////////////////////
    
    #define MarSas_Demo_Head \
    (( NumVertices == 689 && PrimitiveCount == 1172 ) ||  /*Head*/ \
    ( NumVertices == 356 && PrimitiveCount == 566 ) ||  /*Head DLOD*/ \
    ( NumVertices == 6 && PrimitiveCount == 2 ))  /*Head Piece*/
    
    #define MarSas_Demo_Body \
    (( NumVertices == 306 && PrimitiveCount == 274 ) ||  /*Collar & Knife*/ \
    ( NumVertices == 4050 && PrimitiveCount == 4486 ) ||  /*Body & Acc's*/ \
    ( NumVertices == 2540 && PrimitiveCount == 2444 ))  /*Body & Acc's DLOD*/
    
    #define MarSas_Demo_Hand_ETC \
    (( NumVertices == 367 && PrimitiveCount == 298 ) ||  /*Head Phones*/ \
    ( NumVertices == 686 && PrimitiveCount == 952 ) ||  /*Hand*/ \
    ( NumVertices == 308 && PrimitiveCount == 212 ) ||  /*Head Phones DLOD*/ \
    ( NumVertices == 568 && PrimitiveCount == 698 ))  /*Hand DLOD*/
    
    #define MarSas_Demo_Body_Dynamic_LOD \
    (( NumVertices == 1488 && PrimitiveCount == 1114 ) ||  /*Body DLOD Near*/ \
    ( NumVertices == 628 && PrimitiveCount == 670 ) ||  /*Head & Hand DLOD Near*/ \
    ( NumVertices == 592 && PrimitiveCount == 374 ) ||  /*Body DLOD Far*/ \
    ( NumVertices == 105 && PrimitiveCount == 74 ))  /*Head & Hand DLOD Far*/
    
    ////////////////////////////////////////////////////
    
    #define MarSas_Sniper_Head \
    (( NumVertices == 213 && PrimitiveCount == 282 ) ||  /*Hat*/ \
    ( NumVertices == 874 && PrimitiveCount == 1228 ) ||  /*Head*/ \
    ( NumVertices == 106 && PrimitiveCount == 114 ) ||  /*Hat DLOD*/ \
    ( NumVertices == 537 && PrimitiveCount == 698 ))  /*Head DLOD*/
    
    #define MarSas_Sniper_Body \
    (( NumVertices == 681 && PrimitiveCount == 588 ) ||  /*Collar & Vest Acc's*/ \
    ( NumVertices == 2516 && PrimitiveCount == 2940 ) ||  /*Body*/ \
    ( NumVertices == 204 && PrimitiveCount == 172 ) ||  /*Vest Acc's*/ \
    ( NumVertices == 63 && PrimitiveCount == 62 ) ||  /*Wrist Watch & Hat Plate*/ \
    ( NumVertices == 337 && PrimitiveCount == 240 ) ||  /*Collar & Vest Acc's DLOD*/ \
    ( NumVertices == 1726 && PrimitiveCount == 1760 ) ||  /*Body DLOD*/ \
    ( NumVertices == 140 && PrimitiveCount == 104 ) ||  /*Vest Acc's DLOD*/ \
    ( NumVertices == 53 && PrimitiveCount == 50 ))  /*Wrist Watch & Hat Plate DLOD*/
    
    #define MarSas_Sniper_Hand \
    (( NumVertices == 822 && PrimitiveCount == 1084 ) ||  /*Hand*/ \
    ( NumVertices == 562 && PrimitiveCount == 632 ))  /*Hand DLOD*/
    
    #define MarSas_Sniper_Body_Dynamic_LOD \
    (( NumVertices == 1020 && PrimitiveCount == 872 ) ||  /*Body DLOD Near*/ \
    ( NumVertices == 635 && PrimitiveCount == 654 ) ||  /*Head & Hand DLOD Near*/ \
    ( NumVertices == 587 && PrimitiveCount == 370 ) ||  /*Body DLOD Far*/ \
    ( NumVertices == 137 && PrimitiveCount == 100 ))  /*Head & Hand DLOD Far*/
    
    ////////////////////////////////////////////////////
    
    #define Sas_Sniper_Head \
    (( NumVertices == 698 && PrimitiveCount == 1200 ) ||  /*Head*/ \
    ( NumVertices == 357 && PrimitiveCount == 566 ))  /*Head DLOD*/
    
    #define Sas_Sniper_Body \
    (( NumVertices == 438 && PrimitiveCount == 376 ) ||  /*Collar & Vest Acc's*/ \
    ( NumVertices == 2334 && PrimitiveCount == 2826 ) ||  /*Body*/ \
    ( NumVertices == 204 && PrimitiveCount == 172 ) ||  /*Vest Acc's*/ \
    ( NumVertices == 177 && PrimitiveCount == 120 ) ||  /*Vest Acc's Piece*/ \
    ( NumVertices == 1615 && PrimitiveCount == 1706 ) ||  /*Body DLOD*/ \
    ( NumVertices == 140 && PrimitiveCount == 104 ))  /*Vest Acc's DLOD*/
    
    #define Sas_Sniper_Hand \
    (( NumVertices == 822 && PrimitiveCount == 1084 ) ||  /*Hand*/ \
    ( NumVertices == 562 && PrimitiveCount == 632 ))  /*Hand DLOD*/
    
    #define Sas_Sniper_Watch \
    (( NumVertices == 49 && PrimitiveCount == 50 ) ||  /*Watch*/ \
    ( NumVertices == 40 && PrimitiveCount == 40 ))  /*Watch DLOD*/
    
    #define Sas_Sniper_Body_Dynamic_LOD \
    (( NumVertices == 1021 && PrimitiveCount == 872 ) ||  /*Body DLOD Near*/ \
    ( NumVertices == 541 && PrimitiveCount == 366 ))  /*Body DLOD Far*/
    
    #define Sas_Sniper_Hand_Dynamic_LOD \
    (( NumVertices == 470 && PrimitiveCount == 506 ) ||  /*Head & Hand DLOD Near*/ \
    ( NumVertices == 71 && PrimitiveCount == 50 ))  /*Head & Hand DLOD Far*/
    
    #define Sas_Sniper_Camo \
    (( NumVertices == 2578 && PrimitiveCount == 2192 ) ||  /*Body*/ \
    ( NumVertices == 482 && PrimitiveCount == 476 ) ||  /*Head*/ \
    ( NumVertices == 428 && PrimitiveCount == 446 ) ||  /*Head DLOD Near*/ \
    ( NumVertices == 2328 && PrimitiveCount == 1992 ) ||  /*Body DLOD Near*/ \
    ( NumVertices == 132 && PrimitiveCount == 158 ) ||  /*Head DLOD Far*/ \
    ( NumVertices == 1186 && PrimitiveCount == 1184 ) ||  /*Body DLOD Far*/ \
    ( NumVertices == 153 && PrimitiveCount == 194 ) ||  /*Head DLOD very Far*/ \
    ( NumVertices == 349 && PrimitiveCount == 254 ))  /*Body DLOD very Far*/
    
    ////////////////////////////////////////////////////
    
    #define Spetz_Assault_Head \
    (( NumVertices == 783 && PrimitiveCount == 1168 ) ||  /*Head*/ \
    ( NumVertices == 503 && PrimitiveCount == 704 ))  /*Head DLOD*/
    
    #define Spetz_Assault_Body \
    (( NumVertices == 4358 && PrimitiveCount == 4864 ) ||  /*Body*/ \
    ( NumVertices == 3278 && PrimitiveCount == 3188 ))  /*Body DLOD*/
    
    #define Spetz_Assault_Hand \
    (( NumVertices == 892 && PrimitiveCount == 1108 ) ||  /*Hand*/ \
    ( NumVertices == 584 && PrimitiveCount == 568 ))  /*Hand DLOD*/
    
    #define Spetz_Assault_Body_DLOD \
    (( NumVertices == 103 && PrimitiveCount == 130 ) ||  /*Face Piece DLOD Near*/ \
    ( NumVertices == 1633 && PrimitiveCount == 1332 ) ||  /*Body DLOD Near*/ \
    ( NumVertices == 625 && PrimitiveCount == 612 ) ||  /*Head & Hand DLOD Near*/ \
    ( NumVertices == 840 && PrimitiveCount == 618 ) ||  /*Body DLOD Far*/ \
    ( NumVertices == 288 && PrimitiveCount == 260 ))  /*Head & Hand DLOD Far*/
    
    ////////////////////////////////////////////////////
    
    #define Spetz_SpecOps_Head \
    (( NumVertices == 793 && PrimitiveCount == 834 ) ||  /*Head*/ \
    ( NumVertices == 409 && PrimitiveCount == 588 ) ||  /*Neck & Face Part*/ \
    ( NumVertices == 592 && PrimitiveCount == 532 ) ||  /*Head DLOD*/ \
    ( NumVertices == 274 && PrimitiveCount == 350 ))  /*Neck & Face Part DLOD*/
    
    #define Spetz_SpecOps_Body \
    (( NumVertices == 424 && PrimitiveCount == 346 ) ||  /*Grenade & Radio*/ \
    ( NumVertices == 4242 && PrimitiveCount == 5028 ) ||  /*Body*/ \
    ( NumVertices == 323 && PrimitiveCount == 260 ) ||  /*Grenade & Radio DLOD*/ \
    ( NumVertices == 2391 && PrimitiveCount == 2488 ))  /*Body DLOD*/
    
    #define Spetz_SpecOps_Hand \
    (( NumVertices == 796 && PrimitiveCount == 1036 ) ||  /*Hand*/ \
    ( NumVertices == 607 && PrimitiveCount == 512 ))  /*Hand DLOD*/
    
    #define Spetz_SpecOps_Lens \
    (( NumVertices == 26 && PrimitiveCount == 24 ) ||  /*Lens*/ \
    ( NumVertices == 14 && PrimitiveCount == 12 ))  /*Lens DLOD*/
    
    #define Spetz_SpecOps_Body_DLOD \
    (( NumVertices == 425 && PrimitiveCount == 316 ) ||  /*Head DLOD Near*/ \
    ( NumVertices == 1689 && PrimitiveCount == 1422 ) ||  /*Body DLOD Near*/ \
    ( NumVertices == 553 && PrimitiveCount == 544 ) ||  /*Hand & Neck & Face DLOD Near*/ \
    ( NumVertices == 384 && PrimitiveCount == 250 ) ||  /*Head DLOD Far*/ \
    ( NumVertices == 969 && PrimitiveCount == 708 ) ||  /*Body DLOD Far*/ \
    ( NumVertices == 163 && PrimitiveCount == 116 ))  /*Hand & Neck & Face DLOD Far*/
    
    ////////////////////////////////////////////////////
    
    #define Spetz_Gunner_Head \
    (( NumVertices == 745 && PrimitiveCount == 1216 ) ||  /*Head*/ \
    ( NumVertices == 540 && PrimitiveCount == 812 ))  /*Head DLOD*/
    
    #define Spetz_Gunner_Body \
    (( NumVertices == 4270 && PrimitiveCount == 4804 ) ||  /*Body*/ \
    ( NumVertices == 2755 && PrimitiveCount == 2494 ))  /*Body DLOD*/
    
    #define Spetz_Gunner_Hand \
    (( NumVertices == 880 && PrimitiveCount == 1108 ) ||  /*Hand*/ \
    ( NumVertices == 584 && PrimitiveCount == 568 ))  /*Hand DLOD*/
    
    #define Spetz_Gunner_Acc \
    (( NumVertices == 231 && PrimitiveCount == 244 ) ||  /*Acc's*/ \
    ( NumVertices == 125 && PrimitiveCount == 142 ))  /*Acc's DLOD*/
    
    #define Spetz_Gunner_Body_DLOD \
    (( NumVertices == 1317 && PrimitiveCount == 1054 ) ||  /*Body DLOD Near*/ \
    ( NumVertices == 809 && PrimitiveCount == 590 ) ||  /*Body DLOD Far*/ \
    ( NumVertices == 286 && PrimitiveCount == 300 ) ||  /*Head & Hand DLOD Far*/ \
    ( NumVertices == 773 && PrimitiveCount == 828 ))  /*Head & Hand DLOD Near*/
    
    ////////////////////////////////////////////////////
    
    #define Spetz_Demo_Head \
    (( NumVertices == 793 && PrimitiveCount == 834 ) ||  /*Head*/ \
    ( NumVertices == 409 && PrimitiveCount == 588 ) ||  /*Neck & Face Piece*/ \
    ( NumVertices == 592 && PrimitiveCount == 532 ) ||  /*Head DLOD*/ \
    ( NumVertices == 274 && PrimitiveCount == 350 ))  /*Neck & Face Piece DLOD*/
    
    #define Spetz_Demo_Body \
    (( NumVertices == 267 && PrimitiveCount == 186 ) ||  /*Vest Grenade*/ \
    ( NumVertices == 3891 && PrimitiveCount == 4598 ) ||  /*Body*/ \
    ( NumVertices == 263 && PrimitiveCount == 178 ) ||  /*Vest Grenade DLOD*/ \
    ( NumVertices == 2510 && PrimitiveCount == 2470 ))  /*Body DLOD*/
    
    #define Spetz_Demo_Hand \
    (( NumVertices == 796 && PrimitiveCount == 1036 ) ||  /*Hand*/ \
    ( NumVertices == 607 && PrimitiveCount == 512 ))  /*Hand DLOD*/
    
    #define Spetz_Demo_Acc \
    (( NumVertices == 529 && PrimitiveCount == 540 ) || /*Back Acc's*/ \
    ( NumVertices == 353 && PrimitiveCount == 346 ))  /*Back Acc's DLOD*/
    
    #define Spetz_Demo_Body_DLOD \
    (( NumVertices == 171 && PrimitiveCount == 114 ) ||  /*Head DLOD Near*/ \
    ( NumVertices == 1398 && PrimitiveCount == 1176 ) ||  /*Body DLOD Near*/ \
    ( NumVertices == 553 && PrimitiveCount == 544 ) ||  /*Hand & Mask Piece DLOD Near*/ \
    ( NumVertices == 384 && PrimitiveCount == 250 ) ||  /*Head DLOD Far*/ \
    ( NumVertices == 994 && PrimitiveCount == 714 ) ||  /*Body DLOD Far*/ \
    ( NumVertices == 163 && PrimitiveCount == 116 ))  /*Hand & Mask Piece DLOD Far*/
    
    ////////////////////////////////////////////////////
    
    #define Spetz_Sniper_Head \
    (( NumVertices == 498 && PrimitiveCount == 840 ) ||  /*Head*/ \
    ( NumVertices == 327 && PrimitiveCount == 500 ))  /*Head DLOD*/
    
    #define Spetz_Sniper_Body \
    (( NumVertices == 212 && PrimitiveCount == 146 ) ||  /*Vest grenade*/ \
    ( NumVertices == 3254 && PrimitiveCount == 4122 ) ||  /*Body*/ \
    ( NumVertices == 166 && PrimitiveCount == 128 ) ||  /*Vest grenade DLOD*/ \
    ( NumVertices == 1730 && PrimitiveCount == 1938 ))  /*Body DLOD*/
    
    #define Spetz_Sniper_Hand \
    (( NumVertices == 796 && PrimitiveCount == 1036 ) ||  /*Hand*/ \
    ( NumVertices == 607 && PrimitiveCount == 512 ))  /*Hand DLOD*/
    
    #define Spetz_Sniper_Body_DLOD \
    (( NumVertices == 1111 && PrimitiveCount == 986 ) ||  /*Body DLOD Near*/ \
    ( NumVertices == 724 && PrimitiveCount == 562 ) ||  /*Body DLOD Far*/ \
    ( NumVertices == 189 && PrimitiveCount == 172 ) ||  /*Head & Hand DLOD Far*/ \
    ( NumVertices == 545 && PrimitiveCount == 560 ))  /*Head & Hand DLOD Near*/
    
    #define Spetz_Sniper_Camo \
    (( NumVertices == 2578 && PrimitiveCount == 2192 ) ||  /*Body*/ \
    ( NumVertices == 482 && PrimitiveCount == 476 ) ||  /*Head*/ \
    ( NumVertices == 398 && PrimitiveCount == 410 ) ||  /*Head DLOD*/ \
    ( NumVertices == 2388 && PrimitiveCount == 2040 ) ||  /*Body DLOD*/ \
    ( NumVertices == 222 && PrimitiveCount == 298 ) ||  /*Head DLOD Near*/ \
    ( NumVertices == 1186 && PrimitiveCount == 1184 ) ||  /*Body DLOD Near*/ \
    ( NumVertices == 71 && PrimitiveCount == 66 ) ||  /*Head DLOD Far*/ \
    ( NumVertices == 339 && PrimitiveCount == 248 ))  /*Body DLOD Far*/
    
    ////////////////////////////////////////////////////
    
    #define Sas_Assault_Head \
    (( NumVertices == 960 && PrimitiveCount == 1072 ) || /*Mask*/\
    ( NumVertices == 418 && PrimitiveCount == 636 ) || /*Head*/\
    ( NumVertices == 475 && PrimitiveCount == 486 ) || /*Mask DLOD*/\
    ( NumVertices == 212 && PrimitiveCount == 288 )) /*Head DLOD*/
    
    #define Sas_Assault_Body \
    (( NumVertices == 154 && PrimitiveCount == 140 ) || /*Right Leg Pistol*/\
    ( NumVertices == 3935 && PrimitiveCount == 5226 ) || /*Body*/\
    ( NumVertices == 2640 && PrimitiveCount == 3070 )) /*Body DLOD*/
    
    #define Sas_Assault_Lens \
    ( NumVertices == 14 && PrimitiveCount == 12 )
    
    #define Sas_Assault_Body_DLOD \
    (( NumVertices == 214 && PrimitiveCount == 202 ) || /*Mask DLOD Near*/\
    ( NumVertices == 1373 && PrimitiveCount == 1256 ) || /*Body DLOD Near*/\
    ( NumVertices == 585 && PrimitiveCount == 440 ) || /*Body DLOD Far*/\
    ( NumVertices == 132 && PrimitiveCount == 130 ) || /*Left Hand Part DLOD Near*/\
    ( NumVertices == 118 && PrimitiveCount == 120 )) /*Right Hand Part DLOD Near*/
    
    ////////////////////////////////////////////////////
    
    #define Sas_SpecOps_Head \
    (( NumVertices == 591 && PrimitiveCount == 740 ) ||  /*Gas Mask*/ \
    ( NumVertices == 418 && PrimitiveCount == 672 ) ||  /*Head*/ \
    ( NumVertices == 255 && PrimitiveCount == 282 ) ||  /*Gas Mask DLOD*/ \
    ( NumVertices == 153 && PrimitiveCount == 182 ))  /*Head DLOD*/
    
    #define Sas_SpecOps_Body \
    (( NumVertices == 131 && PrimitiveCount == 122 ) ||  /*Vest Pistol*/ \
    ( NumVertices == 3585 && PrimitiveCount == 4858 ) ||  /*Body*/ \
    ( NumVertices == 2525 && PrimitiveCount == 3022 ))  /*Body DLOD*/
    
    #define Sas_SpecOps_Mask_Lens \
    ( NumVertices == 14 && PrimitiveCount == 12 )
    
    #define Sas_SpecOps_Body_DLOD \
    (( NumVertices == 182 && PrimitiveCount == 186 ) ||  /*Gas Mask DLOD Near*/ \
    ( NumVertices == 1498 && PrimitiveCount == 1304 ) ||  /*Body DLOD Near*/ \
    ( NumVertices == 695 && PrimitiveCount == 478 ) ||  /*Body DLOD Far*/ \
    ( NumVertices == 132 && PrimitiveCount == 130 ) ||  /*Left Hand Piece DLOD Near*/ \
    ( NumVertices == 118 && PrimitiveCount == 120 ))  /*Right Hand Piece DLOD Near*/
    
    ////////////////////////////////////////////////////
    
    #define Sas_Gunner_Head \
    (( NumVertices == 260 && PrimitiveCount == 250 ) ||  /*Goggles*/ \
    ( NumVertices == 491 && PrimitiveCount == 756 ) ||  /*Head*/ \
    ( NumVertices == 182 && PrimitiveCount == 154 ) ||  /*Goggles DLOD*/ \
    ( NumVertices == 234 && PrimitiveCount == 328 ))  /*Head DLOD*/
    
    #define Sas_Gunner_Body \
    (( NumVertices == 136 && PrimitiveCount == 124 ) ||  /*Right Leg Pistol*/ \
    ( NumVertices == 3716 && PrimitiveCount == 5064 ) ||  /*Body*/ \
    ( NumVertices == 2578 && PrimitiveCount == 2994 ))  /*Body DLOD*/
    
    #define Sas_Gunner_Mask_Lens \
    ( NumVertices == 24 && PrimitiveCount == 22 )
    
    #define Sas_Gunner_Body_DLOD \
    (( NumVertices == 132 && PrimitiveCount == 130 ) ||  /*Right Hand Piece DLOD Near*/ \
    ( NumVertices == 1412 && PrimitiveCount == 1330 ) ||  /*Body DLOD Near*/ \
    ( NumVertices == 166 && PrimitiveCount == 128 ) ||  /*Lens DLOD Near*/ \
    ( NumVertices == 118 && PrimitiveCount == 120 ) ||  /*Left Hand Piece DLOD Near*/ \
    ( NumVertices == 568 && PrimitiveCount == 470 ))  /*Body DLOD Far*/
    
    ////////////////////////////////////////////////////
    
    #define Sas_Demo_Head \
    (( NumVertices == 1000 && PrimitiveCount == 1164 ) ||  /*Helmet Mask*/ \
    ( NumVertices == 425 && PrimitiveCount == 636 ) ||  /*Head*/ \
    ( NumVertices == 494 && PrimitiveCount == 544 ) ||  /*Helmet Mask DLOD*/ \
    ( NumVertices == 174 && PrimitiveCount == 218 ))  /*Head DLOD*/
    
    #define Sas_Demo_Body \
    (( NumVertices == 133 && PrimitiveCount == 122 ) ||  /*Vest Pistol*/ \
    ( NumVertices == 3562 && PrimitiveCount == 4784 ) ||  /*Body*/ \
    ( NumVertices == 2509 && PrimitiveCount == 2954 ))  /*Body DLOD*/
    
    #define Sas_Demo_mask_Lens \
    ( NumVertices == 14 && PrimitiveCount == 12 )
    
    #define Sas_Demo_Body_DLOD \
    (( NumVertices == 292 && PrimitiveCount == 296 ) ||  /*Head DLOD Near*/ \
    ( NumVertices == 1402 && PrimitiveCount == 1164 ) ||  /*Body DLOD Near*/ \
    ( NumVertices == 132 && PrimitiveCount == 130 ) ||  /*Left Hand Piece DLOD Near*/ \
    ( NumVertices == 118 && PrimitiveCount == 120 ) ||  /*Right Hand Piece DLOD Near*/ \
    ( NumVertices == 628 && PrimitiveCount == 450 ))  /*Body DLOD Far*/
    
    ////////////////////////////////////////////////////
    
    #define Sas_Sniper2_Head \
    (( NumVertices == 314 && PrimitiveCount == 294 ) ||  /*Goggles*/ \
    ( NumVertices == 544 && PrimitiveCount == 832 ) ||  /*Head*/ \
    ( NumVertices == 236 && PrimitiveCount == 198 ) ||  /*Goggles DLOD*/ \
    ( NumVertices == 298 && PrimitiveCount == 420 ))  /*Head DLOD*/
    
    #define Sas_Sniper2_Body \
    (( NumVertices == 136 && PrimitiveCount == 124 ) ||  /*Right Leg Pistol*/ \
    ( NumVertices == 3667 && PrimitiveCount == 4952 ) ||  /*Body*/ \
    ( NumVertices == 2460 && PrimitiveCount == 2882 ))  /*Body DLOD*/
    
    #define Sas_Sniper2_mask_Lens \
    ( NumVertices == 24 && PrimitiveCount == 22 )
    
    #define Sas_Sniper2_Body_DLOD \
    (( NumVertices == 194 && PrimitiveCount == 142 ) ||  /*Mask Piece DLOD Near*/ \
    ( NumVertices == 1479 && PrimitiveCount == 1402 ) ||  /*Body DLOD Near*/ \
    ( NumVertices == 552 && PrimitiveCount == 452 ) ||  /*Body DLOD Far*/ \
    ( NumVertices == 118 && PrimitiveCount == 120 ))  /*Right Hand Piece DLOD Near*/
    
    ////////////////////////////////////////////////////
    
    #define Spetz_Sniper2_Head \
    (( NumVertices == 146 && PrimitiveCount == 214 ) ||  /*Hat*/ \
    ( NumVertices == 690 && PrimitiveCount == 1074 ) ||  /*Head*/ \
    ( NumVertices == 91 && PrimitiveCount == 114 ) ||  /*Hat DLOD*/ \
    ( NumVertices == 446 && PrimitiveCount == 632 ))  /*Head DLOD*/
    
    #define Spetz_Sniper2_Body \
    (( NumVertices == 388 && PrimitiveCount == 322 ) ||  /*Vest Grenade & Radio*/ \
    ( NumVertices == 3326 && PrimitiveCount == 4336 ) ||  /*Body*/ \
    ( NumVertices == 182 && PrimitiveCount == 154 ) ||  /*Vest Grenade & Radio DLOD*/ \
    ( NumVertices == 2140 && PrimitiveCount == 2310 ))  /*Body DLOD*/
    
    #define Spetz_Sniper2_Hand \
    (( NumVertices == 796 && PrimitiveCount == 1036 ) ||  /*Hand*/ \
    ( NumVertices == 607 && PrimitiveCount == 512 ))  /*Hand DLOD*/
    
    #define Spetz_Sniper2_Body_DLOD \
    (( NumVertices == 146 && PrimitiveCount == 116 ) ||  /*Vest Grenade & Radio DLOD Near*/ \
    ( NumVertices == 1315 && PrimitiveCount == 1170 ) ||  /*Body DLOD Near*/ \
    ( NumVertices == 651 && PrimitiveCount == 702 ) ||  /*Head & Hand DLOD Near*/ \
    ( NumVertices == 726 && PrimitiveCount == 556 ) ||  /*Body DLOD Far*/ \
    ( NumVertices == 201 && PrimitiveCount == 170 ))  /*Head & Hand DLOD Far*/
    
    ////////////////////////////////////////////////////
    
    #define Eyes \
    ( NumVertices == 90 && PrimitiveCount == 140 )
    
    #define Sas_Assualt_Sniper2_Eyes \
    ( NumVertices == 102 && PrimitiveCount == 144 )
    
    ////////////////////////////////////////////////////
    
    #define MI28 ( MAIN_BODY_MI28 || MAIN_BODY_MI28_DYNAMIC_LOD_NEAR || MAIN_BODY_MI28_DYNAMIC_LOD_FAR || \
    	MAIN_BODY_MI28_DLOD_CLOSE || MAIN_ROTOR_SHAFT_MI28 || MAIN_ROTOR_SHAFT_DYNAMIC_LOD_MI28 || MAIN_GUN_MI28 || \
    	MAIN_GUN_MI28_DYNAMIC_LOD_MI28 || MAIN_GUN_ROTOR_SHAFT_MI28 || \
    	WINDSHIELD_MI28 || WINDSHIELD_MI28_DYNAMIC_LOD || WINDSHIELD_MI28_DYNAMIC_LOD_NEAR || \
    	WINDSHIELD_MI28_DYNAMIC_LOD_FAR /*|| MAIN_BACK_ROTORBLADES_MI28*/ )
    
    #define COBRA ( MAIN_BODY_COBRA || MAIN_BODY_COBRA_DYNAMIC_LOD || MAIN_BODY_COBRA_DYNAMIC_LOD_FAR || MAIN_BODY_COBRA_DYNAMIC_LOD_NEAR || \
    	MAIN_BODY_COBRA_DLOD_CLOSE || MAIN_GUN_ROTOR_SHAFT_COBRA || INTERNALS_COBRA /*|| MAIN_BACK_ROTORBLADES_COBRA*/ )
    
    #define MAIN_BODY_MI28 ( NumVertices == 4322 && PrimitiveCount == 3864 )
    #define MAIN_BODY_MI28_DLOD_CLOSE ( NumVertices == 3437 && PrimitiveCount == 2646 )
    #define MAIN_BODY_MI28_DYNAMIC_LOD_NEAR ( NumVertices == 1724 && PrimitiveCount == 1466 )
    #define MAIN_BODY_MI28_DYNAMIC_LOD_FAR ( NumVertices == 902 && PrimitiveCount == 664 )
    
    #define MAIN_ROTOR_SHAFT_MI28 ( NumVertices == 493 && PrimitiveCount == 274 )
    #define MAIN_ROTOR_SHAFT_DYNAMIC_LOD_MI28 ( NumVertices == 409 && PrimitiveCount == 212 )
    
    #define MAIN_GUN_MI28 ( NumVertices == 181 && PrimitiveCount == 140 )
    #define MAIN_GUN_MI28_DYNAMIC_LOD_MI28 ( NumVertices == 147 && PrimitiveCount == 108 )
    
    #define MAIN_GUN_ROTOR_SHAFT_MI28 ( NumVertices == 219 && PrimitiveCount == 118 )
    
    #define WINDSHIELD_MI28 ( NumVertices == 414 && PrimitiveCount == 354 )
    #define WINDSHIELD_MI28_DYNAMIC_LOD ( NumVertices == 327 && PrimitiveCount == 246 )
    #define WINDSHIELD_MI28_DYNAMIC_LOD_NEAR ( NumVertices == 278 && PrimitiveCount == 190 )
    #define WINDSHIELD_MI28_DYNAMIC_LOD_FAR ( NumVertices == 229 && PrimitiveCount == 146 )
    
    #define MAIN_BACK_ROTORBLADES_MI28 ( NumVertices == 32 && PrimitiveCount == 18 )
    
    #define MAIN_BODY_COBRA ( NumVertices == 3549 && PrimitiveCount == 3882 )
    #define MAIN_BODY_COBRA_DLOD_CLOSE ( NumVertices == 2335 && PrimitiveCount == 2166 )
    #define MAIN_BODY_COBRA_DYNAMIC_LOD ( NumVertices == 340 && PrimitiveCount == 278 )
    #define MAIN_BODY_COBRA_DYNAMIC_LOD_NEAR ( NumVertices == 323 && PrimitiveCount == 306 )
    #define MAIN_BODY_COBRA_DYNAMIC_LOD_FAR ( NumVertices == 278 && PrimitiveCount == 184 )
    #define MAIN_GUN_ROTOR_SHAFT_COBRA ( NumVertices == 275 && PrimitiveCount == 182 )
    #define INTERNALS_COBRA ( NumVertices == 961 && PrimitiveCount == 656 )
    #define MAIN_BACK_ROTORBLADES_COBRA ( NumVertices == 64 && PrimitiveCount == 32 )
    #define MAIN_BACK_ROTORBLADES_COBRA_DLOD_FAR ( NumVertices == 187 && PrimitiveCount == 170 )
    #define MAIN_BACK_ROTORBLADES_COBRA_DLOD_CLOSE ( NumVertices == 76 && PrimitiveCount == 38 )
    #define BACK_ROTORBLADES_COBRA_DLOD_FAR ( NumVertices == 36 && PrimitiveCount == 24 )
    Last edited by (+)_; October 3rd, 2013 at 10:46.

  2. #2
    Coders (+)_'s Avatar
    Join Date
    Jan 2010
    Location
    Earth
    Posts
    455

    Re: D3d trigger final

    EDIT:

    I must be a fool: >.<

    Re-enables off aimthrough!

    Code:
    Inside DIP...
    
    if( pDevice->GetDepthStencilSurface( &pSten ) == D3D_OK )
    				{
    					pDevice->SetRenderTarget( 0, pRender );
    					pDevice->SetDepthStencilSurface( pStencil );
    Last edited by (+)_; October 3rd, 2013 at 10:50.

Similar Threads

  1. ET trigger bot
    By noobcheater in forum Enemy Territory Cheats
    Replies: 3
    Last Post: May 4th, 2013, 15:40
  2. [Assaultcube] Trigger-bot
    By Coldblade in forum Client Hooks
    Replies: 21
    Last Post: October 28th, 2009, 10:40
  3. Small Trigger Bot (ET)
    By Sinner in forum Basehooks / Sources
    Replies: 53
    Last Post: August 28th, 2009, 06:24
  4. Trigger Bot
    By ih4ck? in forum Counterstrike Source Cheats
    Replies: 0
    Last Post: October 28th, 2008, 20:20
  5. trigger bot undetected?
    By Strife117 in forum Call of Duty 1 Cheats
    Replies: 10
    Last Post: August 15th, 2008, 17:06

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •