mirror of https://github.com/AxioDL/metaforce.git
CBouncyGrenade/CGrenadeLauncher: Explicit constructor fixes
This commit is contained in:
parent
1e15e0d1f3
commit
62e58553c5
|
@ -14,7 +14,7 @@ CBouncyGrenade::CBouncyGrenade(TUniqueId uid, std::string_view name, const CEnti
|
||||||
TUniqueId parentId, const SBouncyGrenadeData& data, float velocity,
|
TUniqueId parentId, const SBouncyGrenadeData& data, float velocity,
|
||||||
float explodePlayerDistance)
|
float explodePlayerDistance)
|
||||||
: CPhysicsActor(uid, true, name, info, xf, std::move(mData), {EMaterialTypes::Projectile, EMaterialTypes::Solid},
|
: CPhysicsActor(uid, true, name, info, xf, std::move(mData), {EMaterialTypes::Projectile, EMaterialTypes::Solid},
|
||||||
mData.GetBounds(), SMoverData(data.GetUnkStruct().GetMass()), actParams, 0.3f, 0.1f)
|
mData.GetBounds(), SMoverData{data.GetUnkStruct().GetMass()}, actParams, 0.3f, 0.1f)
|
||||||
, x258_data(data)
|
, x258_data(data)
|
||||||
, x294_numBounces(data.GetNumBounces())
|
, x294_numBounces(data.GetNumBounces())
|
||||||
, x298_parentId(parentId)
|
, x298_parentId(parentId)
|
||||||
|
|
|
@ -17,7 +17,7 @@ CGrenadeLauncher::CGrenadeLauncher(TUniqueId uid, std::string_view name, const C
|
||||||
const CActorParameters& actParams, TUniqueId parentId,
|
const CActorParameters& actParams, TUniqueId parentId,
|
||||||
const SGrenadeLauncherData& data, float f1)
|
const SGrenadeLauncherData& data, float f1)
|
||||||
: CPhysicsActor(uid, true, name, info, xf, std::move(mData), {EMaterialTypes::Character, EMaterialTypes::Solid}, bounds,
|
: CPhysicsActor(uid, true, name, info, xf, std::move(mData), {EMaterialTypes::Character, EMaterialTypes::Solid}, bounds,
|
||||||
{1000.f}, actParams, 0.3f, 0.1f)
|
SMoverData{1000.f}, actParams, 0.3f, 0.1f)
|
||||||
, x25c_healthInfo(healthInfo)
|
, x25c_healthInfo(healthInfo)
|
||||||
, x264_vulnerability(vulnerability)
|
, x264_vulnerability(vulnerability)
|
||||||
, x2cc_parentId(parentId)
|
, x2cc_parentId(parentId)
|
||||||
|
@ -32,7 +32,7 @@ CGrenadeLauncher::CGrenadeLauncher(TUniqueId uid, std::string_view name, const C
|
||||||
GetModelData()->EnableLooping(true);
|
GetModelData()->EnableLooping(true);
|
||||||
const CPASDatabase& pasDatabase = GetModelData()->GetAnimationData()->GetCharacterInfo().GetPASDatabase();
|
const CPASDatabase& pasDatabase = GetModelData()->GetAnimationData()->GetCharacterInfo().GetPASDatabase();
|
||||||
for (int i = 0; i < x3c8_animIds.size(); ++i) {
|
for (int i = 0; i < x3c8_animIds.size(); ++i) {
|
||||||
const auto result = pasDatabase.FindBestAnimation({22, CPASAnimParm::FromEnum(i)}, -1);
|
const auto result = pasDatabase.FindBestAnimation(CPASAnimParmData{22, CPASAnimParm::FromEnum(i)}, -1);
|
||||||
x3c8_animIds[i] = result.second;
|
x3c8_animIds[i] = result.second;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -285,7 +285,7 @@ void CGrenadeLauncher::sub_80230438() {
|
||||||
|
|
||||||
constexpr std::array arr = {0, 3};
|
constexpr std::array arr = {0, 3};
|
||||||
const auto& anim = animData->GetCharacterInfo().GetPASDatabase().FindBestAnimation(
|
const auto& anim = animData->GetCharacterInfo().GetPASDatabase().FindBestAnimation(
|
||||||
{5, CPASAnimParm::FromEnum(0), CPASAnimParm::FromEnum(arr[x258_started])}, -1);
|
CPASAnimParmData{5, CPASAnimParm::FromEnum(0), CPASAnimParm::FromEnum(arr[x258_started])}, -1);
|
||||||
if (anim.first > 0.f) {
|
if (anim.first > 0.f) {
|
||||||
animData->SetAnimation({anim.second, -1, 1.f, true}, false);
|
animData->SetAnimation({anim.second, -1, 1.f, true}, false);
|
||||||
modelData->EnableLooping(true);
|
modelData->EnableLooping(true);
|
||||||
|
@ -299,7 +299,7 @@ void CGrenadeLauncher::LaunchGrenade(CStateManager& mgr) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto& anim = animData->GetCharacterInfo().GetPASDatabase().FindBestAnimation({23}, -1);
|
const auto& anim = animData->GetCharacterInfo().GetPASDatabase().FindBestAnimation(CPASAnimParmData{23}, -1);
|
||||||
if (anim.first > 0.f) {
|
if (anim.first > 0.f) {
|
||||||
animData->AddAdditiveAnimation(anim.second, 1.f, false, true);
|
animData->AddAdditiveAnimation(anim.second, 1.f, false, true);
|
||||||
const zeus::CVector3f& origin =
|
const zeus::CVector3f& origin =
|
||||||
|
|
Loading…
Reference in New Issue