diff options
| author | notyouraveragehooman <65437533+notyouraveragehooman@users.noreply.github.com> | 2020-08-21 15:38:44 -0700 |
|---|---|---|
| committer | Léo Lam <leo@leolam.fr> | 2020-08-22 10:17:58 +0200 |
| commit | da35629aa82c50ea26fc09006092ac7c340ca10c (patch) | |
| tree | 41d21965aaf463c0f9ad0331106dbae587424ed8 /src/KingSystem/ActorSystem | |
| parent | a49164a85fa68175eba66cb1c49d13641dc5f32e (diff) | |
BaseProc::release
Diffstat (limited to 'src/KingSystem/ActorSystem')
| -rw-r--r-- | src/KingSystem/ActorSystem/actBaseProc.cpp | 5 | ||||
| -rw-r--r-- | src/KingSystem/ActorSystem/actBaseProc.h | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/KingSystem/ActorSystem/actBaseProc.cpp b/src/KingSystem/ActorSystem/actBaseProc.cpp index 2748f667..b0a94ed3 100644 --- a/src/KingSystem/ActorSystem/actBaseProc.cpp +++ b/src/KingSystem/ActorSystem/actBaseProc.cpp @@ -425,6 +425,11 @@ bool BaseProc::x00000071011ba9fc() { return true; } +void BaseProc::release() { + if (mRefCount >= 1) + mRefCount--; +} + BaseProc* BaseProc::getConnectedCalcParent() const { if (mConnectedCalcParent == nullptr || mConnectedCalcParent->mState == State::Delete) return nullptr; diff --git a/src/KingSystem/ActorSystem/actBaseProc.h b/src/KingSystem/ActorSystem/actBaseProc.h index 4d2675f0..1c9aa7cc 100644 --- a/src/KingSystem/ActorSystem/actBaseProc.h +++ b/src/KingSystem/ActorSystem/actBaseProc.h @@ -282,7 +282,7 @@ protected: sead::ListNode mDeleteListNode; BaseProcMapNode mMapNode{this}; BaseProcUnit* mProcUnit = nullptr; - sead::Atomic<u32> mRefCount = 0; + sead::Atomic<s32> mRefCount = 0; private: void unlinkProcUnit_(); |
