From ca3888f38ed38c2a35d8f8c4bed584bdb0d2fc78 Mon Sep 17 00:00:00 2001 From: fallenoak Date: Thu, 15 Jan 2026 16:31:42 -0600 Subject: [PATCH] feat(object): add CGObject_C::SetObjectLocked --- src/object/client/CGObject_C.cpp | 12 ++++++++++++ src/object/client/CGObject_C.hpp | 1 + 2 files changed, 13 insertions(+) diff --git a/src/object/client/CGObject_C.cpp b/src/object/client/CGObject_C.cpp index ca48222..31ca0ac 100644 --- a/src/object/client/CGObject_C.cpp +++ b/src/object/client/CGObject_C.cpp @@ -50,6 +50,18 @@ void CGObject_C::SetDisablePending(int32_t pending) { } } +void CGObject_C::SetObjectLocked(int32_t locked) { + if (locked) { + if (this->m_lockCount != 0xFFFF) { + this->m_lockCount++; + } + } else { + if (this->m_lockCount != 0) { + this->m_lockCount--; + } + } +} + void CGObject_C::SetStorage(uint32_t* storage, uint32_t* saved) { this->m_obj = reinterpret_cast(&storage[CGObject::GetBaseOffset()]); this->m_objSaved = &saved[CGObject::GetBaseOffsetSaved()]; diff --git a/src/object/client/CGObject_C.hpp b/src/object/client/CGObject_C.hpp index 2a2cc61..e139ef8 100644 --- a/src/object/client/CGObject_C.hpp +++ b/src/object/client/CGObject_C.hpp @@ -29,6 +29,7 @@ class CGObject_C : public CGObject, public TSHashObject