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

This commit is contained in:
TotallyNotElite 2018-08-18 21:53:08 +02:00
commit 29106eb8b9
5 changed files with 31 additions and 29 deletions

View File

@ -54,4 +54,13 @@
<AutoVariable width="fill" target="follow-bot.corners" label="Corner activate"/>
</List>
</Box>
</Tab>
<Box name="NavBot" width="content" height="content" padding="12 6 6 6" x="210" y="233">
<List width="200">
<AutoVariable width="fill" target="misc.pathing" label="Enable Pathing"/>
<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"/>
</List>
</Box>
</Tab>

View File

@ -15,7 +15,7 @@
<AutoVariable width="fill" target="misc.no-homo" label="#nohomo"/>
<AutoVariable width="fill" target="misc.no-lerp" label="nolerp"/>
<AutoVariable width="fill" target="misc.no-push" label="nopush"/>
<AutoVariable width="fill" target="misc.roll-speedhack" label="Rollspeedhack"/>
<AutoVariable width="fill" target="misc.roll-speedhack" label="Moonwalk"/>
<AutoVariable width="fill" target="misc.semi-auto" label="Semiauto Fire"/>
<AutoVariable width="fill" target="misc.show-spectators" label="Show spectators"/>
<LabeledObject width="fill" label="Skybox Override">

1
external/CMakeLists.txt vendored Executable file → Normal file
View File

@ -4,3 +4,4 @@ target_sources(cathook PRIVATE
target_include_directories(cathook PRIVATE "${CMAKE_CURRENT_LIST_DIR}/MicroPather")
target_include_directories(cathook PRIVATE "${CMAKE_CURRENT_LIST_DIR}/ucccccp")
target_include_directories(cathook PRIVATE "${CMAKE_CURRENT_LIST_DIR}/TF2_NavFile_Reader")

View File

@ -162,7 +162,22 @@ void CreateMove()
if (!g_pLocalPlayer->bZoomed && !(current_user_cmd->buttons & IN_ATTACK))
return;
}
// Minigun spun up handler
if (g_pLocalPlayer->weapon()->m_iClassID() == CL_CLASS(CTFMinigun))
{
int weapon_state =
CE_INT(g_pLocalPlayer->weapon(), netvar.iWeaponState);
// If user setting for autospin isnt true, then we check if minigun
// is already zoomed
if ((weapon_state == MinigunState_t::AC_STATE_IDLE ||
weapon_state == MinigunState_t::AC_STATE_STARTFIRING) &&
!auto_spin_up)
return;
if (auto_spin_up)
current_user_cmd->buttons |= IN_ATTACK2;
if (!(current_user_cmd->buttons & (IN_ATTACK2 | IN_ATTACK)))
return;
}
if (!g_IEntityList->GetClientEntity(target_entity->m_IDX))
return;
if (!target_entity->hitboxes.GetHitbox(
@ -307,29 +322,6 @@ bool ShouldAim()
return false;
}
}
// Minigun spun up handler
if (g_pLocalPlayer->weapon()->m_iClassID() == CL_CLASS(CTFMinigun))
{
int weapon_state =
CE_INT(g_pLocalPlayer->weapon(), netvar.iWeaponState);
// If user setting for autospin isnt true, then we check if minigun
// is already zoomed
if ((weapon_state == MinigunState_t::AC_STATE_IDLE ||
weapon_state == MinigunState_t::AC_STATE_STARTFIRING) &&
!auto_spin_up)
{
return false;
}
if (auto_spin_up)
{
current_user_cmd->buttons |= IN_ATTACK2;
}
if (!(current_user_cmd->buttons & (IN_ATTACK2 | IN_ATTACK)))
{
return false;
}
}
}
return true;
}

View File

@ -141,7 +141,7 @@ Timer cd2{};
Timer cd3{};
void CreateMove()
{
if ( !enable || !nav::Prepare())
if (!enable || !nav::Prepare())
return;
if (CE_BAD(LOCAL_E) || !LOCAL_E->m_bAlivePlayer())
return;
@ -165,7 +165,7 @@ void CreateMove()
return;
}
}
if (!nav::ReadyForCommands && !spy_mode)
if (!nav::ReadyForCommands && !spy_mode && !heavy_mode)
cd3.update();
bool isready = (spy_mode || heavy_mode) ? 1 : nav::ReadyForCommands;
int waittime = (spy_mode || heavy_mode) ? 100 : 5000;
@ -184,7 +184,7 @@ void CreateMove()
int rng = rand() % sniper_spots.size();
random_spot = sniper_spots.at(rng);
if (random_spot.z)
nav::NavTo(random_spot, false);
nav::NavTo(random_spot, false, true);
}
else
{