This commit is contained in:
BenCat07 2018-04-18 20:06:43 +02:00
parent a751866c30
commit 00ccda80bf
2 changed files with 81 additions and 21 deletions

View File

@ -21,6 +21,7 @@ CatVar shoot(CV_SWITCH, "se_shoot", "0", "Instant revvup/shoot",
// SHOUTOUTS TO BLACKFIRE // SHOUTOUTS TO BLACKFIRE
CatVar doom(CV_SWITCH, "se_doom", "0", "Shoot 2+ shots at once", CatVar doom(CV_SWITCH, "se_doom", "0", "Shoot 2+ shots at once",
"See Center string on activation."); "See Center string on activation.");
CatVar piss(CV_SWITCH, "se_piss", "0", "Piss", "Spam Jarate");
CatVar razorback(CV_SWITCH, "se_antirazorback", "0", "Anti-Razorback", CatVar razorback(CV_SWITCH, "se_antirazorback", "0", "Anti-Razorback",
"Stab through razorbacks"); "Stab through razorbacks");
CatVar stickyspam(CV_SWITCH, "se_stickyspam", "0", "Sticky spam", CatVar stickyspam(CV_SWITCH, "se_stickyspam", "0", "Sticky spam",
@ -422,14 +423,14 @@ void CreateMove()
{ {
if (lastwep != g_pLocalPlayer->weapon()->m_iClassID) if (lastwep != g_pLocalPlayer->weapon()->m_iClassID)
{ {
amount = 2 * 90; amount = 4 * 66;
lastwep = g_pLocalPlayer->weapon()->m_iClassID; lastwep = g_pLocalPlayer->weapon()->m_iClassID;
} }
} }
// SHOUTOUTS TO BLACKFIRE // SHOUTOUTS TO BLACKFIRE
if (doom || razorback) if (doom || razorback)
{ {
static int i = 0; static int i = 0;
static int i2 = 0; static int i2 = 0;
servertime = servertime =
(float) (CE_INT(g_pLocalPlayer->entity, netvar.nTickBase)) * (float) (CE_INT(g_pLocalPlayer->entity, netvar.nTickBase)) *
@ -440,31 +441,41 @@ void CreateMove()
CE_FLOAT(g_pLocalPlayer->weapon(), netvar.flNextPrimaryAttack); CE_FLOAT(g_pLocalPlayer->weapon(), netvar.flNextPrimaryAttack);
if (!nextattack2 || !i || if (!nextattack2 || !i ||
g_pLocalPlayer->weapon()->m_iClassID != lastwep) g_pLocalPlayer->weapon()->m_iClassID != lastwep)
nextattack2 = nextattack2 = CE_FLOAT(g_pLocalPlayer->weapon(),
CE_FLOAT(g_pLocalPlayer->weapon(), netvar.flNextSecondaryAttack); netvar.flNextSecondaryAttack);
if (servertime - nextattack > 75.0f) if (servertime - nextattack > 75.0f)
nextattack = servertime - 75.0f; nextattack = servertime - 75.0f;
if (servertime - nextattack2 > 75.0f) if (servertime - nextattack2 > 75.0f)
nextattack2 = servertime - 75.0f; nextattack2 = servertime - 75.0f;
if (doom && servertime - nextattack > 0.0f && g_pUserCmd->buttons & IN_ATTACK) if (doom && servertime - nextattack > 0.0f &&
g_pUserCmd->buttons & IN_ATTACK)
{ {
if (!i) if (!i)
i = ((int) servertime - (int) nextattack); i = ((int) servertime - (int) nextattack);
amount = i * 66; static bool bSwitcc = true;
if (CE_INT(g_pLocalPlayer->weapon(), netvar.m_iClip1) == 0) if (CE_INT(LOCAL_E, netvar.iItemDefinitionIndex) == 58)
g_pUserCmd->buttons &= ~IN_ATTACK; bSwitcc = !bSwitcc;
else
bSwitcc = true;
if (bSwitcc)
{
amount = i * 66;
if (CE_INT(g_pLocalPlayer->weapon(), netvar.m_iClip1) == 0)
g_pUserCmd->buttons &= ~IN_ATTACK;
}
} }
if (doom && servertime - nextattack2 > 0.0f && g_pUserCmd->buttons & IN_ATTACK2) { if (doom && servertime - nextattack2 > 0.0f &&
g_pUserCmd->buttons & IN_ATTACK2)
{
if (!i2) if (!i2)
i2 = ((int) servertime - (int) nextattack2); i2 = ((int) servertime - (int) nextattack2);
amount = i2 * 66; amount = i2 * 66;
if (CE_INT(g_pLocalPlayer->weapon(), netvar.m_iClip2) == 0) if (CE_INT(g_pLocalPlayer->weapon(), netvar.m_iClip2) == 0)
g_pUserCmd->buttons &= ~IN_ATTACK2; g_pUserCmd->buttons &= ~IN_ATTACK2;
} }
if (razorback && servertime - nextattack > 3.0f && if (razorback && servertime - nextattack > 3.0f &&
(g_pUserCmd->buttons & IN_ATTACK || (g_pUserCmd->buttons & IN_ATTACK ||
g_pUserCmd->buttons & IN_ATTACK2)) g_pUserCmd->buttons & IN_ATTACK2))
{ {
if (g_pLocalPlayer->weapon()->m_iClassID == CL_CLASS(CTFKnife)) if (g_pLocalPlayer->weapon()->m_iClassID == CL_CLASS(CTFKnife))
{ {
@ -478,6 +489,38 @@ void CreateMove()
i--; i--;
lastwep = g_pLocalPlayer->weapon()->m_iClassID; lastwep = g_pLocalPlayer->weapon()->m_iClassID;
} }
if (piss)
{
servertime =
(float) (CE_INT(g_pLocalPlayer->entity, netvar.nTickBase)) *
g_GlobalVars->interval_per_tick;
if (!nextattack || g_pLocalPlayer->weapon()->m_iClassID != lastwep)
nextattack =
CE_FLOAT(g_pLocalPlayer->weapon(), netvar.flNextPrimaryAttack);
lastwep = g_pLocalPlayer->weapon()->m_iClassID;
if (CE_INT(g_pLocalPlayer->weapon(), netvar.iItemDefinitionIndex) == 58)
{
static int bSwitch = 0;
if ((g_pUserCmd->buttons & IN_ATTACK) && !bSwitch)
{
static int bswitch2 = 0;
if (bswitch2 > 20) {
announcer::playsound("piss.wav");
bswitch2 = 0;
}
bswitch2++;
bSwitch++;
g_pUserCmd->buttons &= ~IN_ATTACK;
}
else if (bSwitch)
{
amount = 21 * 66;
bSwitch++;
if (bSwitch > 20)
bSwitch = 0;
}
}
}
if (!amount) if (!amount)
return; return;
active = true; active = true;
@ -496,14 +539,17 @@ void Draw()
#if ENABLE_VISUALS == 1 #if ENABLE_VISUALS == 1
if (doom && (servertime - nextattack > 0.0f || servertime - nextattack2)) if (doom && (servertime - nextattack > 0.0f || servertime - nextattack2))
{ {
auto amount = (int) servertime - (int) nextattack; auto amount = (int) servertime - (int) nextattack;
auto amount2 = (int) servertime - (int) nextattack2; auto amount2 = (int) servertime - (int) nextattack2;
if (amount > 0.0f) if (amount > 0.0f)
AddCenterString(format("Fireable Primary amount: ", amount), colors::orange); AddCenterString(format("Fireable Primary amount: ", amount),
colors::orange);
if (amount2 > 0.0f) if (amount2 > 0.0f)
AddCenterString(format("Fireable Secondary amount: ", amount2), colors::orange); AddCenterString(format("Fireable Secondary amount: ", amount2),
colors::orange);
} }
if (razorback) if (razorback)
{
if (servertime - nextattack > 3.0f) if (servertime - nextattack > 3.0f)
{ {
AddCenterString(format("Can Stab through Razorback"), AddCenterString(format("Can Stab through Razorback"),
@ -512,7 +558,21 @@ void Draw()
else if (servertime - nextattack < 3.0f) else if (servertime - nextattack < 3.0f)
AddCenterString(format("Can't Stab through Razorback"), AddCenterString(format("Can't Stab through Razorback"),
colors::red); colors::red);
}
if (piss)
{
if (servertime - nextattack > 21.0f)
{
AddCenterString(format("Can Spam piss"), colors::green);
}
else if (servertime - nextattack < 21.0f)
AddCenterString(
format("Can't spam piss, ",
(int) (((float) servertime - (float) nextattack) * 100 /
21),
"% charge"),
colors::red);
}
#endif #endif
} }
} }

View File

@ -1210,8 +1210,7 @@ void Move()
if (ent->m_iTeam == LOCAL_E->m_iTeam) if (ent->m_iTeam == LOCAL_E->m_iTeam)
continue; continue;
const model_t *model = RAW_ENT(ent)->GetModel(); const model_t *model = RAW_ENT(ent)->GetModel();
if (!model) if (model) {
continue;
if ((model == lagexploit::point2 || if ((model == lagexploit::point2 ||
model == lagexploit::point3 || model == lagexploit::point3 ||
model == lagexploit::point4 || model == lagexploit::point4 ||
@ -1240,6 +1239,7 @@ void Move()
state::active_node = node; state::active_node = node;
ret = true; ret = true;
} }
}
else if (ent->m_flDistance < 500.0f && else if (ent->m_flDistance < 500.0f &&
IsVectorVisible(g_pLocalPlayer->v_Eye, IsVectorVisible(g_pLocalPlayer->v_Eye,
ent->m_vecOrigin)) ent->m_vecOrigin))