Additions:
- Added "cart farm mode" - fixed some code
This commit is contained in:
parent
77f0575493
commit
2e8e612abc
@ -21,6 +21,7 @@ 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 instant_weapon_switch(CV_SWITCH, "se_switch", "0",
|
||||
"Instant weapon switch");
|
||||
CatVar key(CV_KEY, "se_key", "0", "Sequence exploit key");
|
||||
@ -34,6 +35,7 @@ CatCommand do_lagexploit("se_do", "Sequence exploit (for use in scripts)",
|
||||
[]() { AddExploitTicks(6); });
|
||||
int exticks = 0;
|
||||
const model_t *point = nullptr;
|
||||
const model_t *point2 = nullptr;
|
||||
void AddExploitTicks(int ticks)
|
||||
{
|
||||
exticks = std::max(ticks, exticks);
|
||||
@ -158,7 +160,8 @@ void CreateMove()
|
||||
else
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!point)
|
||||
continue;
|
||||
CachedEntity *pEnt = ENTITY(i);
|
||||
if (!CE_GOOD(pEnt))
|
||||
continue;
|
||||
@ -190,6 +193,58 @@ void CreateMove()
|
||||
}
|
||||
}
|
||||
}
|
||||
if (cart)
|
||||
{
|
||||
for (int i = 1; i < HIGHEST_ENTITY; i++)
|
||||
{
|
||||
if (!point2)
|
||||
{
|
||||
CachedEntity *pEnt = ENTITY(i);
|
||||
if (!CE_GOOD(pEnt))
|
||||
continue;
|
||||
const model_t *model = RAW_ENT(pEnt)->GetModel();
|
||||
if (!model)
|
||||
continue;
|
||||
const char *model_name = g_IModelInfo->GetModelName(model);
|
||||
if (strstr("models/props_trainyard/bomb_cart.mdl",
|
||||
model_name))
|
||||
point2 = model;
|
||||
else
|
||||
continue;
|
||||
}
|
||||
if (!point2)
|
||||
continue;
|
||||
CachedEntity *pEnt = ENTITY(i);
|
||||
if (!CE_GOOD(pEnt))
|
||||
continue;
|
||||
if (pEnt->m_iTeam == LOCAL_E->m_iTeam)
|
||||
continue;
|
||||
const model_t *model = RAW_ENT(pEnt)->GetModel();
|
||||
if (!model)
|
||||
continue;
|
||||
if (model == point2)
|
||||
{
|
||||
if (!CE_GOOD(LOCAL_E))
|
||||
continue;
|
||||
ICollideable *c = RAW_ENT(pEnt)->GetCollideable();
|
||||
ICollideable *p = RAW_ENT(LOCAL_E)->GetCollideable();
|
||||
const Vector &max1 =
|
||||
p->OBBMaxs() + RAW_ENT(LOCAL_E)->GetAbsOrigin();
|
||||
const Vector &min1 =
|
||||
p->OBBMins() + RAW_ENT(LOCAL_E)->GetAbsOrigin();
|
||||
const Vector &max2 =
|
||||
c->OBBMaxs() + pEnt->m_vecOrigin + Vector(10, 10, 10);
|
||||
const Vector &min2 =
|
||||
c->OBBMins() + pEnt->m_vecOrigin - Vector(10, 10, 10);
|
||||
if ((min1.x <= max2.x && max1.x >= min2.x) &&
|
||||
(min1.y <= max2.y && max1.y >= min2.y) &&
|
||||
(min1.z <= max2.z && max1.z >= min2.z))
|
||||
{
|
||||
amount = 50;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (instant_weapon_switch && not HasCondition<TFCond_Cloaked>(LOCAL_E))
|
||||
{
|
||||
static int lastweapon = 0;
|
||||
|
Reference in New Issue
Block a user