2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-10 01:47:43 +00:00

Bug fixes

This commit is contained in:
Jack Andersen
2017-11-28 00:06:40 -10:00
parent 5ed7bd7c45
commit 7951cb1ee0
10 changed files with 36 additions and 30 deletions

View File

@@ -594,8 +594,8 @@ void CGroundMovement::MoveGroundCollider_New(CStateManager& mgr, CPhysicsActor&
result.x8_collision.emplace(collisionInfo);
}
if (!result.x8_collision->IsValid() ||
!CGameCollision::CanBlock(result.x8_collision->GetMaterialLeft(), result.x8_collision->GetNormalLeft()))
if (!collisionInfo.IsValid() ||
!CGameCollision::CanBlock(collisionInfo.GetMaterialLeft(), collisionInfo.GetNormalLeft()))
{
if (zOffset > 0.f)
{
@@ -603,7 +603,7 @@ void CGroundMovement::MoveGroundCollider_New(CStateManager& mgr, CPhysicsActor&
xf.origin -= zeus::CVector3f(0.f, 0.f, zOffset);
}
if (result.x8_collision->IsValid())
if (collisionInfo.IsValid())
player.x9c5_28_slidingOnWall = true;
CheckFalling(actor, mgr, dt);
player.SetLastFloorPlaneNormal({});
@@ -615,8 +615,8 @@ void CGroundMovement::MoveGroundCollider_New(CStateManager& mgr, CPhysicsActor&
actor.SetTranslation(actor.GetTranslation() - zeus::CVector3f(0.f, 0.f, stepDown));
if (TCastToPtr<CScriptPlatform> plat = mgr.ObjectById(id))
mgr.SendScriptMsg(plat.GetPtr(), actor.GetUniqueId(), EScriptObjectMessage::AddPlatformRider);
CGameCollision::SendMaterialMessage(mgr, result.x8_collision->GetMaterialLeft(), actor);
actor.SetLastFloorPlaneNormal({result.x8_collision->GetNormalLeft()});
CGameCollision::SendMaterialMessage(mgr, collisionInfo.GetMaterialLeft(), actor);
actor.SetLastFloorPlaneNormal({collisionInfo.GetNormalLeft()});
}
}