Auto spinup fix
This commit is contained in:
parent
60d437b47d
commit
eb3d6452ba
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user