mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-15 18:57:08 +00:00
Revert "Apply review." (remove m_player_name from player_sao)
This reverts commit 07bbe4f454
.
This commit is contained in:
parent
e93c534065
commit
0fec74cbed
2 changed files with 3 additions and 6 deletions
|
@ -14,6 +14,7 @@ PlayerSAO::PlayerSAO(ServerEnvironment *env_, RemotePlayer *player_, session_t p
|
|||
bool is_singleplayer):
|
||||
UnitSAO(env_, v3f(0,0,0)),
|
||||
m_player(player_),
|
||||
m_player_name(player_->getName()),
|
||||
m_peer_id_initial(peer_id_),
|
||||
m_is_singleplayer(is_singleplayer)
|
||||
{
|
||||
|
@ -407,11 +408,6 @@ void PlayerSAO::setPlayerYaw(const float yaw)
|
|||
UnitSAO::setRotation(rotation);
|
||||
}
|
||||
|
||||
std::string PlayerSAO::getGUID()
|
||||
{
|
||||
return m_player->getName();
|
||||
}
|
||||
|
||||
void PlayerSAO::setFov(const float fov)
|
||||
{
|
||||
if (m_player && fov != m_fov)
|
||||
|
|
|
@ -78,7 +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() override;
|
||||
std::string getGUID() override { return m_player_name; }
|
||||
// Data should not be sent at player initialization
|
||||
void setPlayerYawAndSend(const float yaw);
|
||||
void setLookPitch(const float pitch);
|
||||
|
@ -183,6 +183,7 @@ private:
|
|||
std::string generateUpdatePhysicsOverrideCommand() const;
|
||||
|
||||
RemotePlayer *m_player = nullptr;
|
||||
std::string m_player_name; ///< used as GUID
|
||||
session_t m_peer_id_initial = 0; ///< only used to initialize RemotePlayer
|
||||
|
||||
// Cheat prevention
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue