static catvar bhop
This commit is contained in:
parent
ec4d673171
commit
453a6f63b8
@ -58,7 +58,6 @@ bool hack::shutdown = false;
|
||||
void hack::InitHacks() {
|
||||
//ADD_HACK(FollowBot);
|
||||
ADD_HACK(Misc);
|
||||
ADD_HACK(Bunnyhop);
|
||||
ADD_HACK(ESP);
|
||||
}
|
||||
|
||||
@ -183,7 +182,6 @@ void hack::Shutdown() {
|
||||
ConVar_Unregister();
|
||||
//DELETE_HACK(FollowBot);
|
||||
DELETE_HACK(Misc);
|
||||
DELETE_HACK(Bunnyhop);
|
||||
DELETE_HACK(ESP);
|
||||
hacks::shared::killsay::Shutdown();
|
||||
}
|
||||
|
@ -10,7 +10,37 @@
|
||||
#include "../common.h"
|
||||
#include "../sdk.h"
|
||||
|
||||
DEFINE_HACK_SINGLETON(Bunnyhop);
|
||||
namespace hacks { namespace shared { namespace bunnyhop {
|
||||
|
||||
CatVar enabled(CV_SWITCH, "bhop_enabled", "0", "Bunnyhop", NULL, "Enable Bunnyhop. All extra features like autojump and perfect jump limit were temporary removed.");
|
||||
|
||||
int iTicksFlying { 0 };
|
||||
int iTicksLastJump { 0 };
|
||||
|
||||
void CreateMove() {
|
||||
if (!enabled) return;
|
||||
if (HasCondition(g_pLocalPlayer->entity, TFCond_GrapplingHook)) return;
|
||||
int flags = CE_INT(g_pLocalPlayer->entity, netvar.iFlags);
|
||||
|
||||
bool ground = (flags & (1 << 0));
|
||||
bool jump = (g_pUserCmd->buttons & IN_JUMP);
|
||||
|
||||
if (ground) {
|
||||
iTicksFlying = 0;
|
||||
} else {
|
||||
iTicksFlying++;
|
||||
}
|
||||
|
||||
if (!ground && jump) {
|
||||
if (iTicksLastJump++ >= 20) g_pUserCmd->buttons = g_pUserCmd->buttons &~ IN_JUMP;
|
||||
}
|
||||
if (!jump) iTicksLastJump = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
}}}
|
||||
|
||||
/*DEFINE_HACK_SINGLETON(Bunnyhop);
|
||||
|
||||
Bunnyhop::Bunnyhop() {
|
||||
this->v_bEnabled = new CatVar(CV_SWITCH, "bhop_enabled", "0", "Enable", NULL, "Enable Bunnyhop");
|
||||
@ -71,4 +101,4 @@ void Bunnyhop::ProcessUserCmd(CUserCmd* cmd) {
|
||||
}
|
||||
if (!jump) iTicksLastJump = 0;
|
||||
return;
|
||||
}
|
||||
}*/
|
||||
|
@ -12,20 +12,12 @@
|
||||
|
||||
class ConVar;
|
||||
|
||||
class Bunnyhop : public IHack {
|
||||
public:
|
||||
Bunnyhop();
|
||||
namespace hacks { namespace shared { namespace bunnyhop {
|
||||
|
||||
virtual void ProcessUserCmd(CUserCmd*) override;
|
||||
extern CatVar enabled;
|
||||
|
||||
CatVar* v_bEnabled;
|
||||
CatVar* v_iPerfectJumpLimit;
|
||||
CatVar* v_bImperfect;
|
||||
CatVar* v_bAutoJump;
|
||||
CatVar* v_iAutoJumpSpeed;
|
||||
bool m_bFakeLagFix;
|
||||
};
|
||||
void CreateMove();
|
||||
|
||||
DECLARE_HACK_SINGLETON(Bunnyhop);
|
||||
}}}
|
||||
|
||||
#endif /* HBUNNYHOP_H_ */
|
||||
|
@ -20,7 +20,6 @@ public:
|
||||
virtual void ProcessUserCmd(CUserCmd*) override;
|
||||
virtual void Draw() override;
|
||||
|
||||
//ConVar* v_bNoShootUntilCanHeadshot;
|
||||
CatVar* v_bDebugInfo;
|
||||
ConCommand* c_Name;
|
||||
ConVar* v_bInfoSpam;
|
||||
|
@ -99,7 +99,7 @@ bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) {
|
||||
SAFE_CALL(HACK_PROCESS_USERCMD(ESP, cmd));
|
||||
if (!g_pLocalPlayer->life_state && CE_GOOD(g_pLocalPlayer->weapon())) {
|
||||
if (TF2) SAFE_CALL(hacks::tf2::noisemaker::CreateMove());
|
||||
SAFE_CALL(HACK_PROCESS_USERCMD(Bunnyhop, cmd));
|
||||
SAFE_CALL(hacks::shared::bunnyhop::CreateMove());
|
||||
SAFE_CALL(hacks::shared::aimbot::CreateMove());
|
||||
SAFE_CALL(hacks::shared::antiaim::ProcessUserCmd(cmd));
|
||||
if (TF) SAFE_CALL(hacks::tf::autosticky::CreateMove());
|
||||
|
Reference in New Issue
Block a user