Merge pull request #342 from BenCat07/patch-7

Important Updates:
This commit is contained in:
nullifiedcat 2018-02-01 19:56:15 +03:00 committed by GitHub
commit c7ad6a55fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,7 @@ 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", 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."); "Allows Spam of stickies simply by holding Mouse1.");
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");
@ -138,46 +138,50 @@ 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 (!stickyspam && instant_weapon_switch && not HasCondition<TFCond_Cloaked>(LOCAL_E)) if (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 && !stickyspam) if (cloak && shoot)
{ {
if (g_pLocalPlayer->weapon()->m_iClassID == CL_CLASS(CTFKnife))
{
if ((g_pUserCmd->buttons & IN_ATTACK) && !bWasHolding && if ((g_pUserCmd->buttons & IN_ATTACK) && !bWasHolding &&
HasCondition<TFCond_Cloaked>(LOCAL_E)) HasCondition<TFCond_Cloaked>(LOCAL_E) &&
{ g_pLocalPlayer->weapon()->m_iClassID == CL_CLASS(CTFKnife))
g_pUserCmd->buttons &= ~IN_ATTACK; {
g_pUserCmd->buttons |= IN_ATTACK2; g_pUserCmd->buttons &= ~IN_ATTACK;
amount = 2 * 90; g_pUserCmd->buttons |= IN_ATTACK2;
} amount = 2 * 90;
} }
else if (CanShoot() && bIsHolding && !bWasHolding && g_pLocalPlayer->weapon()->m_iClassID != CL_CLASS(CTFFlareGun)) else if (CanShoot() && bIsHolding && !bWasHolding &&
amount = 1 * 90; g_pLocalPlayer->weapon()->m_iClassID != CL_CLASS(CTFFlareGun))
else if (CanShoot() && bIsHolding && !bWasHolding && g_pLocalPlayer->weapon()->m_iClassID == CL_CLASS(CTFFlareGun)) amount = 1 * 90;
amount = 2 * 90; else if (CanShoot() && bIsHolding && !bWasHolding &&
g_pLocalPlayer->weapon()->m_iClassID == CL_CLASS(CTFFlareGun))
amount = 2 * 90;
else if (bWasHolding && !bIsHolding) else if (bWasHolding && !bIsHolding)
amount = 1 * 90; amount = 1 * 90;
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 && !stickyspam) else if (!cloak)
{ {
if (shoot) if (shoot)
{ {
if (not g_pLocalPlayer->holding_sniper_rifle) if (not g_pLocalPlayer->holding_sniper_rifle)
{ {
if (CanShoot() && bIsHolding && !bWasHolding && g_pLocalPlayer->weapon()->m_iClassID != CL_CLASS(CTFFlareGun)) if (CanShoot() && bIsHolding && !bWasHolding &&
g_pLocalPlayer->weapon()->m_iClassID !=
CL_CLASS(CTFFlareGun))
amount = 1 * 90; amount = 1 * 90;
else if (CanShoot() && bIsHolding && !bWasHolding && g_pLocalPlayer->weapon()->m_iClassID == CL_CLASS(CTFFlareGun)) else if (CanShoot() && bIsHolding && !bWasHolding &&
amount = 2 * 90; g_pLocalPlayer->weapon()->m_iClassID ==
CL_CLASS(CTFFlareGun))
amount = 2 * 90;
else if (bWasHolding && !bIsHolding) else if (bWasHolding && !bIsHolding)
amount = 1 * 90; amount = 1 * 90;
bWasHolding = (g_pUserCmd->buttons & IN_ATTACK) || bWasHolding = (g_pUserCmd->buttons & IN_ATTACK) ||
@ -216,18 +220,34 @@ void CreateMove()
if (key.KeyDown() || exticks || toggle) 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)) { // Thanks Wheaties For help!
amount = 0; if (stickyspam)
} {
} if (g_pLocalPlayer->weapon()->m_iClassID == (CL_CLASS(CTFCannon)) ||
g_pLocalPlayer->weapon()->m_iClassID ==
(CL_CLASS(CTFPipebombLauncher)))
{
static bool bSwitch = false;
if ((g_pUserCmd->buttons & IN_ATTACK) && !bSwitch)
{
bSwitch = true;
}
else if (bSwitch)
{
amount = 1 * 50;
g_pUserCmd->buttons &= ~IN_ATTACK;
bSwitch = false;
}
}
}
if (!amount) if (!amount)
return; return;
g_pUserCmd->command_number += amount; /*g_pUserCmd->command_number += amount;
*(int*)((unsigned)g_IBaseClientState + offsets::lastoutgoingcommand()) += g_pUserCmd->hasbeenpredicted = true;
amount; *(int *) ((unsigned) g_IBaseClientState + offsets::lastoutgoingcommand()) +=
amount;*/
INetChannel *ch = (INetChannel *) g_IEngine->GetNetChannelInfo(); INetChannel *ch = (INetChannel *) g_IEngine->GetNetChannelInfo();
int &m_nOutSequenceNr = int &m_nOutSequenceNr =
*(int *) ((unsigned) ch + offsets::m_nOutSequenceNr()); *(int *) ((unsigned) ch + offsets::m_nOutSequenceNr());