mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02:45 +03:00
feat(object): link newly created objects to visible list
This commit is contained in:
parent
72d5247563
commit
56f645fe3b
@ -6,9 +6,13 @@
|
||||
#include "object/client/CGObject.hpp"
|
||||
#include "util/GUID.hpp"
|
||||
#include <storm/Hash.hpp>
|
||||
#include <storm/List.hpp>
|
||||
|
||||
class CGObject_C : public CGObject, public TSHashObject<CGObject_C, CHashKeyGUID> {
|
||||
public:
|
||||
// Public member variables
|
||||
TSLink<CGObject_C> m_link;
|
||||
|
||||
// Public member functions
|
||||
CGObject_C() = default;
|
||||
CGObject_C(uint32_t time, CClientObjCreate& objCreate);
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
|
||||
#include "object/client/CGObject_C.hpp"
|
||||
#include <storm/Hash.hpp>
|
||||
#include <storm/List.hpp>
|
||||
#include <cstdint>
|
||||
|
||||
class ClientConnection;
|
||||
@ -12,6 +13,8 @@ class ClntObjMgr {
|
||||
// Member variables
|
||||
TSHashTable<CGObject_C, CHashKeyGUID> m_objects;
|
||||
// TODO
|
||||
STORM_EXPLICIT_LIST(CGObject_C, m_link) m_visibleObjects;
|
||||
// TODO
|
||||
WOWGUID m_activePlayer = 0;
|
||||
uint32_t m_mapID = 0;
|
||||
ClientConnection* m_net = nullptr;
|
||||
|
||||
@ -205,7 +205,7 @@ int32_t CreateObject(CDataStore* msg, uint32_t time) {
|
||||
|
||||
InitObject(newObject, time, objCreate);
|
||||
|
||||
// TODO link to one of the ClntObjMgr lists
|
||||
ClntObjMgrGetCurrent()->m_visibleObjects.LinkToTail(newObject);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user