2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-10 09:07:42 +00:00

Initial CSpacePirate and rag doll imps

This commit is contained in:
Jack Andersen
2018-11-23 22:09:35 -10:00
parent 976fe8d283
commit 9c88971df6
34 changed files with 1422 additions and 237 deletions

View File

@@ -1597,6 +1597,19 @@ EScriptObjectState CPatterned::GetDesiredAttackState(CStateManager& mgr) const
return EScriptObjectState::Attack;
}
float CPatterned::GetAnimationDistance(const CPASAnimParmData& data) const
{
auto bestAnim =
x64_modelData->GetAnimationData()->GetCharacterInfo().GetPASDatabase().FindBestAnimation(data, -1);
float dist = 1.f;
if (bestAnim.first > FLT_EPSILON)
{
dist = x64_modelData->GetAnimationData()->GetAnimationDuration(bestAnim.second) *
x64_modelData->GetAnimationData()->GetAverageVelocity(bestAnim.second);
}
return dist;
}
void CPatterned::PreRender(CStateManager& mgr, const zeus::CFrustum& frustum)
{
if (mgr.GetPlayerState()->GetActiveVisor(mgr) == CPlayerState::EPlayerVisor::Thermal)