Merge pull request #353 from BenCat07/patch-18

insta cloak
This commit is contained in:
BenCat07 2018-02-10 16:47:36 +01:00 committed by GitHub
commit c01b46f836
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,7 +21,9 @@ CatVar stickyspam(CV_SWITCH, "se_stickyspam", "0",
"Allows Spam of stickies simply by holding Mouse1.");
CatVar cloak(CV_SWITCH, "se_cloak", "0", "Instant decloak/cloak");
CatVar cap(CV_SWITCH, "se_cap", "0", "Auto instant cap");
CatVar cart(CV_SWITCH, "se_cart", "0", "Automatically farm points by touching the cart (only works on attacking team)");
CatVar cart(CV_SWITCH, "se_cart", "0", "Automatically farm points by touching "
"the cart (only works on attacking "
"team)");
CatVar instant_weapon_switch(CV_SWITCH, "se_switch", "0",
"Instant weapon switch");
CatVar key(CV_KEY, "se_key", "0", "Sequence exploit key");
@ -209,8 +211,7 @@ void CreateMove()
if (!model)
continue;
const char *model_name = g_IModelInfo->GetModelName(model);
if (strstr("models/props_trainyard/bomb_cart.mdl",
model_name))
if (strstr("models/props_trainyard/bomb_cart.mdl", model_name))
point2 = model;
}
if (!point3)
@ -222,11 +223,11 @@ void CreateMove()
if (!model)
continue;
const char *model_name = g_IModelInfo->GetModelName(model);
if (strstr("models/props_2fort/trainwheel001.mdl",
model_name))
if (strstr("models/props_2fort/trainwheel001.mdl", model_name))
point3 = model;
}
if (!point4) {
if (!point4)
{
CachedEntity *pEnt = ENTITY(i);
if (!CE_GOOD(pEnt))
continue;
@ -234,8 +235,7 @@ void CreateMove()
if (!model)
continue;
const char *model_name = g_IModelInfo->GetModelName(model);
if (strstr("models/custom/dirty_bomb_cart.mdl",
model_name))
if (strstr("models/custom/dirty_bomb_cart.mdl", model_name))
point4 = model;
}
if (!point5)
@ -261,7 +261,8 @@ void CreateMove()
const model_t *model = RAW_ENT(pEnt)->GetModel();
if (!model)
continue;
if (model == point2 || model == point3 || model == point4 || model == point5)
if (model == point2 || model == point3 || model == point4 ||
model == point5)
{
if (!CE_GOOD(LOCAL_E))
continue;
@ -350,6 +351,11 @@ void CreateMove()
{
if (g_pLocalPlayer->weapon()->m_iClassID == CL_CLASS(CTFKnife))
{
if ((g_pUserCmd->buttons & IN_ATTACK2) && !bWasHolding &&
!HasCondition<TFCond_Cloaked>(LOCAL_E))
{
amount = 1 * 90;
}
if ((g_pUserCmd->buttons & IN_ATTACK) && !bWasHolding &&
HasCondition<TFCond_Cloaked>(LOCAL_E))
@ -389,7 +395,6 @@ void CreateMove()
}
if (!amount)
return;
/*g_pUserCmd->command_number += amount;
g_pUserCmd->hasbeenpredicted = true;
*(int *) ((unsigned) g_IBaseClientState + offsets::lastoutgoingcommand()) +=
@ -398,6 +403,7 @@ void CreateMove()
int &m_nOutSequenceNr =
*(int *) ((unsigned) ch + offsets::m_nOutSequenceNr());
m_nOutSequenceNr += amount;
// bSendPacket = true;
}
}
}