Osiris: (Request) Auto-JumpBug

Created on 2 Jan 2020  Â·  38Comments  Â·  Source: danielkrupinski/Osiris

Hello,
This may be a overly requested feature/thing and I might be just digging a hole to myself, but if it is possible for to add an Auto-JumpBug feature would be greatly appreciated. I'm not much of a coder and am still trying to learn a lot of stuff, i did try to add this feature but.. well not knowing too much ended in me rage-quitting on trying to add it. I know a lot of you will be very triggered by this post and most will simply ignore it like rest of the other requests like this one.
I am really sorry but like I said I would love that feature being added to the cheat.
I apologise if this was a waste of time, as I do know many of you are busy people.
Thank you.

Here's some links to assist with code for this feature:
https://github.com/Matherunner/tastools/blob/master/injectlib/movement.cpp#L697
https://www.unknowncheats.me/forum/counterstrike-global-offensive/336573-jump-bug-stamina-bug.html (this one is a help kind of thing but it does have some code in it which could possibly help.)
https://hatebin.com/iqoihvrdbn
https://www.unknowncheats.me/forum/counterstrike-global-offensive/245186-jump-bug.html

I also have some lua files for coding this if someone is able to convert luas to code and add it.
Here's one if needed:

skeet_jumpbug_lua_v1.txt

PS. I am new to github and majority of the things so pls dont bully me.

I apologise for this trash post.

All 38 comments

need engine prediction for this btw ^^
also duplicate issue obviously https://github.com/danielkrupinski/Osiris/issues/773

need engine prediction for this btw ^^
also duplicate issue obviously #773

you may need engine prediction, in theory you can trace a ray to the ground, check the distance beetwen the ground and you ,and when close to (i think) 7 units uncrouch

altough this is a duplicate, it is of quality and has references. (are you from stack overflow?)
i dont think anybody is going to add auto jumpbug as is because there are other things that need to be improved (resolver, legit aa)

altough this is a duplicate, it is of quality and has references. (are you from stack overflow?)
i dont think anybody is going to add auto jumpbug as is because there are other things that need to be improved (resolver, legit aa)

Thank you for the reply, also what do you mean by stack overflow. It was just a request, I don't mind it not being accepted, although it may be a common asked thing.

@notgoodusename close it :heart:

thats not the original poster nor repo owner so they can't close it.

bool bDidJump;
bool unduck;

void Misc::jumpBug(UserCmd* cmd) noexcept
{

    //if (!config.misc.edgejump) return;

    const auto localPlayer = interfaces.entityList->getEntity(interfaces.engine->getLocalPlayer());

    if (!localPlayer || !localPlayer->isAlive())
        return;

    float max_radias = M_PI * 2;
    float step = max_radias / 128;
    float xThick = 23;

    if (/*!config.misc.bunnyHop && */GetAsyncKeyState(config.misc.jumpBugKey) && (localPlayer->flags() & (1 << 0))) {
        //config.misc.bunnyHop = false;

        const auto [width, height] = interfaces.surface->getScreenSize();
        if (unduck) {
            bDidJump = false;
            cmd->buttons |= UserCmd::IN_DUCK; // duck
            cmd->buttons |= UserCmd::IN_JUMP; // jump
            unduck = false;
        }
        Vector pos = localPlayer->origin();
        for (float a = 0.f; a < max_radias; a += step) {
            Vector pt;
            pt.x = (xThick * cos(a)) + pos.x;
            pt.y = (xThick * sin(a)) + pos.y;
            pt.z = pos.z;


            Vector pt2 = pt;
            pt2.z -= 6;

            Trace fag;

            Ray ray = Ray(pt, pt2);

            TraceFilter flt = localPlayer;

            interfaces.engineTrace->traceRay(ray, 0x1400B, flt, fag);

            if (fag.fraction != 1.f && fag.fraction != 0.f) {
                bDidJump = true;
                cmd->buttons |= UserCmd::IN_DUCK; // duck
                cmd->buttons |= UserCmd::IN_JUMP; // jump
                unduck = true;
            }
        }
        for (float a = 0.f; a < max_radias; a += step) {
            Vector pt;
            pt.x = ((xThick - 2.f) * cos(a)) + pos.x;
            pt.y = ((xThick - 2.f) * sin(a)) + pos.y;
            pt.z = pos.z;

            Vector pt2 = pt;
            pt2.z -= 6;

            Trace fag;

            Ray ray = Ray(pt, pt2);

            TraceFilter flt = localPlayer;
            interfaces.engineTrace->traceRay(ray, 0x1400B, flt, fag);

            if (fag.fraction != 1.f && fag.fraction != 0.f) {
                bDidJump = true;
                cmd->buttons |= UserCmd::IN_DUCK;; // duck
                cmd->buttons |= UserCmd::IN_JUMP; // jump
                unduck = true;
            }
        }
        for (float a = 0.f; a < max_radias; a += step) {
            Vector pt;
            pt.x = ((xThick - 20.f) * cos(a)) + pos.x;
            pt.y = ((xThick - 20.f) * sin(a)) + pos.y;
            pt.z = pos.z;

            Vector pt2 = pt;
            pt2.z -= 6;

            Trace fag;

            Ray ray = Ray(pt, pt2);

            TraceFilter flt = localPlayer;
            interfaces.engineTrace->traceRay(ray, 0x1400B, flt, fag);

            if (fag.fraction != 1.f && fag.fraction != 0.f) {
                bDidJump = true;
                cmd->buttons |= UserCmd::IN_DUCK; // duck
                cmd->buttons |= UserCmd::IN_JUMP; // jump
                unduck = true;
            }
        }
    }



    //else { config.misc.bunnyHop = true; }

}

need some help fixing up this code. it doesnt work but it should be close

@streamshark would be nice if you could help out

what doesn't work with it? what happens when you try to use that

I would guess this part
Ray ray = Ray(pt, pt2);
that should be deleted

and this should be
interfaces.engineTrace->traceRay({pt, pt2}, 0x1400B, flt, fag); and probably something else flag related

@streamshark it just jump crouches
@KibbeWater will try later

@streamshark it just jump crouches
@KibbeWater will try later

I think theres a better code for this out there. A friend of mine sent source from void.to that I'm still trying to get to work but I'm learning atleast

it's been updated to this

static bool bDidJump;
static bool unduck;
static bool bhopWasEnabled;

void Misc::jumpBug(UserCmd* cmd) noexcept
{

    if (!config.misc.jumpBug) return;

    const auto localPlayer = interfaces.entityList->getEntity(interfaces.engine->getLocalPlayer());

    if (!localPlayer || !localPlayer->isAlive())
        return;

    float max_radias = M_PI * 2;
    float step = max_radias / 128;
    float xThick = 23;

    if (GetAsyncKeyState(config.misc.jumpBugKey) && (localPlayer->flags() & (1 << 0))) {
        if (config.misc.bunnyHop) {
            config.misc.bunnyHop = false;
            bhopWasEnabled = true;
        }

        const auto [width, height] = interfaces.surface->getScreenSize();
        if (unduck) {
            bDidJump = false;
            cmd->buttons |= UserCmd::IN_DUCK; // duck
            cmd->buttons |= UserCmd::IN_JUMP; // jump
            unduck = false;
        }
        Vector pos = localPlayer->origin();
        for (float a = 0.f; a < max_radias; a += step) {
            Vector pt;
            pt.x = (xThick * cos(a)) + pos.x;
            pt.y = (xThick * sin(a)) + pos.y;
            pt.z = pos.z;


            Vector pt2 = pt;
            pt2.z -= 6;

            Trace fag;

            TraceFilter flt = localPlayer;

            interfaces.engineTrace->traceRay({pt, pt2}, 0x1400B, flt, fag);

            if (fag.fraction != 1.f && fag.fraction != 0.f) {
                bDidJump = true;
                cmd->buttons |= UserCmd::IN_DUCK; // duck
                cmd->buttons |= UserCmd::IN_JUMP; // jump
                unduck = true;
            }
        }
        for (float a = 0.f; a < max_radias; a += step) {
            Vector pt;
            pt.x = ((xThick - 2.f) * cos(a)) + pos.x;
            pt.y = ((xThick - 2.f) * sin(a)) + pos.y;
            pt.z = pos.z;

            Vector pt2 = pt;
            pt2.z -= 6;

            Trace fag;

            TraceFilter flt = localPlayer;
            interfaces.engineTrace->traceRay({ pt, pt2 }, 0x1400B, flt, fag);

            if (fag.fraction != 1.f && fag.fraction != 0.f) {
                bDidJump = true;
                cmd->buttons |= UserCmd::IN_DUCK;; // duck
                cmd->buttons |= UserCmd::IN_JUMP; // jump
                unduck = true;
            }
        }
        for (float a = 0.f; a < max_radias; a += step) {
            Vector pt;
            pt.x = ((xThick - 20.f) * cos(a)) + pos.x;
            pt.y = ((xThick - 20.f) * sin(a)) + pos.y;
            pt.z = pos.z;

            Vector pt2 = pt;
            pt2.z -= 6;

            Trace fag;

            TraceFilter flt = localPlayer;
            interfaces.engineTrace->traceRay({ pt, pt2 }, 0x1400B, flt, fag);

            if (fag.fraction != 1.f && fag.fraction != 0.f) {
                bDidJump = true;
                cmd->buttons |= UserCmd::IN_DUCK; // duck
                cmd->buttons |= UserCmd::IN_JUMP; // jump
                unduck = true;
            }
        }
    }



    else if (bhopWasEnabled) { 
        config.misc.bunnyHop = true; 
        bhopWasEnabled = false;
    }

}

still doesnt work though

pasting isn't learning; you have to right your own code to learn.
void.to is literally a pasting website

it's been updated to this

static bool bDidJump;
static bool unduck;
static bool bhopWasEnabled;

void Misc::jumpBug(UserCmd* cmd) noexcept
{

    if (!config.misc.jumpBug) return;

    const auto localPlayer = interfaces.entityList->getEntity(interfaces.engine->getLocalPlayer());

    if (!localPlayer || !localPlayer->isAlive())
        return;

    float max_radias = M_PI * 2;
    float step = max_radias / 128;
    float xThick = 23;

    if (GetAsyncKeyState(config.misc.jumpBugKey) && (localPlayer->flags() & (1 << 0))) {
        if (config.misc.bunnyHop) {
            config.misc.bunnyHop = false;
            bhopWasEnabled = true;
        }

        const auto [width, height] = interfaces.surface->getScreenSize();
        if (unduck) {
            bDidJump = false;
            cmd->buttons |= UserCmd::IN_DUCK; // duck
            cmd->buttons |= UserCmd::IN_JUMP; // jump
            unduck = false;
        }
        Vector pos = localPlayer->origin();
        for (float a = 0.f; a < max_radias; a += step) {
            Vector pt;
            pt.x = (xThick * cos(a)) + pos.x;
            pt.y = (xThick * sin(a)) + pos.y;
            pt.z = pos.z;


            Vector pt2 = pt;
            pt2.z -= 6;

            Trace fag;

            TraceFilter flt = localPlayer;

            interfaces.engineTrace->traceRay({pt, pt2}, 0x1400B, flt, fag);

            if (fag.fraction != 1.f && fag.fraction != 0.f) {
                bDidJump = true;
                cmd->buttons |= UserCmd::IN_DUCK; // duck
                cmd->buttons |= UserCmd::IN_JUMP; // jump
                unduck = true;
            }
        }
        for (float a = 0.f; a < max_radias; a += step) {
            Vector pt;
            pt.x = ((xThick - 2.f) * cos(a)) + pos.x;
            pt.y = ((xThick - 2.f) * sin(a)) + pos.y;
            pt.z = pos.z;

            Vector pt2 = pt;
            pt2.z -= 6;

            Trace fag;

            TraceFilter flt = localPlayer;
            interfaces.engineTrace->traceRay({ pt, pt2 }, 0x1400B, flt, fag);

            if (fag.fraction != 1.f && fag.fraction != 0.f) {
                bDidJump = true;
                cmd->buttons |= UserCmd::IN_DUCK;; // duck
                cmd->buttons |= UserCmd::IN_JUMP; // jump
                unduck = true;
            }
        }
        for (float a = 0.f; a < max_radias; a += step) {
            Vector pt;
            pt.x = ((xThick - 20.f) * cos(a)) + pos.x;
            pt.y = ((xThick - 20.f) * sin(a)) + pos.y;
            pt.z = pos.z;

            Vector pt2 = pt;
            pt2.z -= 6;

            Trace fag;

            TraceFilter flt = localPlayer;
            interfaces.engineTrace->traceRay({ pt, pt2 }, 0x1400B, flt, fag);

            if (fag.fraction != 1.f && fag.fraction != 0.f) {
                bDidJump = true;
                cmd->buttons |= UserCmd::IN_DUCK; // duck
                cmd->buttons |= UserCmd::IN_JUMP; // jump
                unduck = true;
            }
        }
    }



    else if (bhopWasEnabled) { 
        config.misc.bunnyHop = true; 
        bhopWasEnabled = false;
    }

}

still doesnt work though

what errors

pasting isn't learning; you have to right your own code to learn.
void.to is literally a pasting website

I'm learning to adapt it to my own script. Just cause I'm pasting doesn't mean that I'm not doing anything. I still get some kind of understanding how to use c++

no errors, it just doesnt function as expected in game

Then I don't know what to do, So I will just leave it to others. good luck

got it to work but needs even more work because it doesnt properly detect floors if they arent flat. we need circle detection.

   X  X  X
X           X
X     X     X
X           X
   X  X  X

or if we can cast a really big ray that would probably also work

if someone could tell me the size of the player feet collision box that would be really helpful

on a seperate note im having trouble saving the keybind and checkbox of jumpbug

If player is on air start a ray from player's abs origin to 4 units down
When the ray touches the ground, tap the duck button.
Simple, dont overcomplicate stuff

I just got my email blasted. Also people has gotten this to work like 80%-100% of the times so I really don't think theres anything with Osiris thats limiting

Effex the issue is the duck needs to be precisely timed so any unevenness in landing surface can throw off timing. Single ray method is unreliable

just scan in a radius around the player, orthographically, of course.
the highest value you get is where the floor is.

I don't know about cs but in tf2 the player collisions are cubes rather than capsules.
if you did a raycast every 4 units around a squares perimeter you would only have to do 32 casts.

or if we can cast a really big ray that would probably also work

if possible this is better than casting a bunch of rays in a pattern

https://sm.alliedmods.net/new-api/sdktools_trace/TR_TraceHull
from AlliedMods: player col box size is 32x32x72
mins {-16.0, -16.0, 0.0} maxs {16.0, 16.0, 72.0}

if someone can hook tracehull we could use the player col box size to just trace the size of it downwards

is SourceMod a thing all servers run or is it a plugin? it might be server side only.

source sdk uses UTIL_TRACEHULL frequently but it looks like you can use the regular enginetrace function to trace a hull if you set it up right, here's what I found on unknowncheats:

void TraceHull(Vector3 &src, Vector3 &end, trace_t &tr)
{
    Ray_t ray;
    ray.Init(src, end, Vector3(-2.0f, -2.0f, -2.0f), Vector3(2.0f, 2.0f, 2.0f));

    CTraceFilterWorldAndPropsOnly filter;

    g_pEngineTrace->TraceRay(ray, 0x200400B, &filter, &tr);
}

hard to find definition of UTIL_TRACEHULL for source sdk on github so it might just do this

mp\src\game\shared\util_shared.h
line 227:

inline void UTIL_TraceHull( const Vector &vecAbsStart, const Vector &vecAbsEnd, const Vector &hullMin, const Vector &hullMax, unsigned int mask, const IHandleEntity *ignore, int collisionGroup, trace_t *ptr )

or if we can cast a really big ray that would probably also work

what is this supposed to mean lol

or if we can cast a really big ray that would probably also work

what is this supposed to mean lol

he was referring to trace hull, like cast a large ray that spans the width of player collision box instead of a bunch of small rays

i did exactly that using nested while statements but its not good enough

On Mon, 9 Mar 2020, 13:10 streamshark, notifications@github.com wrote:

or if we can cast a really big ray that would probably also work

what is this supposed to mean lol

he was referring to trace hull, like cast a large ray that spans the width
of player collision box instead of a bunch of small rays

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/danielkrupinski/Osiris/issues/938?email_source=notifications&email_token=AFZ5SBGM73Q5MGDSAEER2SLRGSB33A5CNFSM4KCBOFW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOFVOQQ#issuecomment-596334402,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFZ5SBFOSXG7DGCLRTUQPF3RGSB33ANCNFSM4KCBOFWQ
.

nested while statements is O(n^2)?

would engine prediction be better or would tracerays be better in thie case

engine prediction by far

On Wed, 11 Mar 2020, 14:54 poopings, notifications@github.com wrote:

would engine prediction be better or would tracerays be better in thie case

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/danielkrupinski/Osiris/issues/938?email_source=notifications&email_token=AFZ5SBEH5KLZWQH3J7XQJYTRG4YSLA5CNFSM4KCBOFW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOOLM4Q#issuecomment-597472882,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFZ5SBBJNLQEJ4W3CZHJNA3RG4YSLANCNFSM4KCBOFWQ
.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kschou95 picture kschou95  Â·  3Comments

hvhdark picture hvhdark  Â·  3Comments

nosexynomoney picture nosexynomoney  Â·  3Comments

B0ruK picture B0ruK  Â·  3Comments

nikita-tarasov3 picture nikita-tarasov3  Â·  3Comments