Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23
  1. #16
    einar300's Avatar
    Join Date
    May 2010
    Gender
    male
    Posts
    469
    Reputation
    10
    Thanks
    60
    Maybe put it in a code? BTW here is my pc specs: http://i54.tinypic.com/mcpxef.png

    http://i56.tinypic.com/6t2yl4.jpg

    The reseaon I post this is because I want everyone to see what my pc specs is and that I can run black ops with that config file I posted. I coudn't find out my motherboard info and Cpuz is not working for me ATM and I don't know why.... + I have 6 gb ram forgot that in the pics and as always have a nice day Quote FPSRUSSIA

  2. #17
    CJwarrior's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    Inside a bunker.
    Posts
    281
    Reputation
    10
    Thanks
    10
    My Mood
    Lonely
    Quote Originally Posted by einar300 View Post
    Maybe put it in a code? BTW here is my pc specs: http://i54.tinypic.com/mcpxef.png

    http://i56.tinypic.com/6t2yl4.jpg

    The reseaon I post this is because I want everyone to see what my pc specs is and that I can run black ops with that config file I posted. I coudn't find out my motherboard info and Cpuz is not working for me ATM and I don't know why.... + I have 6 gb ram forgot that in the pics and as always have a nice day Quote FPSRUSSIA
    You can run no lag even without a config.
    Last edited by CJwarrior; 09-07-2011 at 12:43 AM.

  3. #18
    tgeX's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Location
    Nevada
    Posts
    21
    Reputation
    10
    Thanks
    0
    My Mood
    Yeehaw
    i'm using the same pc now and it lags

  4. #19
    einar300's Avatar
    Join Date
    May 2010
    Gender
    male
    Posts
    469
    Reputation
    10
    Thanks
    60
    I lag with that pc, but with the config I dont!
    Last edited by einar300; 09-10-2011 at 01:42 AM.

  5. #20
    draco124's Avatar
    Join Date
    Jan 2012
    Gender
    male
    Location
    Florida, US
    Posts
    99
    Reputation
    10
    Thanks
    6
    My Mood
    Mellow
    Quote Originally Posted by tgeX View Post
    i'm using the same pc now and it lags
    Your internet perhaps?
    Please click on my dragons and eggs, they grow the more you view them



    If the eggs are hidden in fog don't click them, they are sick from all the attention. if they get to much attention they get sick and need to be left alone to get better. but if the eggs are showing you can view them.







  6. #21
    math340c's Avatar
    Join Date
    Apr 2012
    Gender
    male
    Location
    Denmark
    Posts
    88
    Reputation
    10
    Thanks
    8
    My Mood
    Goofy

    Cool

    Here is my config. It has one option.
    This is for zombies or singleplayer. Click on F2 you will quickly restart the map. Works also for online zombies. Tired going to lobby each time?? Just push F2 and you will quickly restart the map! This also work when you losed and the points and spec about players is showed in zombies
    Works also if you want to restart a map in singleplayer.

    https://www.virustotal.com/file/6f06...is/1347217147/

    Enjoy!!!!

    <b>Downloadable Files</b> Downloadable Files
    Last edited by math340c; 09-09-2012 at 03:05 PM.
    Just i could make trainers

  7. The Following 2 Users Say Thank You to math340c For This Useful Post:

    ForcezGaming (12-09-2014),Obelisk83 (08-23-2016)

  8. #22
    Z's Avatar
    Join Date
    Sep 2013
    Gender
    male
    Location
    47.614028°N 122.194015°W
    Posts
    1,797
    Reputation
    136
    Thanks
    3,242
    My Mood
    Amazed
    No-Spread:

    Code:
    DWORD _BG_GetWeaponDef = 0x00529FF0;
    DWORD _BG_GetSpreadForWeapon = 0x0047DE70;
    DWORD _CG_GetPlayerViewOrigin = 0x004E7470;
    DWORD _GetSpreadEndVec = 0x007FC040;
    DWORD clients = 0x00E67C80; // clientActive_t struct
    int* currentCmdNum = 0x00EABEE8;
     
    int GetCurrentWeapon()
    {
        return *(short*)((int)cgArray + 263836 + 324); // "Player is holding" string
    }
     
    int BG_GetWeaponDef(int weapon)
    {
        DWORD result = 0;
        __asm
        {
            push weapon
            _BG_GetWeaponDef
            mov result,eax
            add esp,04h
        }
        return result;
    }
     
    void BG_GetSpreadForWeapon(int playerStatePtr, int weaponDefPtr, float* minSpreadOut, float* maxSpreadOut)
    {
        // WARNING: Use _fxsave and _fxrstor if your XMM
        // registers screw up
        __asm
        {
            push maxSpreadOut
            push minSpreadOut
            push weaponDefPtr
            push playerStatePtr
            call _BG_GetSpreadForWeapon
            add esp,10h
        }
    }
     
    int CG_GetPlayerViewOrigin(int localClientNum, int playerStatePtr, pvec3_t vecOut)
    {
        DWORD result = 0;
        __asm
        {
            push vecOut
            push playerStatePtr
            push localClientNum
            call _CG_GetPlayerViewOrigin
            mov result,eax
            add esp,0Ch
        }
        return result;
    }
     
    void GetSpreadEndVec(pvec3_t viewOrigin, pvec3_t spreadEndVecOut, float spread, int commandTime, pvec3_t spreadDirectionOut, pvec3_t forward, pvec3_t right, pvec3_t up, float range)
    {
        __asm
        {
            push range
            push up
            push right
            push forward
            push spreadDirectionOut
            push commandTime
            movss xmm0,spread
            mov esi,spreadEndVecOut
            mov edi,viewOrigin
            call _GetSpreadEndVec
            add esp,18h
        }
    }
     
    usercmd_s* CL_GetUserCmd(int cmdNum)
    {
        return (usercmd_s*)((int)clients + 272488 + sizeof(usercmd_s) * (cmdNum & 0x7F));
    }
     
    int CL_GetCurrentCmdNumber()
    {
        return *currentCmdNum;
    }
     
    void NoSpread()
    {
        // get playerState_s struct
        int playerStatePtr = (int)cgArray + 263836;
     
        // get weaponDef struct and our starting spread float value
        float spread;
        int weaponDefPtr = BG_GetWeaponDef(GetCurrentWeapon());
        spread = *(float*)((int)cgArray + 457488) / 255.0f;
     
        // get final spread float value
        float minSpread, maxSpread;
        BG_GetSpreadForWeapon(playerStatePtr, weaponDefPtr, &minSpread, &maxSpread);
        if (*(float*)(playerStatePtr + 360) == 1.0f) // if (fWeaponPosFrac == 1.0f) get minSpread from weaponDef
            spread = *(float*)(weaponDefPtr + 1736) + ((maxSpread - *(float*)(weaponDefPtr + 1736)) * spread);
        else
            spread = minSpread + ((maxSpread - minSpread) * spread);
     
        // get our view origin
        vec3_t viewOrigin;
        if (!CG_GetPlayerViewOrigin(0, playerStatePtr, viewOrigin))
            return;
     
        // get our view axis
        vec3_t viewAngles;
        vec3_t viewAxis[3];
        if (*(int*)((int)cgArray + 263832)) // renderingThirdPerson
        {
            AngleVectors((float*)((int)cgArray + 390792 + sizeof(clientInfo_t) * cgArray->clientNum), viewAxis[0], viewAxis[1], viewAxis[2]);
        }
        else
        {
            viewAngles[0] = *(float*)((int)cgArray + 389012);
            viewAngles[1] = *(float*)((int)cgArray + 389016);
            viewAngles[2] = 0;
            AngleVectors(viewAngles, viewAxis[0], viewAxis[1], viewAxis[2]);
        }
     
        // get the range
        float range;
        if (*(int*)(weaponDefPtr + 32) == 3) // if (weapClass == WEAPCLASS_SPREAD)
            range = *(float*)(weaponDefPtr + 1964); // range = fMinDamageRange; (probably for shotguns)
        else
            range = 8192.0f; // from bulletrange dvar
     
        // NOTE: you can't do 100% no spread with shotguns, because you can only fix 1 bullet at a time
     
        // get the end vector in the game world of the spread and the direction vector too
        // we use the direction vector directly instead of the end vector
        vec3_t spreadEndVec;
        vec3_t spreadDirection;
        GetSpreadEndVec(viewOrigin, spreadEndVec, spread, *(int*)playerStatePtr, spreadDirection, viewAxis[0], viewAxis[1], viewAxis[2], range);
        
        // convert the spread direction to angles
        vectoangles(spreadDirection, viewAngles);
        
        // fix our angles
        usercmd_s* oldcmd = CL_GetUserCmd(CL_GetCurrentCmdNumber() - 1);
     
        // get the angle delta and write it to the user cmd
        // do -= because we want to get the inverse of the spread
        oldcmd->angles[0] -= ANGLE2SHORT(-(*(float*)((int)cgArray + 389012) - viewAngles[0]));
        oldcmd->angles[1] -= ANGLE2SHORT(-(*(float*)((int)cgArray + 389016) - viewAngles[1]));
     
        oldcmd->serverTime += 1;
    }


    Auto-Wall:

    Code:
    enum TraceHitType
    {
        TRACE_HITTYPE_NONE = 0,
        TRACE_HITTYPE_ENTITY = 1,
        TRACE_HITTYPE_DYNENT_MODEL = 2,
        TRACE_HITTYPE_DYNENT_BRUSH = 3,
        TRACE_HITTYPE_DYNENT_UNKNOWN = 4
    };
     
    #pragma pack(push, 1)
     
    struct trace_t
    {
        vec3_t normal;
        char unk1[0x04];
        float fraction;
        char unk2[0x08];
        TraceHitType hitType;
        short hitId;
        short modelIndex;
        short partName;
        short partGroup;
        char unk4[0x10];
    }; // 0x38
     
    #pragma pack(pop)
     
    struct BulletFireParams
    {
        int weaponEntIndex;
        int ignoreEntIndex;
        float damageMultiplier;
        int methodOfDeath;
        vec3_t origStart;
        vec3_t start;
        vec3_t end;
        vec3_t dir;
    }; // 0x40
     
    struct BulletTraceResults
    {
        trace_t trace;
        int* hitEnt; // gentity_s*
        float hitPos[3];
        int ignoreHitEnt;
        int hitSurfaceType;
    }; // 0x50
     
    DWORD _BulletTrace = 0xblahblah;
     
    float (__cdecl* _BG_GetSurfacePenetrationDepth)(int weaponDefPtr, int surfaceType) = (float(__cdecl*)(int,int))0xfakfak;
     
    bool (__cdecl* _BG_AdvanceTrace)(BulletFireParams* bulletFireParams, BulletTraceResults* bulletTraceResults, float amount) = (bool(_cdecl*)(BulletFireParams*,BulletTraceResults*,float))0xmehmeh;
     
    bool BulletTrace(BulletFireParams* bulletFireParams, BulletTraceResults* bulletTraceResults, int localClientNum, centity_s* entity, int surfaceType)
    {
        bool hit = 0;
        __declspec(align(16)) char save[512];
        _fxsave(save);
        __asm
        {
            push surfaceType
            push entity
            push localClientNum
            mov esi,bulletTraceResults
            mov edi,bulletFireParams
            call _BulletTrace
            mov hit,al
            add esp,0Ch
        }
        _fxrstor(save);
        return hit;
    }
     
    float BG_GetSurfacePenetrationDepth(int weaponDefPtr, int surfaceType)
    {
        return _BG_GetSurfacePenetrationDepth(weaponDefPtr, surfaceType);
    }
     
    bool BG_AdvanceTrace(BulletFireParams* bulletFireParams, BulletTraceResults* bulletTraceResults, float amount)
    {
        return _BG_AdvanceTrace(bulletFireParams, bulletTraceResults, amount);
    }
     
    float GetAutoWallDamageMultiplier(pvec3_t start, pvec3_t end)
    {
        // get our weapon
        int weaponDefPtr = BG_GetWeaponDef(GetCurrentWeapon());
     
        // set up our BulletFireParams struct
        BulletFireParams bulletFireParams;
        memset(&bulletFireParams, 0x00, sizeof(BulletFireParams));
     
        bulletFireParams.weaponEntIndex = 1022;
        bulletFireParams.ignoreEntIndex = *(DWORD*)((DWORD)&cg_entitiesArray[cgArray->clientNum] + 488);
        bulletFireParams.damageMultiplier = 1.0f;
        bulletFireParams.methodOfDeath = (*(BYTE*)(weaponDefPtr + 1357) != 0) + 1;
        VectorCopy(start, bulletFireParams.origStart);
        VectorCopy(start, bulletFireParams.start);
        VectorCopy(end, bulletFireParams.end);
     
        vec3_t dir;
        VectorSubtract(end, start, dir);
        VectorNormalize(dir);
        VectorCopy(dir, bulletFireParams.dir);
     
        // call BulletTrace for the first time and get our BulletTraceResults struct
        BulletTraceResults bulletTraceResults;
        bool hit = BulletTrace(&bulletFireParams, &bulletTraceResults, 0, &cg_entitiesArray[cgArray->clientNum], 0);
     
        // if the result of the bullet trace was TRACE_HITTYPE_NONE, we return the full damage multiplier
        if (!hit)
            return bulletFireParams.damageMultiplier;
     
        // return if the hit type was TRACE_HITTYPE_ENTITY
        if (Trace_GetEntityHitId(&bulletTraceResults.trace) != 1022)
            return 0.0f;
     
        if (*(WORD*)((DWORD)&bulletTraceResults.trace + 40) == 2)
            return 0.0f;
     
        // return if our weapon doesn't penetrate, some weird var from bulletTraceResults.trace is true or some weird weapon shit i dont know
        if (!*(DWORD*)(weaponDefPtr + 36) // if (weaponDefPtr->penetrateType == PENETRATE_TYPE_NONE)
            || *(BYTE*)((DWORD)&bulletTraceResults.trace + 43)
            || *(BYTE*)(weaponDefPtr + 1581)
            )
            return 0.0f;
     
        // we can penetrate a maximum of 5 walls, we loop each wall
        int penetrationCount = 0;
        float perk_bulletPenetrationMultiplier = 2.0f;
        float penetrationDepth;
        BulletFireParams bulletFireParams_2;
        BulletTraceResults bulletTraceResults_2;
        vec3_t hitPosBackup;
        bool hit_2;
        bool v26;
        while (true)
        {
            // get the penetration depth of the hit surface, and apply the perk_bulletPenetrationMultiplier perk if we have it
            // need to test if perk detection works
            penetrationDepth = BG_GetSurfacePenetrationDepth(weaponDefPtr, bulletTraceResults.hitSurfaceType);
            if (*(WORD*)((DWORD)&cg_entitiesArray[cgArray->clientNum] + 678) == 1 && (*(DWORD*)((DWORD)&clientinfo[cgArray->clientNum] + 389756) & 32))
                penetrationDepth *= perk_bulletPenetrationMultiplier;
     
            // we return if our penetration depth is zero or negative
            if (penetrationDepth <= 0.0f)
                return 0.0f;
     
            // backup our latest hit position and advance the trace (return if we can't advance the trace)
            VectorCopy(bulletTraceResults.hitPos, hitPosBackup);
            if (!BG_AdvanceTrace(&bulletFireParams, &bulletTraceResults, 0.13500000536441803f))
                return 0.0f;
     
            // get the wall depth by hitting the face of the surface, then the back of the surface, and saving those hit positions
            hit = BulletTrace(&bulletFireParams, &bulletTraceResults, 0, &cg_entitiesArray[cgArray->clientNum], bulletTraceResults.hitSurfaceType);
     
            memcpy(&bulletFireParams_2, &bulletFireParams, sizeof(BulletFireParams));
     
            VectorScale(bulletFireParams.dir, -1.0f, bulletFireParams_2.dir); // inverse the direction when at the back of the wall
            VectorCopy(bulletFireParams.end, bulletFireParams_2.start);
            VectorMA(hitPosBackup, 0.009999999776482582f, bulletFireParams_2.dir, bulletFireParams_2.end);
     
            memcpy(&bulletTraceResults_2, &bulletTraceResults, sizeof(BulletTraceResults));
     
            VectorScale(bulletTraceResults_2.trace.normal, -1.0f, bulletTraceResults_2.trace.normal);
     
            if (hit)
                BG_AdvanceTrace(&bulletFireParams_2, &bulletTraceResults_2, 0.009999999776482582f);
     
            hit_2 = BulletTrace(&bulletFireParams_2, &bulletTraceResults_2, 0, &cg_entitiesArray[cgArray->clientNum], bulletTraceResults_2.hitSurfaceType);
     
            v26 = (hit_2 != 0) && *(BYTE*)((DWORD)&bulletTraceResults_2.trace + 42) || *(BYTE*)((DWORD)&bulletTraceResults.trace + 43) && *(BYTE*)((DWORD)&bulletTraceResults_2.trace + 43);
     
            if (hit_2 || v26)
                break;
            if (!hit)
            {
                return bulletFireParams.damageMultiplier;
            }
            goto continueLoop;
     
    continueLoop:
            if (hit)
            {
                penetrationCount++;
                if (penetrationCount < 5) // max number of surfaces penetrated is 5 (from penetrationCount dvar)
                    continue;
            }
     
            return 0.0f;
        }
     
        // calculate the surface depth
        float surfaceDepth = 0.0f;
        if (v26)
            surfaceDepth = Get3DDistance(bulletFireParams_2.start, bulletFireParams_2.end);
        else
            surfaceDepth = Get3DDistance(bulletTraceResults_2.hitPos, hitPosBackup);
        
        // minimum surface depth is 1.0f
        if (surfaceDepth < 1.0f)
            surfaceDepth = 1.0f;
        
        // if we hit the back side of the wall, set the minimum penetration depth of both surfaces hit as our final penetration depth
        if (hit_2)
        {
            float penetrationDepth_2 = BG_GetSurfacePenetrationDepth(weaponDefPtr, bulletTraceResults_2.hitSurfaceType);
            if (*(WORD*)((DWORD)&cg_entitiesArray[cgArray->clientNum] + 678) == 1 && (*(DWORD*)((DWORD)&clientinfo[cgArray->clientNum] + 389756) & 32))
                penetrationDepth_2 *= perk_bulletPenetrationMultiplier;
            
            penetrationDepth = min(penetrationDepth, penetrationDepth_2);
            
            // we return if our penetration depth is zero or negative
            if (penetrationDepth <= 0.0f)
                return 0.0f;
        }
     
        if (*(WORD*)((DWORD)&cg_entitiesArray[cgArray->clientNum] + 678) == 1)
        {
            if (*(DWORD*)((DWORD)&clientinfo[cgArray->clientNum] + 389756) & 32)
            {
    LABEL_84:
                if (bulletFireParams.damageMultiplier <= 0.0f)
                    return 0.0f;
     
                goto continueLoop;
            }
        }
        
        // decrease our damage multiplier (the fraction)
        bulletFireParams.damageMultiplier -= surfaceDepth / penetrationDepth;
        goto LABEL_84;
     
        // impossibru, this return can't be executed (who cares)
        return 0.0f;
    }
    Last edited by Z; 04-06-2016 at 12:52 PM.

    Like Something that i did or what i've uploaded?

    BTC Donation Address: 19WwTGHVWHCE7p7JvpSYvbHYfKBkmHCFy8




    Contact Info:
    ||

     

    • Join Date: 09-13-2013
    • PREMIUM Since: 11-5-2015

     

  9. The Following User Says Thank You to Z For This Useful Post:

    [MPGH]Eithan1231 (06-01-2016)

  10. #23
    Eithan1231's Avatar
    Join Date
    Jan 2015
    Gender
    male
    Location
    Australia
    Posts
    1,583
    Reputation
    429
    Thanks
    4,273
    My Mood
    Angelic
    Quote Originally Posted by Z View Post
    No-Spread:

    Code:
    DWORD _BG_GetWeaponDef = 0x00529FF0;
    DWORD _BG_GetSpreadForWeapon = 0x0047DE70;
    DWORD _CG_GetPlayerViewOrigin = 0x004E7470;
    DWORD _GetSpreadEndVec = 0x007FC040;
    DWORD clients = 0x00E67C80; // clientActive_t struct
    int* currentCmdNum = 0x00EABEE8;
     
    int GetCurrentWeapon()
    {
        return *(short*)((int)cgArray + 263836 + 324); // "Player is holding" string
    }
     
    int BG_GetWeaponDef(int weapon)
    {
        DWORD result = 0;
        __asm
        {
            push weapon
            _BG_GetWeaponDef
            mov result,eax
            add esp,04h
        }
        return result;
    }
     
    void BG_GetSpreadForWeapon(int playerStatePtr, int weaponDefPtr, float* minSpreadOut, float* maxSpreadOut)
    {
        // WARNING: Use _fxsave and _fxrstor if your XMM
        // registers screw up
        __asm
        {
            push maxSpreadOut
            push minSpreadOut
            push weaponDefPtr
            push playerStatePtr
            call _BG_GetSpreadForWeapon
            add esp,10h
        }
    }
     
    int CG_GetPlayerViewOrigin(int localClientNum, int playerStatePtr, pvec3_t vecOut)
    {
        DWORD result = 0;
        __asm
        {
            push vecOut
            push playerStatePtr
            push localClientNum
            call _CG_GetPlayerViewOrigin
            mov result,eax
            add esp,0Ch
        }
        return result;
    }
     
    void GetSpreadEndVec(pvec3_t viewOrigin, pvec3_t spreadEndVecOut, float spread, int commandTime, pvec3_t spreadDirectionOut, pvec3_t forward, pvec3_t right, pvec3_t up, float range)
    {
        __asm
        {
            push range
            push up
            push right
            push forward
            push spreadDirectionOut
            push commandTime
            movss xmm0,spread
            mov esi,spreadEndVecOut
            mov edi,viewOrigin
            call _GetSpreadEndVec
            add esp,18h
        }
    }
     
    usercmd_s* CL_GetUserCmd(int cmdNum)
    {
        return (usercmd_s*)((int)clients + 272488 + sizeof(usercmd_s) * (cmdNum & 0x7F));
    }
     
    int CL_GetCurrentCmdNumber()
    {
        return *currentCmdNum;
    }
     
    void NoSpread()
    {
        // get playerState_s struct
        int playerStatePtr = (int)cgArray + 263836;
     
        // get weaponDef struct and our starting spread float value
        float spread;
        int weaponDefPtr = BG_GetWeaponDef(GetCurrentWeapon());
        spread = *(float*)((int)cgArray + 457488) / 255.0f;
     
        // get final spread float value
        float minSpread, maxSpread;
        BG_GetSpreadForWeapon(playerStatePtr, weaponDefPtr, &minSpread, &maxSpread);
        if (*(float*)(playerStatePtr + 360) == 1.0f) // if (fWeaponPosFrac == 1.0f) get minSpread from weaponDef
            spread = *(float*)(weaponDefPtr + 1736) + ((maxSpread - *(float*)(weaponDefPtr + 1736)) * spread);
        else
            spread = minSpread + ((maxSpread - minSpread) * spread);
     
        // get our view origin
        vec3_t viewOrigin;
        if (!CG_GetPlayerViewOrigin(0, playerStatePtr, viewOrigin))
            return;
     
        // get our view axis
        vec3_t viewAngles;
        vec3_t viewAxis[3];
        if (*(int*)((int)cgArray + 263832)) // renderingThirdPerson
        {
            AngleVectors((float*)((int)cgArray + 390792 + sizeof(clientInfo_t) * cgArray->clientNum), viewAxis[0], viewAxis[1], viewAxis[2]);
        }
        else
        {
            viewAngles[0] = *(float*)((int)cgArray + 389012);
            viewAngles[1] = *(float*)((int)cgArray + 389016);
            viewAngles[2] = 0;
            AngleVectors(viewAngles, viewAxis[0], viewAxis[1], viewAxis[2]);
        }
     
        // get the range
        float range;
        if (*(int*)(weaponDefPtr + 32) == 3) // if (weapClass == WEAPCLASS_SPREAD)
            range = *(float*)(weaponDefPtr + 1964); // range = fMinDamageRange; (probably for shotguns)
        else
            range = 8192.0f; // from bulletrange dvar
     
        // NOTE: you can't do 100% no spread with shotguns, because you can only fix 1 bullet at a time
     
        // get the end vector in the game world of the spread and the direction vector too
        // we use the direction vector directly instead of the end vector
        vec3_t spreadEndVec;
        vec3_t spreadDirection;
        GetSpreadEndVec(viewOrigin, spreadEndVec, spread, *(int*)playerStatePtr, spreadDirection, viewAxis[0], viewAxis[1], viewAxis[2], range);
        
        // convert the spread direction to angles
        vectoangles(spreadDirection, viewAngles);
        
        // fix our angles
        usercmd_s* oldcmd = CL_GetUserCmd(CL_GetCurrentCmdNumber() - 1);
     
        // get the angle delta and write it to the user cmd
        // do -= because we want to get the inverse of the spread
        oldcmd->angles[0] -= ANGLE2SHORT(-(*(float*)((int)cgArray + 389012) - viewAngles[0]));
        oldcmd->angles[1] -= ANGLE2SHORT(-(*(float*)((int)cgArray + 389016) - viewAngles[1]));
     
        oldcmd->serverTime += 1;
    }


    Auto-Wall:

    Code:
    enum TraceHitType
    {
        TRACE_HITTYPE_NONE = 0,
        TRACE_HITTYPE_ENTITY = 1,
        TRACE_HITTYPE_DYNENT_MODEL = 2,
        TRACE_HITTYPE_DYNENT_BRUSH = 3,
        TRACE_HITTYPE_DYNENT_UNKNOWN = 4
    };
     
    #pragma pack(push, 1)
     
    struct trace_t
    {
        vec3_t normal;
        char unk1[0x04];
        float fraction;
        char unk2[0x08];
        TraceHitType hitType;
        short hitId;
        short modelIndex;
        short partName;
        short partGroup;
        char unk4[0x10];
    }; // 0x38
     
    #pragma pack(pop)
     
    struct BulletFireParams
    {
        int weaponEntIndex;
        int ignoreEntIndex;
        float damageMultiplier;
        int methodOfDeath;
        vec3_t origStart;
        vec3_t start;
        vec3_t end;
        vec3_t dir;
    }; // 0x40
     
    struct BulletTraceResults
    {
        trace_t trace;
        int* hitEnt; // gentity_s*
        float hitPos[3];
        int ignoreHitEnt;
        int hitSurfaceType;
    }; // 0x50
     
    DWORD _BulletTrace = 0xblahblah;
     
    float (__cdecl* _BG_GetSurfacePenetrationDepth)(int weaponDefPtr, int surfaceType) = (float(__cdecl*)(int,int))0xfakfak;
     
    bool (__cdecl* _BG_AdvanceTrace)(BulletFireParams* bulletFireParams, BulletTraceResults* bulletTraceResults, float amount) = (bool(_cdecl*)(BulletFireParams*,BulletTraceResults*,float))0xmehmeh;
     
    bool BulletTrace(BulletFireParams* bulletFireParams, BulletTraceResults* bulletTraceResults, int localClientNum, centity_s* entity, int surfaceType)
    {
        bool hit = 0;
        __declspec(align(16)) char save[512];
        _fxsave(save);
        __asm
        {
            push surfaceType
            push entity
            push localClientNum
            mov esi,bulletTraceResults
            mov edi,bulletFireParams
            call _BulletTrace
            mov hit,al
            add esp,0Ch
        }
        _fxrstor(save);
        return hit;
    }
     
    float BG_GetSurfacePenetrationDepth(int weaponDefPtr, int surfaceType)
    {
        return _BG_GetSurfacePenetrationDepth(weaponDefPtr, surfaceType);
    }
     
    bool BG_AdvanceTrace(BulletFireParams* bulletFireParams, BulletTraceResults* bulletTraceResults, float amount)
    {
        return _BG_AdvanceTrace(bulletFireParams, bulletTraceResults, amount);
    }
     
    float GetAutoWallDamageMultiplier(pvec3_t start, pvec3_t end)
    {
        // get our weapon
        int weaponDefPtr = BG_GetWeaponDef(GetCurrentWeapon());
     
        // set up our BulletFireParams struct
        BulletFireParams bulletFireParams;
        memset(&bulletFireParams, 0x00, sizeof(BulletFireParams));
     
        bulletFireParams.weaponEntIndex = 1022;
        bulletFireParams.ignoreEntIndex = *(DWORD*)((DWORD)&cg_entitiesArray[cgArray->clientNum] + 488);
        bulletFireParams.damageMultiplier = 1.0f;
        bulletFireParams.methodOfDeath = (*(BYTE*)(weaponDefPtr + 1357) != 0) + 1;
        VectorCopy(start, bulletFireParams.origStart);
        VectorCopy(start, bulletFireParams.start);
        VectorCopy(end, bulletFireParams.end);
     
        vec3_t dir;
        VectorSubtract(end, start, dir);
        VectorNormalize(dir);
        VectorCopy(dir, bulletFireParams.dir);
     
        // call BulletTrace for the first time and get our BulletTraceResults struct
        BulletTraceResults bulletTraceResults;
        bool hit = BulletTrace(&bulletFireParams, &bulletTraceResults, 0, &cg_entitiesArray[cgArray->clientNum], 0);
     
        // if the result of the bullet trace was TRACE_HITTYPE_NONE, we return the full damage multiplier
        if (!hit)
            return bulletFireParams.damageMultiplier;
     
        // return if the hit type was TRACE_HITTYPE_ENTITY
        if (Trace_GetEntityHitId(&bulletTraceResults.trace) != 1022)
            return 0.0f;
     
        if (*(WORD*)((DWORD)&bulletTraceResults.trace + 40) == 2)
            return 0.0f;
     
        // return if our weapon doesn't penetrate, some weird var from bulletTraceResults.trace is true or some weird weapon shit i dont know
        if (!*(DWORD*)(weaponDefPtr + 36) // if (weaponDefPtr->penetrateType == PENETRATE_TYPE_NONE)
            || *(BYTE*)((DWORD)&bulletTraceResults.trace + 43)
            || *(BYTE*)(weaponDefPtr + 1581)
            )
            return 0.0f;
     
        // we can penetrate a maximum of 5 walls, we loop each wall
        int penetrationCount = 0;
        float perk_bulletPenetrationMultiplier = 2.0f;
        float penetrationDepth;
        BulletFireParams bulletFireParams_2;
        BulletTraceResults bulletTraceResults_2;
        vec3_t hitPosBackup;
        bool hit_2;
        bool v26;
        while (true)
        {
            // get the penetration depth of the hit surface, and apply the perk_bulletPenetrationMultiplier perk if we have it
            // need to test if perk detection works
            penetrationDepth = BG_GetSurfacePenetrationDepth(weaponDefPtr, bulletTraceResults.hitSurfaceType);
            if (*(WORD*)((DWORD)&cg_entitiesArray[cgArray->clientNum] + 678) == 1 && (*(DWORD*)((DWORD)&clientinfo[cgArray->clientNum] + 389756) & 32))
                penetrationDepth *= perk_bulletPenetrationMultiplier;
     
            // we return if our penetration depth is zero or negative
            if (penetrationDepth <= 0.0f)
                return 0.0f;
     
            // backup our latest hit position and advance the trace (return if we can't advance the trace)
            VectorCopy(bulletTraceResults.hitPos, hitPosBackup);
            if (!BG_AdvanceTrace(&bulletFireParams, &bulletTraceResults, 0.13500000536441803f))
                return 0.0f;
     
            // get the wall depth by hitting the face of the surface, then the back of the surface, and saving those hit positions
            hit = BulletTrace(&bulletFireParams, &bulletTraceResults, 0, &cg_entitiesArray[cgArray->clientNum], bulletTraceResults.hitSurfaceType);
     
            memcpy(&bulletFireParams_2, &bulletFireParams, sizeof(BulletFireParams));
     
            VectorScale(bulletFireParams.dir, -1.0f, bulletFireParams_2.dir); // inverse the direction when at the back of the wall
            VectorCopy(bulletFireParams.end, bulletFireParams_2.start);
            VectorMA(hitPosBackup, 0.009999999776482582f, bulletFireParams_2.dir, bulletFireParams_2.end);
     
            memcpy(&bulletTraceResults_2, &bulletTraceResults, sizeof(BulletTraceResults));
     
            VectorScale(bulletTraceResults_2.trace.normal, -1.0f, bulletTraceResults_2.trace.normal);
     
            if (hit)
                BG_AdvanceTrace(&bulletFireParams_2, &bulletTraceResults_2, 0.009999999776482582f);
     
            hit_2 = BulletTrace(&bulletFireParams_2, &bulletTraceResults_2, 0, &cg_entitiesArray[cgArray->clientNum], bulletTraceResults_2.hitSurfaceType);
     
            v26 = (hit_2 != 0) && *(BYTE*)((DWORD)&bulletTraceResults_2.trace + 42) || *(BYTE*)((DWORD)&bulletTraceResults.trace + 43) && *(BYTE*)((DWORD)&bulletTraceResults_2.trace + 43);
     
            if (hit_2 || v26)
                break;
            if (!hit)
            {
                return bulletFireParams.damageMultiplier;
            }
            goto continueLoop;
     
    continueLoop:
            if (hit)
            {
                penetrationCount++;
                if (penetrationCount < 5) // max number of surfaces penetrated is 5 (from penetrationCount dvar)
                    continue;
            }
     
            return 0.0f;
        }
     
        // calculate the surface depth
        float surfaceDepth = 0.0f;
        if (v26)
            surfaceDepth = Get3DDistance(bulletFireParams_2.start, bulletFireParams_2.end);
        else
            surfaceDepth = Get3DDistance(bulletTraceResults_2.hitPos, hitPosBackup);
        
        // minimum surface depth is 1.0f
        if (surfaceDepth < 1.0f)
            surfaceDepth = 1.0f;
        
        // if we hit the back side of the wall, set the minimum penetration depth of both surfaces hit as our final penetration depth
        if (hit_2)
        {
            float penetrationDepth_2 = BG_GetSurfacePenetrationDepth(weaponDefPtr, bulletTraceResults_2.hitSurfaceType);
            if (*(WORD*)((DWORD)&cg_entitiesArray[cgArray->clientNum] + 678) == 1 && (*(DWORD*)((DWORD)&clientinfo[cgArray->clientNum] + 389756) & 32))
                penetrationDepth_2 *= perk_bulletPenetrationMultiplier;
            
            penetrationDepth = min(penetrationDepth, penetrationDepth_2);
            
            // we return if our penetration depth is zero or negative
            if (penetrationDepth <= 0.0f)
                return 0.0f;
        }
     
        if (*(WORD*)((DWORD)&cg_entitiesArray[cgArray->clientNum] + 678) == 1)
        {
            if (*(DWORD*)((DWORD)&clientinfo[cgArray->clientNum] + 389756) & 32)
            {
    LABEL_84:
                if (bulletFireParams.damageMultiplier <= 0.0f)
                    return 0.0f;
     
                goto continueLoop;
            }
        }
        
        // decrease our damage multiplier (the fraction)
        bulletFireParams.damageMultiplier -= surfaceDepth / penetrationDepth;
        goto LABEL_84;
     
        // impossibru, this return can't be executed (who cares)
        return 0.0f;
    }
    Here come the leachers :P



     
    https://www.youtube.com/watch?v=-GcAc0kovUs

Page 2 of 2 FirstFirst 12