summaryrefslogtreecommitdiff
path: root/src/KingSystem/ActorSystem
diff options
context:
space:
mode:
authornotyouraveragehooman <65437533+notyouraveragehooman@users.noreply.github.com>2020-08-21 15:38:44 -0700
committerLéo Lam <leo@leolam.fr>2020-08-22 10:17:58 +0200
commitda35629aa82c50ea26fc09006092ac7c340ca10c (patch)
tree41d21965aaf463c0f9ad0331106dbae587424ed8 /src/KingSystem/ActorSystem
parenta49164a85fa68175eba66cb1c49d13641dc5f32e (diff)
BaseProc::release
Diffstat (limited to 'src/KingSystem/ActorSystem')
-rw-r--r--src/KingSystem/ActorSystem/actBaseProc.cpp5
-rw-r--r--src/KingSystem/ActorSystem/actBaseProc.h2
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_();