mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 22:27:43 +00:00
SIMD refactor
This commit is contained in:
@@ -6,7 +6,8 @@
|
||||
namespace urde
|
||||
{
|
||||
CScriptCoverPoint::CScriptCoverPoint(TUniqueId uid, std::string_view name, const CEntityInfo &info,
|
||||
zeus::CTransform xf, bool active, u32 flags, bool crouch, float horizontalAngle, float verticalAngle, float coverTime)
|
||||
zeus::CTransform xf, bool active, u32 flags, bool crouch,
|
||||
float horizontalAngle, float verticalAngle, float coverTime)
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(),
|
||||
CMaterialList(EMaterialTypes::NoStepLogic), CActorParameters::None(), kInvalidUniqueId),
|
||||
xe8_flags(flags),
|
||||
@@ -71,7 +72,7 @@ bool CScriptCoverPoint::Blown(const zeus::CVector3f& point) const
|
||||
zeus::CVector3f frontVec = x34_transform.frontVector();
|
||||
frontVec.normalize();
|
||||
|
||||
if (frontVec.dot(normDif) <= GetCosHorizontalAngle() || (posDif.z * posDif.z) >= GetSinSqVerticalAngle())
|
||||
if (frontVec.dot(normDif) <= GetCosHorizontalAngle() || (posDif.z() * posDif.z()) >= GetSinSqVerticalAngle())
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -82,41 +83,6 @@ float CScriptCoverPoint::GetSinSqVerticalAngle() const
|
||||
return xf0_sinVerticalAngle * xf0_sinVerticalAngle;
|
||||
}
|
||||
|
||||
float CScriptCoverPoint::GetCosHorizontalAngle() const
|
||||
{
|
||||
return xec_cosHorizontalAngle;
|
||||
}
|
||||
|
||||
bool CScriptCoverPoint::ShouldLandHere() const
|
||||
{
|
||||
return xe8_26_landHere;
|
||||
}
|
||||
|
||||
bool CScriptCoverPoint::ShouldWallHang() const
|
||||
{
|
||||
return xe8_27_wallHang;
|
||||
}
|
||||
|
||||
bool CScriptCoverPoint::ShouldStay() const
|
||||
{
|
||||
return xe8_28_stay;
|
||||
}
|
||||
|
||||
bool CScriptCoverPoint::ShouldCrouch() const
|
||||
{
|
||||
return xf8_24_crouch;
|
||||
}
|
||||
|
||||
u32 CScriptCoverPoint::GetAttackDirection() const
|
||||
{
|
||||
return xe8_flags;
|
||||
}
|
||||
|
||||
void CScriptCoverPoint::Reserve(TUniqueId id)
|
||||
{
|
||||
xfa_occupant = id;
|
||||
}
|
||||
|
||||
void CScriptCoverPoint::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr)
|
||||
{
|
||||
CActor::AcceptScriptMsg(msg, uid, mgr);
|
||||
@@ -132,5 +98,4 @@ void CScriptCoverPoint::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user