diff options
| author | savage13 <savage13@gmail.com> | 2022-02-20 17:50:28 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-20 23:50:28 +0100 |
| commit | c804527d7a247aca80b88de56191bb13938de38a (patch) | |
| tree | 8e9a7e4492ca1f1433e2f00deefa795b1021f25e /src/KingSystem/Physics/StaticCompound/physStaticCompound.cpp | |
| parent | 4e21ee7613e08cf59e7504844568f7eea067dde8 (diff) | |
PlacementMap: Add x_0, x_4(); change u16 mStaticCompoundId to s16 mStaticCompundActorId (#85)
Diffstat (limited to 'src/KingSystem/Physics/StaticCompound/physStaticCompound.cpp')
| -rw-r--r-- | src/KingSystem/Physics/StaticCompound/physStaticCompound.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/KingSystem/Physics/StaticCompound/physStaticCompound.cpp b/src/KingSystem/Physics/StaticCompound/physStaticCompound.cpp index 6986e510..ea20e2df 100644 --- a/src/KingSystem/Physics/StaticCompound/physStaticCompound.cpp +++ b/src/KingSystem/Physics/StaticCompound/physStaticCompound.cpp @@ -62,11 +62,11 @@ void StaticCompound::doCreate_(u8* buffer, u32 buffer_size, sead::Heap* parent_h mHeap->adjust(); } -void StaticCompound::setMapObject(u32 hash_id, u32 srt_hash, map::Object* object) { +int StaticCompound::setMapObject(u32 hash_id, u32 srt_hash, map::Object* object) { int idx = mStaticCompoundInfo->getActorIdx(hash_id, srt_hash); - if (idx < 0 || idx >= mMapObjects.size()) - return; - mMapObjects[idx] = object; + if (idx >= 0 && idx < mMapObjects.size()) + mMapObjects[idx] = object; + return idx; } map::Object* StaticCompound::getMapObject(int shape_idx) const { |
