mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-02 00:32:45 +03:00
feat(object): finish reenabling objects in object update handler
This commit is contained in:
parent
5a8fb5e2d3
commit
1de58d83e5
@ -44,6 +44,14 @@ int32_t CGObject_C::IsObjectLocked() {
|
||||
return this->m_lockCount != 0;
|
||||
}
|
||||
|
||||
void CGObject_C::PostReenable() {
|
||||
// TODO
|
||||
|
||||
this->m_inReenable = false;
|
||||
|
||||
// TODO
|
||||
}
|
||||
|
||||
void CGObject_C::Reenable() {
|
||||
this->m_disabled = false;
|
||||
this->m_inReenable = true;
|
||||
|
||||
@ -25,7 +25,8 @@ class CGObject_C : public CGObject, public TSHashObject<CGObject_C, CHashKeyGUID
|
||||
// Virtual public member functions
|
||||
virtual ~CGObject_C();
|
||||
virtual void Disable();
|
||||
// TODO
|
||||
void Reenable();
|
||||
void PostReenable();
|
||||
virtual void HandleOutOfRange(OUT_OF_RANGE_TYPE type) {};
|
||||
// TODO
|
||||
|
||||
@ -35,7 +36,6 @@ class CGObject_C : public CGObject, public TSHashObject<CGObject_C, CHashKeyGUID
|
||||
void AddWorldObject();
|
||||
int32_t IsInReenable();
|
||||
int32_t IsObjectLocked();
|
||||
void Reenable();
|
||||
void SetBlock(uint32_t block, uint32_t value);
|
||||
void SetDisablePending(int32_t pending);
|
||||
void SetObjectLocked(int32_t locked);
|
||||
|
||||
@ -323,7 +323,15 @@ int32_t ObjectUpdateFirstPass(CDataStore* msg, uint32_t time, uint32_t updateIdx
|
||||
|
||||
int32_t ObjectUpdateSecondPass(CDataStore* msg, uint32_t time, uint32_t updateCount) {
|
||||
// TODO
|
||||
return 0;
|
||||
|
||||
// Finish reenabling objects
|
||||
|
||||
while (auto reenabledObject = ClntObjMgrGetCurrent()->m_reenabledObjects.Head()) {
|
||||
ClntObjMgrGetCurrent()->m_visibleObjects.LinkToTail(reenabledObject);
|
||||
reenabledObject->PostReenable();
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int32_t ObjectCompressedUpdateHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user