Improve cat_outofbounds

This commit is contained in:
LightCat 2019-04-14 12:16:34 +02:00
parent a80d0a6506
commit 64f467b84b
2 changed files with 2 additions and 2 deletions

View File

@ -564,7 +564,7 @@ void oobcm()
current_user_cmd->viewangles.x = to_path.pitch;
current_user_cmd->viewangles.y = to_path.yaw;
if (LOCAL_E->m_vecOrigin().AsVector2D().DistTo(topath.AsVector2D()) <= 0.01f)
logging::Info("Arrived at the destination!");
logging::Info("Arrived at the destination! offset: %f %f", fabsf(LOCAL_E->m_vecOrigin().x - topath.x), fabsf(LOCAL_E->m_vecOrigin().y - topath.y));
else
logging::Info("Timed out trying to get to spot");
}

View File

@ -442,7 +442,7 @@ std::pair<float, float> ComputeMovePrecise(const Vector &a, const Vector &b)
float yaw = DEG2RAD(ang.y - current_user_cmd->viewangles.y);
if (g_pLocalPlayer->bUseSilentAngles)
yaw = DEG2RAD(ang.y - g_pLocalPlayer->v_OrigViewangles.y);
return { cos(yaw) * MIN(MAX(diff.Length2D(), 2.0f), 450.0f), -sin(yaw) * MIN(MAX(diff.Length2D(), 2.0f), 450.0f) };
return { cos(yaw) * MIN(MAX(diff.Length2D(), 1.05f), 450.0f), -sin(yaw) * MIN(MAX(diff.Length2D(), 1.05f), 450.0f) };
}
std::pair<float, float> ComputeMove(const Vector &a, const Vector &b)