mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Apply review.
This commit is contained in:
parent
0b423bdb22
commit
07bbe4f454
2 changed files with 6 additions and 3 deletions
|
@ -14,7 +14,6 @@ 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)
|
||||
{
|
||||
|
@ -408,6 +407,11 @@ 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 { return m_player_name; }
|
||||
std::string getGUID() override;
|
||||
// Data should not be sent at player initialization
|
||||
void setPlayerYawAndSend(const float yaw);
|
||||
void setLookPitch(const float pitch);
|
||||
|
@ -183,7 +183,6 @@ 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