Merge remote-tracking branch 'nullworks/newui' into Pathfinder

This commit is contained in:
TotallyNotElite 2018-08-19 19:22:12 +02:00
commit b58345ee85
5 changed files with 27 additions and 33 deletions

View File

@ -58,7 +58,7 @@
<List width="170">
<AutoVariable width="fill" target="misc.pathing" label="Enable Pathing"/>
<AutoVariable width="fill" target="misc.pathing.draw" label="Draw Path"/>
<AutoVariable width="fill" target="navbot.enable" label="Enable NavBot (Not for Nav Followbot)"/>
<AutoVariable width="fill" target="navbot.enable" label="Enable NavBot"/>
<AutoVariable width="fill" target="navbot.spy-mode" label="Enable Spy Mode"/>
<AutoVariable width="fill" target="navbot.heavy-mode" label="Enable Heavy Mode"/>
<AutoVariable width="fill" target="navbot.primary-only" label="Best Weapon only"/>

View File

@ -60,9 +60,6 @@ void unfuck_bucket(IClientEntity *weapon)
changed = false;
float &bucket = re::C_TFWeaponBase::crit_bucket_(weapon);
;
if (GetWeaponMode() == weapon_melee)
bucket = 1000.0f;
if (bucket != last_bucket)
{
@ -234,12 +231,8 @@ void draw()
AddCenterString("Weapon can randomly crit");
}
}
if (GetWeaponMode() == weapon_melee)
AddCenterString(format("Bucket: 1000"));
else
AddCenterString(
format("Bucket: ",
re::C_TFWeaponBase::crit_bucket_(RAW_ENT(LOCAL_W))));
AddCenterString(format("Bucket: ", re::C_TFWeaponBase::crit_bucket_(
RAW_ENT(LOCAL_W))));
}
// AddCenterString(format("Time: ",
// *(float*)((uintptr_t)RAW_ENT(LOCAL_W) + 2872u)));

View File

@ -147,6 +147,9 @@ CachedEntity *NearestEnemy()
}
return bestent;
}
Timer cdr{};
Timer cd2{};
Timer cd3{};
std::vector<Vector> sniper_spots;
void Init()
{
@ -156,11 +159,15 @@ void Init()
if (hide.IsGoodSniperSpot() || hide.IsIdealSniperSpot() ||
hide.IsExposed())
sniper_spots.push_back(hide.m_pos);
logging::Info("%d", sniper_spots.size());
}
void initonce()
{
for (int i = 0; i < afkTicks.size(); i++)
afkTicks[i].update();
cdr.update();
cd2.update();
cd3.update();
return;
}
@ -185,9 +192,6 @@ void UpdateSlot()
}
}
}
Timer cdr{};
Timer cd2{};
Timer cd3{};
int follow_target = 0;
void CreateMove()
{
@ -202,7 +206,7 @@ void CreateMove()
CachedEntity *med = nearestHealth();
if (CE_GOOD(med))
{
nav::NavTo(med->m_vecOrigin(), true, true , 7);
nav::NavTo(med->m_vecOrigin(), true, true, 7);
}
}
if (HasLowAmmo() && cdr.test_and_set(5000))
@ -225,7 +229,7 @@ void CreateMove()
{
cd3.update();
Vector random_spot;
if (cd2.test_and_set(20000))
if (cd2.test_and_set(5000))
Init();
if (!sniper_spots.size())
return;
@ -240,7 +244,7 @@ void CreateMove()
if (CE_BAD(tar))
{
Vector random_spot;
if (cd2.test_and_set(20000))
if (cd2.test_and_set(5000))
Init();
if (!sniper_spots.size())
return;

View File

@ -183,6 +183,20 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
time_replaced = false;
curtime_old = g_GlobalVars->curtime;
INetChannel *ch;
ch = (INetChannel *) g_IEngine->GetNetChannelInfo();
if (ch && !hooks::IsHooked((void *) ch))
{
hooks::netchannel.Set(ch);
hooks::netchannel.HookMethod(HOOK_ARGS(SendDatagram));
hooks::netchannel.HookMethod(HOOK_ARGS(CanPacket));
hooks::netchannel.HookMethod(HOOK_ARGS(SendNetMsg));
hooks::netchannel.HookMethod(HOOK_ARGS(Shutdown));
hooks::netchannel.Apply();
#if ENABLE_IPC
ipc::UpdateServerAddress();
#endif
}
if (nolerp)
{
// current_user_cmd->tick_count += 1;

View File

@ -76,23 +76,6 @@ DEFINE_HOOKED_METHOD(FrameStageNotify, void, void *this_,
PROF_SECTION(FSN_skinchanger);
hacks::tf2::skinchanger::FrameStageNotify(stage);
}
if (isHackActive() && stage == FRAME_RENDER_START)
{
INetChannel *ch;
ch = (INetChannel *) g_IEngine->GetNetChannelInfo();
if (ch && !hooks::IsHooked((void *) ch))
{
hooks::netchannel.Set(ch);
hooks::netchannel.HookMethod(HOOK_ARGS(SendDatagram));
hooks::netchannel.HookMethod(HOOK_ARGS(CanPacket));
hooks::netchannel.HookMethod(HOOK_ARGS(SendNetMsg));
hooks::netchannel.HookMethod(HOOK_ARGS(Shutdown));
hooks::netchannel.Apply();
#if ENABLE_IPC
ipc::UpdateServerAddress();
#endif
}
}
/*if (hacks::tf2::seedprediction::prediction && CE_GOOD(LOCAL_E)) {
C_BaseTempEntity *fire = C_TEFireBullets::GTEFireBullets();
while (fire) {