mirror of https://github.com/AxioDL/metaforce.git
Minor corrections, and fix memorycard corruption
This commit is contained in:
parent
6ad0e5cb37
commit
2b8bc3fd8a
|
@ -18,7 +18,9 @@
|
|||
#include "TCastTo.hpp" // Generated file, do not modify include path
|
||||
|
||||
namespace metaforce {
|
||||
|
||||
namespace {
|
||||
static constexpr bool skPlayerUsesNewColliderLogic = true;
|
||||
}
|
||||
static float CollisionImpulseFiniteVsInfinite(float mass, float velNormDot, float restitution) {
|
||||
return mass * -(1.f + restitution) * velNormDot;
|
||||
}
|
||||
|
@ -60,12 +62,15 @@ void CGameCollision::MovePlayer(CStateManager& mgr, CPhysicsActor& actor, float
|
|||
const rstl::reserved_vector<TUniqueId, 1024>* colliderList) {
|
||||
actor.SetAngularEnabled(true);
|
||||
actor.AddMotionState(actor.PredictAngularMotion(dt));
|
||||
if (actor.IsUseStandardCollider()) {
|
||||
if (!actor.IsUseStandardCollider()) {
|
||||
if (!actor.GetMaterialList().HasMaterial(EMaterialTypes::GroundCollider)) {
|
||||
MoveAndCollide(mgr, actor, dt, CBallFilter(actor), colliderList);
|
||||
} else {
|
||||
if (actor.GetMaterialList().HasMaterial(EMaterialTypes::GroundCollider))
|
||||
} else if (skPlayerUsesNewColliderLogic) {
|
||||
CGroundMovement::MoveGroundCollider_New(mgr, actor, dt, colliderList);
|
||||
else
|
||||
} else {
|
||||
CGroundMovement::MoveGroundCollider(mgr, actor, dt, colliderList);
|
||||
}
|
||||
} else {
|
||||
MoveAndCollide(mgr, actor, dt, CBallFilter(actor), colliderList);
|
||||
}
|
||||
actor.SetAngularEnabled(false);
|
||||
|
@ -722,9 +727,10 @@ bool CGameCollision::DetectDynamicCollisionMoving(const CCollisionPrimitive& pri
|
|||
return ret;
|
||||
}
|
||||
|
||||
bool CGameCollision::DetectCollision(const CStateManager& mgr, const CCollisionPrimitive& prim, const zeus::CTransform& xf,
|
||||
const CMaterialFilter& filter, const rstl::reserved_vector<TUniqueId, 1024>& nearList,
|
||||
TUniqueId& idOut, CCollisionInfoList& infoOut) {
|
||||
bool CGameCollision::DetectCollision(const CStateManager& mgr, const CCollisionPrimitive& prim,
|
||||
const zeus::CTransform& xf, const CMaterialFilter& filter,
|
||||
const rstl::reserved_vector<TUniqueId, 1024>& nearList, TUniqueId& idOut,
|
||||
CCollisionInfoList& infoOut) {
|
||||
bool ret = false;
|
||||
CMaterialList exclude = filter.ExcludeList();
|
||||
if (!exclude.HasMaterial(EMaterialTypes::Occluder) && DetectStaticCollision(mgr, prim, xf, filter, infoOut)) {
|
||||
|
|
|
@ -32,8 +32,9 @@ ECardResult CMemoryCardDriver::SFileInfo::StartRead() {
|
|||
|
||||
ECardResult CMemoryCardDriver::SFileInfo::TryFileRead() {
|
||||
ECardResult res = CMemoryCardSys::GetResultCode(GetFileCardPort());
|
||||
if (res == ECardResult::READY)
|
||||
if (res == ECardResult::READY) {
|
||||
res = FileRead();
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 106bb02fbf6e482af2621f9b5e3ea099fcf1d53a
|
||||
Subproject commit 1111fb48397534f86c61db3b681cbcfef583f019
|
Loading…
Reference in New Issue