2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 06:27:43 +00:00

Fix doors and various area streaming bugs

This commit is contained in:
2018-05-01 17:43:31 -07:00
parent 711c3e0d2c
commit 734b25cad3
35 changed files with 189 additions and 284 deletions

View File

@@ -26,7 +26,7 @@ IGameArea::Dock::Dock(urde::CInputStream& in, const zeus::CTransform& xf)
TAreaId IGameArea::Dock::GetConnectedAreaId(s32 other) const
{
if (other >= x4_dockReferences.size() || other < 0)
if (u32(other) >= x4_dockReferences.size() || other < 0)
return kInvalidAreaId;
return x4_dockReferences[other].x0_area;
@@ -34,8 +34,8 @@ TAreaId IGameArea::Dock::GetConnectedAreaId(s32 other) const
s16 IGameArea::Dock::GetOtherDockNumber(s32 other) const
{
if (other >= x4_dockReferences.size() || other < 0)
return kInvalidAreaId;
if (u32(other) >= x4_dockReferences.size() || other < 0)
return -1;
return x4_dockReferences[other].x4_dock;
}