Merge pull request #339 from BenCat07/patch-5

Fix Toggle and add stickyspam option
This commit is contained in:
nullifiedcat 2018-01-26 19:20:32 +03:00 committed by GitHub
commit 5bb01be43f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,6 +17,8 @@ namespace lagexploit
CatVar toggle(CV_SWITCH, "se_toggle", "0", "Toggle sequence exploit"); CatVar toggle(CV_SWITCH, "se_toggle", "0", "Toggle sequence exploit");
CatVar shoot(CV_SWITCH, "se_shoot", "0", CatVar shoot(CV_SWITCH, "se_shoot", "0",
"Allows instant revving up or shooting two shots at once"); "Allows instant revving up or shooting two shots at once");
CatVar stickyspam(CV_SWITCH, "se_stickyspam", "0",
"Allows Spam of stickies, only works if cat_se_toggle is on and disables shoot/cloak while on.");
CatVar cloak(CV_SWITCH, "se_cloak", "0", "Instant decloak/cloak"); CatVar cloak(CV_SWITCH, "se_cloak", "0", "Instant decloak/cloak");
CatVar instant_weapon_switch(CV_SWITCH, "se_switch", "0", CatVar instant_weapon_switch(CV_SWITCH, "se_switch", "0",
"Instant weapon switch"); "Instant weapon switch");
@ -136,14 +138,14 @@ void CreateMove()
(g_pUserCmd->buttons & IN_ATTACK2)); (g_pUserCmd->buttons & IN_ATTACK2));
if (!LOCAL_E->m_bAlivePlayer) if (!LOCAL_E->m_bAlivePlayer)
return; return;
if (instant_weapon_switch && not HasCondition<TFCond_Cloaked>(LOCAL_E)) if (!stickyspam && instant_weapon_switch && not HasCondition<TFCond_Cloaked>(LOCAL_E))
{ {
static int lastweapon = 0; static int lastweapon = 0;
if (lastweapon != g_pUserCmd->weaponselect) if (lastweapon != g_pUserCmd->weaponselect)
amount = 1 * 90; amount = 1 * 90;
lastweapon = g_pUserCmd->weaponselect; lastweapon = g_pUserCmd->weaponselect;
} }
if (cloak && shoot) if (cloak && shoot && !stickyspam)
{ {
if (g_pLocalPlayer->weapon()->m_iClassID == CL_CLASS(CTFKnife)) if (g_pLocalPlayer->weapon()->m_iClassID == CL_CLASS(CTFKnife))
{ {
@ -164,7 +166,7 @@ void CreateMove()
bWasHolding = (g_pUserCmd->buttons & IN_ATTACK) || bWasHolding = (g_pUserCmd->buttons & IN_ATTACK) ||
(g_pUserCmd->buttons & IN_ATTACK2); (g_pUserCmd->buttons & IN_ATTACK2);
} }
else if (!cloak) else if (!cloak && !stickyspam)
{ {
if (shoot) if (shoot)
{ {
@ -208,9 +210,13 @@ void CreateMove()
} }
} }
if (key.KeyDown() || exticks) if (key.KeyDown() || exticks || toggle)
amount = int(value); amount = int(value);
if (stickyspam) {
if (g_pLocalPlayer->weapon()->m_iClassID == CL_CLASS(CTFPipebombLauncher) && toggle && (g_pUserCmd->buttons & IN_ATTACK)) {
amount = 0;
}
}
if (!amount) if (!amount)
return; return;