mirror of https://github.com/AxioDL/metaforce.git
Add missing CPhysicsActor class member
This commit is contained in:
parent
130108070d
commit
9a1a434605
|
@ -9,8 +9,8 @@ CWarWasp::CWarWasp(TUniqueId uid, const std::string& name, const CEntityInfo& in
|
||||||
CModelData&& mData, const CPatternedInfo& pInfo, CPatterned::EFlavorType flavor,
|
CModelData&& mData, const CPatternedInfo& pInfo, CPatterned::EFlavorType flavor,
|
||||||
CPatterned::EColliderType collider, const CDamageInfo& dInfo1, const CActorParameters& actorParms,
|
CPatterned::EColliderType collider, const CDamageInfo& dInfo1, const CActorParameters& actorParms,
|
||||||
ResId weapon, const CDamageInfo& dInfo2, ResId particle, u32 w3)
|
ResId weapon, const CDamageInfo& dInfo2, ResId particle, u32 w3)
|
||||||
: CPatterned(EUnknown::ThirtyNine, uid, name, flavor, info, xf, std::move(mData), pInfo, EMovementType::Flyer, collider, EBodyType::Three,
|
: CPatterned(EUnknown::ThirtyNine, uid, name, flavor, info, xf, std::move(mData), pInfo, EMovementType::Flyer,
|
||||||
actorParms, false)
|
collider, EBodyType::Three, actorParms, false)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,10 +20,11 @@ CPatterned::CPatterned(EUnknown, TUniqueId uid, const std::string& name, CPatter
|
||||||
EBodyType, const CActorParameters& actorParms, bool)
|
EBodyType, const CActorParameters& actorParms, bool)
|
||||||
: CAi(uid, pInfo.xf8_active, name, info, xf, std::move(mData),
|
: CAi(uid, pInfo.xf8_active, name, info, xf, std::move(mData),
|
||||||
zeus::CAABox(pInfo.xcc_bodyOrigin - zeus::CVector3f{pInfo.xc4_halfExtent, pInfo.xc4_halfExtent, 0.f},
|
zeus::CAABox(pInfo.xcc_bodyOrigin - zeus::CVector3f{pInfo.xc4_halfExtent, pInfo.xc4_halfExtent, 0.f},
|
||||||
pInfo.xcc_bodyOrigin + zeus::CVector3f{pInfo.xc4_halfExtent, pInfo.xc4_halfExtent, pInfo.xc8_height}),
|
pInfo.xcc_bodyOrigin + zeus::CVector3f{pInfo.xc4_halfExtent, pInfo.xc4_halfExtent,
|
||||||
|
pInfo.xc8_height}),
|
||||||
pInfo.x0_mass, pInfo.x54_healthInfo, pInfo.x5c_damageVulnerability,
|
pInfo.x0_mass, pInfo.x54_healthInfo, pInfo.x5c_damageVulnerability,
|
||||||
moveType == EMovementType::Flyer ? gkPatternedFlyerMaterialList : gkPatternedGroundMaterialList,
|
moveType == EMovementType::Flyer ? gkPatternedFlyerMaterialList : gkPatternedGroundMaterialList,
|
||||||
pInfo.xfc_stateMachineId, actorParms, pInfo.xd8_, 0.8f)
|
pInfo.xfc_stateMachineId, actorParms, pInfo.xd8_stepUpHeight, 0.8f)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ CPatternedInfo::CPatternedInfo(CInputStream& in, u32 pcount)
|
||||||
xc4_halfExtent(in.readFloatBig()),
|
xc4_halfExtent(in.readFloatBig()),
|
||||||
xc8_height(in.readFloatBig()),
|
xc8_height(in.readFloatBig()),
|
||||||
xcc_bodyOrigin(zeus::CVector3f::ReadBig(in)),
|
xcc_bodyOrigin(zeus::CVector3f::ReadBig(in)),
|
||||||
xd8_(in.readFloatBig()),
|
xd8_stepUpHeight(in.readFloatBig()),
|
||||||
xdc_(in.readFloatBig()),
|
xdc_(in.readFloatBig()),
|
||||||
xe0_(in.readFloatBig()),
|
xe0_(in.readFloatBig()),
|
||||||
xe4_(in.readFloatBig()),
|
xe4_(in.readFloatBig()),
|
||||||
|
|
|
@ -34,7 +34,7 @@ class CPatternedInfo
|
||||||
float xc4_halfExtent;
|
float xc4_halfExtent;
|
||||||
float xc8_height;
|
float xc8_height;
|
||||||
zeus::CVector3f xcc_bodyOrigin;
|
zeus::CVector3f xcc_bodyOrigin;
|
||||||
float xd8_;
|
float xd8_stepUpHeight;
|
||||||
float xdc_;
|
float xdc_;
|
||||||
float xe0_;
|
float xe0_;
|
||||||
float xe4_;
|
float xe4_;
|
||||||
|
|
|
@ -13,7 +13,8 @@ CPhysicsActor::CPhysicsActor(TUniqueId uid, bool active, const std::string& name
|
||||||
, xf8_24_(true)
|
, xf8_24_(true)
|
||||||
, x150_momentum(moverData.x18_)
|
, x150_momentum(moverData.x18_)
|
||||||
, x1c0_collisionPrimitive(box, matList)
|
, x1c0_collisionPrimitive(box, matList)
|
||||||
, x200_(xf.buildMatrix3f())
|
, x1f4_translation(xf.origin)
|
||||||
|
, x200_orientation(xf.buildMatrix3f())
|
||||||
, x23c_stepUpHeight(stepUp)
|
, x23c_stepUpHeight(stepUp)
|
||||||
, x240_stepDownHeight(stepDown)
|
, x240_stepDownHeight(stepDown)
|
||||||
{
|
{
|
||||||
|
@ -412,6 +413,11 @@ CPhysicsState::CPhysicsState(const zeus::CVector3f& translation, const zeus::CQu
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CPhysicsState::SetTranslation(const zeus::CVector3f& tr)
|
||||||
|
{
|
||||||
|
x0_translation = tr;
|
||||||
|
}
|
||||||
|
|
||||||
void CPhysicsState::SetOrientation(const zeus::CQuaternion& orient)
|
void CPhysicsState::SetOrientation(const zeus::CQuaternion& orient)
|
||||||
{
|
{
|
||||||
xc_orientation = orient;
|
xc_orientation = orient;
|
||||||
|
@ -422,11 +428,6 @@ const zeus::CQuaternion& CPhysicsState::GetOrientation() const
|
||||||
return xc_orientation;
|
return xc_orientation;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPhysicsState::SetTranslation(const zeus::CVector3f& tr)
|
|
||||||
{
|
|
||||||
x0_translation = tr;
|
|
||||||
}
|
|
||||||
|
|
||||||
const zeus::CVector3f& CPhysicsState::GetTranslation() const
|
const zeus::CVector3f& CPhysicsState::GetTranslation() const
|
||||||
{
|
{
|
||||||
return x0_translation;
|
return x0_translation;
|
||||||
|
|
|
@ -96,15 +96,16 @@ protected:
|
||||||
zeus::CAABox x1a4_baseBoundingBox;
|
zeus::CAABox x1a4_baseBoundingBox;
|
||||||
CCollidableAABox x1c0_collisionPrimitive;
|
CCollidableAABox x1c0_collisionPrimitive;
|
||||||
zeus::CVector3f x1e8_primitiveOffset;
|
zeus::CVector3f x1e8_primitiveOffset;
|
||||||
zeus::CNUQuaternion x200_;
|
zeus::CVector3f x1f4_translation;
|
||||||
|
zeus::CNUQuaternion x200_orientation;
|
||||||
zeus::CAxisAngle x210_;
|
zeus::CAxisAngle x210_;
|
||||||
zeus::CAxisAngle x21c_;
|
zeus::CAxisAngle x21c_;
|
||||||
bool x234_ = false;
|
bool x234_ = false;
|
||||||
float x238_ = 1000000.0f;
|
float x238_ = 1000000.0f;
|
||||||
float x23c_stepUpHeight;
|
float x23c_stepUpHeight;
|
||||||
float x240_stepDownHeight;
|
float x240_stepDownHeight;
|
||||||
float x244_restitutionCoefModifier;
|
float x244_restitutionCoefModifier = 0.f;
|
||||||
float x248_collisionAccuracyModifier;
|
float x248_collisionAccuracyModifier = 1.f;
|
||||||
u32 x24c_;
|
u32 x24c_;
|
||||||
u32 x250_;
|
u32 x250_;
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -1319,8 +1319,8 @@ CEntity* ScriptLoader::LoadWarWasp(CStateManager& mgr, CInputStream& in,
|
||||||
|
|
||||||
CAnimRes res(aParms.GetACSFile(), aParms.GetCharacter(), scale, true, aParms.GetInitialAnimation());
|
CAnimRes res(aParms.GetACSFile(), aParms.GetCharacter(), scale, true, aParms.GetInitialAnimation());
|
||||||
CModelData mData(res);
|
CModelData mData(res);
|
||||||
return new MP1::CWarWasp(mgr.AllocateUniqueId(), *name, info, xf, std::move(mData), pInfo, flavor, collider, damageInfo1, actorParms, weaponDesc,
|
return new MP1::CWarWasp(mgr.AllocateUniqueId(), *name, info, xf, std::move(mData), pInfo, flavor, collider,
|
||||||
damageInfo2, particle, w1);
|
damageInfo1, actorParms, weaponDesc, damageInfo2, particle, w1);
|
||||||
}
|
}
|
||||||
|
|
||||||
CEntity* ScriptLoader::LoadSpacePirate(CStateManager& mgr, CInputStream& in,
|
CEntity* ScriptLoader::LoadSpacePirate(CStateManager& mgr, CInputStream& in,
|
||||||
|
@ -1342,13 +1342,17 @@ CEntity* ScriptLoader::LoadSpacePirate(CStateManager& mgr, CInputStream& in,
|
||||||
|
|
||||||
if (animParms.GetCharacter() == 0)
|
if (animParms.GetCharacter() == 0)
|
||||||
{
|
{
|
||||||
Log.report(logvisor::Warning, "SpacePirate <%s> has AnimationInformation property with invalid character selected", head.x0_name.c_str());
|
Log.report(logvisor::Warning,
|
||||||
|
"SpacePirate <%s> has AnimationInformation property with invalid character selected",
|
||||||
|
head.x0_name.c_str());
|
||||||
animParms.SetCharacter(2);
|
animParms.SetCharacter(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
CModelData mData(CAnimRes(animParms.GetACSFile(), animParms.GetCharacter(), head.x40_scale, animParms.GetInitialAnimation(), true));
|
CModelData mData(CAnimRes(animParms.GetACSFile(), animParms.GetCharacter(), head.x40_scale,
|
||||||
|
animParms.GetInitialAnimation(), true));
|
||||||
|
|
||||||
return new MP1::CSpacePirate(mgr.AllocateUniqueId(), head.x0_name, info, head.x10_transform, std::move(mData), aParams, pInfo, in, propCount);
|
return new MP1::CSpacePirate(mgr.AllocateUniqueId(), head.x0_name, info, head.x10_transform, std::move(mData),
|
||||||
|
aParams, pInfo, in, propCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
CEntity* ScriptLoader::LoadFlyingPirate(CStateManager& mgr, CInputStream& in,
|
CEntity* ScriptLoader::LoadFlyingPirate(CStateManager& mgr, CInputStream& in,
|
||||||
|
|
2
specter
2
specter
|
@ -1 +1 @@
|
||||||
Subproject commit 50749d771218db49aac420fe3e7aa11d9ffc3612
|
Subproject commit 6109a051271b811bb687165ddf195d21e1db824e
|
Loading…
Reference in New Issue