RDR-Classes/network/sync/CProjectBaseSyncDataNode.hpp
maybegreat48 0132075d1c
Netsync stuff (#5)
* feat(metric): add rlMetric

* fix(metric): serializer fix

* feat(tls): add tlsContext

* feat(fwEntity): add entity classes

* fix: add import

* fix(vector): constexpr ctors

* feat(ped): add CPed

* feat(sync): add sync nodes

* feat(netsync): add netSyncDataNode::IsActive

* feat(netsync): first node

* fix: make GetData accessible

* fix: make netSyncDataNode an abstract class

* fix(netsync): the compiler is too smart for its own good

* feat(netsync): add CObjectCreationData

* feat(netsync): add CPlayerAppearanceData

* feat(netsync): CVehicleCreationData

* feat(netsync): add CPickupCreationData

* feat(netsync): add CPhysicalAttachData

* feat(netsync): add CVehicleProximityMigrationData

* feat(netsync): add CPedTaskTreeData

* feat(network): add CScriptedGameEvent

---------
2023-10-09 15:01:36 +02:00

30 lines
768 B
C++

#pragma once
#include "netSyncDataNode.hpp"
#include "NodeCommonDataOperations.hpp"
namespace rage
{
class netSyncData;
class netObject;
}
class CProjectBaseSyncDataNode : public rage::netSyncDataNode
{
private:
NodeCommonDataOperations m_CommonDataOperations; // 0x120
char m_Data[]; // 0x130
public:
#if _WIN32
template<typename T>
T& GetData()
{
return *reinterpret_cast<T*>(&m_Data[rage::tlsContext::Get()->m_SyncThreadIndex * sizeof(T)]);
}
#endif
};
static_assert(sizeof(CProjectBaseSyncDataNode) == 0x130);
// We probably don't need these anymore
//class CSyncDataNodeFrequent : public CProjectBaseSyncDataNode {};
//class CSyncDataNodeInfrequent : public CProjectBaseSyncDataNode {};