more stuffs

This commit is contained in:
bencat07 2018-08-14 23:00:56 +02:00
parent db6fad4d47
commit 0856f431a8
4 changed files with 33 additions and 22 deletions

View File

@ -38,7 +38,7 @@ void CreateMove()
return; return;
// Check if player is using a flame thrower // Check if player is using a flame thrower
if (g_pLocalPlayer->weapon()->m_iClassID() != CL_CLASS(CTFFlameThrower)) if (g_pLocalPlayer->weapon()->m_iClassID() != CL_CLASS(CTFFlameThrower) && CE_INT(LOCAL_W, netvar.iItemDefinitionIndex) != 528)
return; return;
// Check for phlogistinator, which is item 594 // Check for phlogistinator, which is item 594

View File

@ -259,13 +259,19 @@ bool ValidTick(BacktrackData &i, CachedEntity *ent)
return true; return true;
if (istickinvalid[ent->m_IDX][i.index]) if (istickinvalid[ent->m_IDX][i.index])
return false; return false;
if (!hacks::shared::aimbot::IsBacktracking() || IsVectorVisible(g_pLocalPlayer->v_Eye, i.hitboxes[head].center, true)) if (hacks::shared::aimbot::IsBacktracking()) {
if (fabsf(NET_FLOAT(RAW_ENT(ent), netvar.m_flSimulationTime) * 1000.0f - if (IsVectorVisible(g_pLocalPlayer->v_Eye, i.hitboxes[head].center, true))
getLatency() - i.simtime * 1000.0f) <= 200.0f) if (fabsf(NET_FLOAT(RAW_ENT(ent), netvar.m_flSimulationTime) * 1000.0f -
{ getLatency() - i.simtime * 1000.0f) <= 200.0f) {
istickvalid[ent->m_IDX][i.index] = true; istickvalid[ent->m_IDX][i.index] = true;
return true; return true;
} }
}
else if (fabsf(NET_FLOAT(RAW_ENT(ent), netvar.m_flSimulationTime) * 1000.0f -
getLatency() - i.simtime * 1000.0f) <= 200.0f) {
istickvalid[ent->m_IDX][i.index] = true;
return true;
}
istickinvalid[ent->m_IDX][i.index] = true; istickinvalid[ent->m_IDX][i.index] = true;
return false; return false;
} }

View File

@ -34,7 +34,7 @@ namespace hooked_methods
DEFINE_HOOKED_METHOD(DispatchUserMessage, bool, void *this_, int type, DEFINE_HOOKED_METHOD(DispatchUserMessage, bool, void *this_, int type,
bf_read &buf) bf_read &buf)
{ {
if (retrun && gitgud.test_and_set(10000)) if (retrun && gitgud.test_and_set(100))
{ {
PrintChat("\x07%06X%s\x01: %s", 0xe05938, lastname.c_str(), PrintChat("\x07%06X%s\x01: %s", 0xe05938, lastname.c_str(),
lastfilter.c_str()); lastfilter.c_str());
@ -175,8 +175,6 @@ DEFINE_HOOKED_METHOD(DispatchUserMessage, bool, void *this_, int type,
boost::replace_all(message2, "7", "t"); boost::replace_all(message2, "7", "t");
for (auto filter : res) for (auto filter : res)
{ {
if (retrun)
break;
if (boost::contains(message2, filter)) if (boost::contains(message2, filter))
{ {
*bSendPackets = true; *bSendPackets = true;
@ -184,6 +182,7 @@ DEFINE_HOOKED_METHOD(DispatchUserMessage, bool, void *this_, int type,
retrun = true; retrun = true;
lastfilter = format(filter); lastfilter = format(filter);
lastname = format(name); lastname = format(name);
gitgud.update();
} }
} }
} }
@ -211,6 +210,7 @@ DEFINE_HOOKED_METHOD(DispatchUserMessage, bool, void *this_, int type,
retrun = true; retrun = true;
lastfilter = format(filter); lastfilter = format(filter);
lastname = format(name); lastname = format(name);
gitgud.update();
} }
} }
} }

View File

@ -11,22 +11,27 @@ namespace hooked_methods
DEFINE_HOOKED_METHOD(SendDatagram, int, INetChannel *ch, bf_write *buf) DEFINE_HOOKED_METHOD(SendDatagram, int, INetChannel *ch, bf_write *buf)
{ {
#if !LAGBOT_MODE #if !LAGBOT_MODE
int in = ch->m_nInSequenceNr; int in;
auto state = ch->m_nInReliableState; int state;
if (CE_GOOD(LOCAL_E)) {
in = ch->m_nInSequenceNr;
state = ch->m_nInReliableState;
float latencysend = float latencysend =
round((round((hacks::shared::backtrack::getLatency() - 0.5f) / round((round((hacks::shared::backtrack::getLatency() - 0.5f) /
15.1515151515f) - 15.1515151515f) -
0.5f) * 0.5f) *
15.1515151515f); 15.1515151515f);
hacks::shared::backtrack::AddLatencyToNetchan(ch, latencysend); hacks::shared::backtrack::AddLatencyToNetchan(ch, latencysend);
}
#endif #endif
int ret = original::SendDatagram(ch, buf); int ret = original::SendDatagram(ch, buf);
#if !LAGBOT_MODE #if !LAGBOT_MODE
if (CE_GOOD(LOCAL_E)) {
ch->m_nInSequenceNr = in; ch->m_nInSequenceNr = in;
ch->m_nInReliableState = state; ch->m_nInReliableState = state;
}
#endif #endif
return ret; return ret;