1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-12 16:15:20 +02:00

Add persistent unique identifiers for objects (#14135)

This commit is contained in:
sfence
2025-07-09 10:40:26 +02:00
committed by GitHub
parent e0f8243629
commit 4f42b4308c
20 changed files with 257 additions and 19 deletions

View File

@@ -78,6 +78,7 @@ public:
void addPos(const v3f &added_pos) override;
void moveTo(v3f pos, bool continuous) override;
void setPlayerYaw(const float yaw);
std::string getGUID() const override { return m_player_name; }
// Data should not be sent at player initialization
void setPlayerYawAndSend(const float yaw);
void setLookPitch(const float pitch);
@@ -182,6 +183,8 @@ private:
std::string generateUpdatePhysicsOverrideCommand() const;
RemotePlayer *m_player = nullptr;
// Extra variable because during shutdown m_player is unavailable, but we still need to know.
std::string m_player_name; ///< used as GUID
session_t m_peer_id_initial = 0; ///< only used to initialize RemotePlayer
// Cheat prevention