degeneratehyperbola / NEPS

Bloat-free CS:GO multihack for Windows, based on Osiris. You should probably give it a go, as it was in development for about 2 years. Formerly a griefing cheat that developed into a semi-rage multihack, with many features added, bugs fixed, things optimized and more!
Other
263 stars 59 forks source link

add quick_peek #90

Closed wuuxiehacker303 closed 2 years ago

wuuxiehacker303 commented 2 years ago

I think adding a quick peek to NEPS can help NEPS become a good semi-rage multihack,This is my code,Handling from osiris,But I ran into some problems,So he can only use it once,And you don't trigger it when you shoot,I hope you can fix it and add it,I'll only have so much,I'm stupid

`struct customCmd { float forwardmove; float sidemove; float upmove; }; bool hasShot = false; int qpCount; Vector quickpeekstartpos = Vector{ 0, 0, 0 }; std::vectorusercmdQuickpeek; void Misc::gotoStart(UserCmd* cmd) {

if (usercmdQuickpeek.empty()) return;
if (hasShot)
{
    if (qpCount > 0)
    {
        cmd->upmove = -usercmdQuickpeek.at(qpCount).upmove;
        cmd->sidemove = -usercmdQuickpeek.at(qpCount).sidemove;
        cmd->forwardmove = -usercmdQuickpeek.at(qpCount).forwardmove;
        qpCount--;
    }
}
else
{
    qpCount = usercmdQuickpeek.size();
}

}

void Misc::quickpeek(UserCmd* cmd) { if (static Helpers::KeyBindState flag; !flag[config->movement.quickpeekkey]) return; if (config->movement.quickpeek && (localPlayer->flags() & PlayerFlag_OnGround)) {

    if (!localPlayer || localPlayer->isDormant() || !localPlayer->isAlive()) return;
    if ((EnginePrediction::getFlags() & PlayerFlag_OnGround)) {
        if (quickpeekstartpos == Vector{ 0, 0, 0 }) {
            quickpeekstartpos = localPlayer->getAbsOrigin();
        }
        else {
            customCmd tempCmd = {};
            tempCmd.forwardmove = cmd->forwardmove;
            tempCmd.sidemove = cmd->sidemove;
            tempCmd.upmove = cmd->upmove;

            if (cmd->buttons & UserCmd::Button_Attack) hasShot = true;
            gotoStart(cmd);

            if (!hasShot)
                usercmdQuickpeek.push_back(tempCmd);
        }
    }
    else {
        hasShot = false;
        quickpeekstartpos = Vector{ 0, 0, 0 };
        usercmdQuickpeek.clear();
    }
}

} `

SK0lll commented 2 years ago

Well, this is not how to make a proper pull request. Guide

degeneratehyperbola commented 2 years ago

Thank you for Your contribution however SK0lll is right, unfortunately for You this PR isn't being merged