From 5ab30af647d7e64404d76ea6168e7f78f5e365af Mon Sep 17 00:00:00 2001 From: maybegreat48 <96936658+maybegreat48@users.noreply.github.com> Date: Mon, 19 Dec 2022 17:09:08 +0000 Subject: [PATCH] feat(Network): add network time classes (#90) --- network/netTime.hpp | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 network/netTime.hpp diff --git a/network/netTime.hpp b/network/netTime.hpp new file mode 100644 index 0000000..c18e0e9 --- /dev/null +++ b/network/netTime.hpp @@ -0,0 +1,40 @@ +#pragma once +#include + +namespace rage +{ + class netConnectionManager; +} + +namespace rage +{ + class netTime + { + public: + virtual ~netTime() = default; + + netConnectionManager* m_net_connection_mgr; //0x0008 + uint32_t m_host_peer_id; //0x0010 + uint32_t m_time_token; //0x0014 + uint32_t m_time_offset; //0x0018 + char pad_001C[72]; //0x001C + uint32_t m_failed_sync_counter; //0x0064 + uint32_t m_last_sync_id_sent; //0x0068 + uint32_t m_last_sync_id_received; //0x006C + uint32_t m_role_flags; //0x0070 + uint32_t m_connection_identifier; //0x0074 + uint32_t m_time; //0x0078 + uint32_t m_calculation_flags; //0x007C + }; //Size: 0x0080 + static_assert(sizeof(netTime) == 0x80); + + struct netTimeSyncMsg + { + int action; + int counter; + int token; + int timestamp; + int increment; + }; + static_assert(sizeof(netTimeSyncMsg) == 0x14); +} \ No newline at end of file