google-site-verification: googlebaca44933768a824.html how to do stringchecking in DrawIndexedPrimitive ( stack-walking, for CSS! ) - Old Royal Hack Forum

Announcement

Collapse
No announcement yet.

how to do stringchecking in DrawIndexedPrimitive ( stack-walking, for CSS! )

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    how to do stringchecking in DrawIndexedPrimitive ( stack-walking, for CSS! )

    Code:
    HRESULT __stdcall Hooked_DrawIndexedPrimitive( LPDIRECT3DDEVICE9 lpDevice, D3DPRIMITIVETYPE Type, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT startIndex, UINT primCount )
    {
    	DWORD dwReturnAddress;
    	_asm MOV EAX, [ESP+0x738];
    	_asm MOV dwReturnAddress, EAX;
    
    	if( dwReturnAddress != 0x24035E70 )
    		return pDrawIndexedPrimitive( lpDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
    
    	ModelRenderInfo_t* pInfo;
    	_asm LEA EAX, [ESP+0x750];
    	_asm MOV pInfo, EAX;
    
    	if( pInfo->pModel && pModelInfo->GetModelName( pInfo->pModel ) )
    	{
    		if( strstr( pModelInfo->GetModelName( pInfo->pModel ), "models/weapons/v_" ) )
    		{
    			lpDevice->SetTexture( 0, texWeapon );
    			HRESULT result = pDrawIndexedPrimitive( lpDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
    			lpDevice->SetTexture( 0, NULL );
    
    			return result;
    		}
    	}
    
    	return pDrawIndexedPrimitive( lpDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
    }
    ->




    if you got questions, ask (:

    #2
    FPS eating?

    Or just your pc?:S
    hi@

    Comment


      #3
      It was my pc there, it Even lagged without Hack.

      This method doesnt eat any fps :)

      Comment


        #4
        Code:
        HRESULT __stdcall Hooked_DrawIndexedPrimitive( LPDIRECT3DDEVICE9 lpDevice, D3DPRIMITIVETYPE Type, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT startIndex, UINT primCount )
        {
        	DWORD dwReturnAddress;
        	_asm MOV EAX, [ESP+0x738];
        	_asm MOV dwReturnAddress, EAX;
        
        	if( dwReturnAddress != 0x24035E70 )
        		return pDrawIndexedPrimitive( lpDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
        
        	ModelRenderInfo_t* pInfo;
        	_asm LEA EAX, [ESP+0x760];
        	_asm MOV pInfo, EAX;
        
        	if( pInfo->pModel &&  pModelInfo->GetModelName( pInfo->pModel ) )
        	{
        		if( strstr( pModelInfo->GetModelName( pInfo->pModel ), "models/player/ct_" ) )
        		{
        			lpDevice->SetTexture( 0, texCtBehindWall );
        			lpDevice->SetRenderState( D3DRS_ZENABLE, 0 );
        			pDrawIndexedPrimitive( lpDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
        			lpDevice->SetRenderState( D3DRS_ZENABLE, 1 );
        			lpDevice->SetTexture( 0, texCtInfrontWall );
        			return pDrawIndexedPrimitive( lpDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
        		}
        		if( strstr( pModelInfo->GetModelName( pInfo->pModel ), "models/player/t_" ) )
        		{
        			lpDevice->SetTexture( 0, texTBehindWall );
        			lpDevice->SetRenderState( D3DRS_ZENABLE, 0 );
        			pDrawIndexedPrimitive( lpDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
        			lpDevice->SetRenderState( D3DRS_ZENABLE, 1 );
        			lpDevice->SetTexture( 0, texTInfrontWall );
        			return pDrawIndexedPrimitive( lpDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
        		}
        	}
        
        	return pDrawIndexedPrimitive( lpDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
        }
        ->

        Comment


          #5
          Originally posted by Lawgiver View Post
          Code:
          HRESULT __stdcall Hooked_DrawIndexedPrimitive( LPDIRECT3DDEVICE9 lpDevice, D3DPRIMITIVETYPE Type, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT startIndex, UINT primCount )
          {
          	DWORD dwReturnAddress;
          	_asm MOV EAX, [ESP+0x738];
          	_asm MOV dwReturnAddress, EAX;
          
          	if( dwReturnAddress != 0x24035E70 )
          		return pDrawIndexedPrimitive( lpDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
          
          	ModelRenderInfo_t* pInfo;
          	_asm LEA EAX, [ESP+0x760];
          	_asm MOV pInfo, EAX;
          
          	if( pInfo->pModel &&  pModelInfo->GetModelName( pInfo->pModel ) )
          	{
          		if( strstr( pModelInfo->GetModelName( pInfo->pModel ), "models/player/ct_" ) )
          		{
          			lpDevice->SetTexture( 0, texCtBehindWall );
          			lpDevice->SetRenderState( D3DRS_ZENABLE, 0 );
          			pDrawIndexedPrimitive( lpDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
          			lpDevice->SetRenderState( D3DRS_ZENABLE, 1 );
          			lpDevice->SetTexture( 0, texCtInfrontWall );
          			return pDrawIndexedPrimitive( lpDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
          		}
          		if( strstr( pModelInfo->GetModelName( pInfo->pModel ), "models/player/t_" ) )
          		{
          			lpDevice->SetTexture( 0, texTBehindWall );
          			lpDevice->SetRenderState( D3DRS_ZENABLE, 0 );
          			pDrawIndexedPrimitive( lpDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
          			lpDevice->SetRenderState( D3DRS_ZENABLE, 1 );
          			lpDevice->SetTexture( 0, texTInfrontWall );
          			return pDrawIndexedPrimitive( lpDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
          		}
          	}
          
          	return pDrawIndexedPrimitive( lpDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
          }
          ->

          OH MY GOD! THANKS! :D


          RoyalHack - The Future Is Present

          Comment

          Working...
          X