summaryrefslogtreecommitdiff
path: root/src/content_sao.h
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-09-27 19:47:36 +0200
committerGitHub <noreply@github.com>2017-09-27 19:47:36 +0200
commitad7daf7b52348e1b71aa803be10de5b2134cba11 (patch)
treee5a528d0e9be11f678d113dde3ec4b49f3d96c26 /src/content_sao.h
parent50b2185ced9dc64e054ce743bbc22d15ecdf6192 (diff)
downloadminetest-ad7daf7b52348e1b71aa803be10de5b2134cba11.tar.gz
minetest-ad7daf7b52348e1b71aa803be10de5b2134cba11.tar.bz2
minetest-ad7daf7b52348e1b71aa803be10de5b2134cba11.zip
Add session_t typedef + remove unused functions (#6470)
* Add session_t typedef + remove unused functions u16 peer_id is used everywhere, to be more consistent and permit some evolutions on this type in the future (i'm working on a PoC), uniformize u16 peer_id to SessionId peer_id
Diffstat (limited to 'src/content_sao.h')
-rw-r--r--src/content_sao.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/content_sao.h b/src/content_sao.h
index 0ff95059e..b62551f51 100644
--- a/src/content_sao.h
+++ b/src/content_sao.h
@@ -19,7 +19,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#pragma once
-#include <util/numeric.h>
+#include "network/networkprotocol.h"
+#include "util/numeric.h"
#include "serverobject.h"
#include "itemgroup.h"
#include "object_properties.h"
@@ -196,7 +197,8 @@ class RemotePlayer;
class PlayerSAO : public UnitSAO
{
public:
- PlayerSAO(ServerEnvironment *env_, RemotePlayer *player_, u16 peer_id_, bool is_singleplayer);
+ PlayerSAO(ServerEnvironment *env_, RemotePlayer *player_, session_t peer_id_,
+ bool is_singleplayer);
~PlayerSAO();
ActiveObjectType getType() const
{ return ACTIVEOBJECT_TYPE_PLAYER; }
@@ -311,7 +313,7 @@ public:
void disconnected();
RemotePlayer *getPlayer() { return m_player; }
- u16 getPeerID() const { return m_peer_id; }
+ session_t getPeerID() const { return m_peer_id; }
// Cheat prevention
@@ -372,7 +374,7 @@ private:
void unlinkPlayerSessionAndSave();
RemotePlayer *m_player = nullptr;
- u16 m_peer_id = 0;
+ session_t m_peer_id = 0;
Inventory *m_inventory = nullptr;
s16 m_damage = 0;