Donate Now Goal amount for this month: 95 USD, Received: 20 USD (21%)

+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 16

Thread: XQZ wallhack Battlefield 1942.

  1. #1
    Join Date
    Apr 2005
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    63

    XQZ wallhack Battlefield 1942.

    Hey,

    I have been discussing my problems with battlefield 1942 a while back here on the forums. The problem was that a normal xqz wallhack didn't work for this game.
    It dind't draw the players trough the walls or any other object only stuff from the same stride.
    At the time i didn't know how or why and had basicly tried everything ( i thought ).
    The only way to achieve a wallhack effect in the game was to blend the walls. I really thought this looked crappy and i stopped working on it.
    Today i started to have a look at it again and try some news things and i found some interesting stuff.

    i just started messign with some functions - i had already tried pixels shaders but this didn't work out and the only option that i didn't try was vertex shaders. I found out that SetVertexShaderConstant was called a lot and i started trying to do some things with with it. After a while i had some nice working results.

    snippers :
    PHP Code:
    typedef float vec_t;
    typedef vec_t vec3_t[3];
    typedef vec_t vec4_t[4];

    typedef struct vshader_s{
        
    vec4_t zcrap// rotation stuff
        
    vec4_t zcrap1;// rotation stuff
        
    float depth_1
        
    float depth_2
        
    float depth_3;
        
    float depth_4;//the one we need?
        
    vec4_t zcrap3;
        
    vec4_t zcrap4;
        
    vec4_t zcrap5;
        
    vec4_t zcrap6;
        
    vec4_t zcrap7;
        
    float a_r// to make the models a bit brighter - ( 1.0f 1.0f 1.0f 1.0f)
        
    float a_g;// or a chams kind of effect if you pick one color :)
        
    float a_b;//..
        
    float a_a;//..
    }vshader_t;

    ////////////////////////////////////////////////

    HRESULT APIENTRY hkIDirect3DDevice8::SetVertexShaderConstant(DWORD Register,CONST voidpConstantData,DWORD ConstantCount)
    {
        
    vshader_t *pv = (vshader_t*)pConstantData;


        if(
    Register == && ConstantCount == 9)
        {
            
    // make the models brighter ( not a full lambert - but not bad )
            
    pv->a_r 1.0f
            
    pv->a_g 1.0f;
            
    pv->a_b 1.0f;
            
    pv->a_a 1.0f;
            
    //xqz
            
    pv->depth_4 1.0f;
        }

        return 
    m_pD3Ddev->SetVertexShaderConstant(RegisterpConstantDataConstantCount);

    Thats it have fun.

    Credits :
    - Azorbix for your excelent D3D BaseHook.
    - Spartan
    - me

  2. #2
    Join Date
    Aug 2005
    Posts
    55
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    60

    Good Job !

    He good Job !!! Great work ;P

  3. #3
    Join Date
    Dec 2004
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Awesome job, i havent seen any bf1942 hacks with a decent XQZ wallhack.

  4. #4
    Join Date
    Jan 2005
    Posts
    1,044
    Thanks
    0
    Thanked 1 Time in 1 Post
    Rep Power
    111
    nice investigative work!
    < this person is absent at the moment, please direct your call elsewhere >

  5. #5
    Join Date
    Feb 2006
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Hmm i tried this just now and i can load into the game but when i select my weapon pack it just crashes to the desktop


    have you had this happen ?





    [edit]

    fixed my crashing problem injector was on auto inject , and WOW totaly ownage


    http://img162.imageshack.us/img162/8...10936567hi.gif


    im definatally gonna use this


    have you gotten it to show colors behind the wall different that in front ?

    ill fiddle around with it tonight

    [/edit]

  6. #6
    Join Date
    May 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Hi.

    Does this also working for the mod Desert Combat Final (Bf1942) ?


    Greetz, bytecode

  7. #7
    Join Date
    Jan 2005
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Very good work, thx for the infos.

  8. #8
    Join Date
    Apr 2005
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    63
    @ bytecode : Yes, the mod's only change the textures / skins of the players and not the engine.

    Thanks for the replies glad its helpfull.

    As you probably have seen you could get some unwated things to be drawn trough walls with this. Like the flags and tank tires for example. A way around this is the following :

    In the hooked SetVertexShaderConstant you don't change the values you just save them to a global variable and then apply the changes in DrawIndexedPrimitive like this :

    PHP Code:
    //Global
    vshader_t m_verTex;

    HRESULT APIENTRY hkIDirect3DDevice8::SetVertexShaderConstant(DWORD Register,CONST voidpConstantData,DWORD ConstantCount)
    {
        
    vshader_t *pv = (vshader_t*)pConstantData;


        if(
    Register == && ConstantCount == 9)
        {
            
    //Save the values in our global
            
    m_verTex = *pv;
        }

        return 
    m_pD3Ddev->SetVertexShaderConstant(RegisterpConstantDataConstantCount);
    }

    // This is how your DIP could look :

    HRESULT APIENTRY hkIDirect3DDevice8::DrawIndexedPrimitive(D3DPRIMITIVETYPE PrimitiveType,UINT minIndex,UINT NumVertices,UINT startIndex,UINT primCount)
    {

        if(
    YourPlayerModelRec)
        {
            
    //Xqz wallhack effect
            
    m_verTex.depth_4 1.0f;
            
    // Lambert effect (kinda)
            
    m_verTex.a_r 1.0f
            
    m_verTex.a_g 1.0f
            
    m_verTex.a_b 1.0f
            
    m_verTex.a_a 1.0f

            
    m_pD3Ddev->SetVertexShaderConstant(0,(CONST void *)&m_verTex,9);

            return 
    m_pD3Ddev->DrawIndexedPrimitive(PrimitiveTypeminIndexNumVerticesstartIndexprimCount);
            
        }


        return 
    m_pD3Ddev->DrawIndexedPrimitive(PrimitiveTypeminIndexNumVerticesstartIndexprimCount);

    Enjoy!

    PS : Please, if you use this add the proper credits to your hack.

  9. #9
    Join Date
    Jun 2006
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Is it possible to get the entire tank to show through the wall? instead of just the tracks? Sry for replying to this thread, since its a little old.

  10. #10
    Join Date
    Aug 2005
    Posts
    55
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    60
    Quote Originally Posted by Esand15
    Is it possible to get the entire tank to show through the wall? instead of just the tracks? Sry for replying to this thread, since its a little old.
    No its not possibel with a normal XQZ Wallhack , because the game Define own Material Stats .
    And if u want to have Tanks "colored" or "BAD XQZ Wallhacked " u DONT need VertexShaders .

  11. #11
    Join Date
    Jul 2006
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    ... Yes you can. It's like seeing people through the walls. I've done it. Same with grenades and C4.

  12. #12
    Join Date
    Aug 2005
    Posts
    55
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    60
    Quote Originally Posted by nicosaan
    ... Yes you can. It's like seeing people through the walls. I've done it. Same with grenades and C4.
    It doesent work trough all walls . You should better have check that . Thats why I posted
    "BAD XQZ Wallhacked ".

  13. #13
    Join Date
    Jul 2006
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    ? I can see the tank, grenade, and c4 through every wall in Berlin. Am I missing something?

  14. #14
    Join Date
    Apr 2004
    Location
    A Dark Place!
    Posts
    481
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    84
    Thanks, i started playing bf1942 again and i updated my cheat to include this its the best wallhack i have seen yet, and the lambert is nice even if its only a little brighter it helps a lot from a distance.

    Thanks again.
    "A journey of a thousand miles begins with a single step."

  15. #15
    Join Date
    Sep 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    maybe an noob question but can i update this code to work with bf2142 ?

+ Reply to Thread
Page 1 of 2 1 2 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. My First BF 1942 Public Hack
    By X3r3oX in forum Public Releases
    Replies: 0
    Last Post: 04-15-2008, 11:50 AM
  2. Battlefield 1942 Information...
    By Capt. Morgon in forum Off Topic
    Replies: 6
    Last Post: 08-27-2004, 08:51 AM

Posting Permissions

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