mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 11:07:44 +00:00
SIMD refactor
This commit is contained in:
@@ -112,7 +112,7 @@ void CTeamAiMgr::SpacingSort(CStateManager& mgr, const zeus::CVector3f& pos)
|
||||
{
|
||||
if (TCastToPtr<CAi> ai = mgr.ObjectById(role.GetOwnerId()))
|
||||
{
|
||||
float length = (ai->GetBaseBoundingBox().max.y - ai->GetBaseBoundingBox().min.y) * 1.5f;
|
||||
float length = (ai->GetBaseBoundingBox().max.y() - ai->GetBaseBoundingBox().min.y()) * 1.5f;
|
||||
if (length > tierStagger)
|
||||
tierStagger = length;
|
||||
}
|
||||
@@ -131,7 +131,7 @@ void CTeamAiMgr::SpacingSort(CStateManager& mgr, const zeus::CVector3f& pos)
|
||||
else
|
||||
newPos = pos + ai->GetTransform().basis[1] * curTierDist;
|
||||
role.x1c_position = newPos;
|
||||
role.x1c_position.z = ai->GetTranslation().z;
|
||||
role.x1c_position.z() = ai->GetTranslation().z();
|
||||
tierTeamSize += 1;
|
||||
if (tierTeamSize > maxTierTeamSize)
|
||||
{
|
||||
@@ -432,4 +432,18 @@ bool CTeamAiMgr::AddAttacker(EAttackType type, CStateManager& mgr, TUniqueId mgr
|
||||
return false;
|
||||
}
|
||||
|
||||
TUniqueId CTeamAiMgr::GetTeamAiMgr(CAi& ai, CStateManager& mgr)
|
||||
{
|
||||
for (const auto& conn : ai.GetConnectionList())
|
||||
{
|
||||
if (conn.x0_state == EScriptObjectState::Active && conn.x4_msg == EScriptObjectMessage::Play)
|
||||
{
|
||||
TUniqueId id = mgr.GetIdForScript(conn.x8_objId);
|
||||
if (TCastToConstPtr<CTeamAiMgr> aimgr = mgr.GetObjectById(id))
|
||||
return aimgr->GetUniqueId();
|
||||
}
|
||||
}
|
||||
return kInvalidUniqueId;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user