summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2021-03-18 00:18:02 +0100
committerTiger Wang <ziwei.tiger@outlook.com>2021-03-19 12:23:30 +0100
commit55ba39ca0e2d4aed9c0c1b3e030727728ea0a02f (patch)
tree4ec40239f2f1e2225b14faba1b4e5aa110e1a471 /src/Entities/Player.cpp
parentDeduplicate WriteBlockEntity (diff)
downloadcuberite-55ba39ca0e2d4aed9c0c1b3e030727728ea0a02f.tar
cuberite-55ba39ca0e2d4aed9c0c1b3e030727728ea0a02f.tar.gz
cuberite-55ba39ca0e2d4aed9c0c1b3e030727728ea0a02f.tar.bz2
cuberite-55ba39ca0e2d4aed9c0c1b3e030727728ea0a02f.tar.lz
cuberite-55ba39ca0e2d4aed9c0c1b3e030727728ea0a02f.tar.xz
cuberite-55ba39ca0e2d4aed9c0c1b3e030727728ea0a02f.tar.zst
cuberite-55ba39ca0e2d4aed9c0c1b3e030727728ea0a02f.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/Player.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index b6997f5f1..e431e4cc5 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -34,9 +34,6 @@
// 6000 ticks or 5 minutes
#define PLAYER_INVENTORY_SAVE_INTERVAL 6000
-// 1000 = once per second
-#define PLAYER_LIST_TIME_MS std::chrono::milliseconds(1000)
-
namespace
{
@@ -131,8 +128,6 @@ cPlayer::cPlayer(const cClientHandlePtr & a_Client) :
SetMaxHealth(MAX_HEALTH);
m_Health = MAX_HEALTH;
- m_LastPlayerListTime = std::chrono::steady_clock::now();
-
cWorld * World = nullptr;
if (!LoadFromDisk(World))
{
@@ -3205,13 +3200,6 @@ void cPlayer::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
// Update items (e.g. Maps)
m_Inventory.UpdateItems();
- // Send Player List (Once per m_LastPlayerListTime/1000 ms)
- if (m_LastPlayerListTime + PLAYER_LIST_TIME_MS <= std::chrono::steady_clock::now())
- {
- m_World->BroadcastPlayerListUpdatePing(*this);
- m_LastPlayerListTime = std::chrono::steady_clock::now();
- }
-
if (m_TicksUntilNextSave == 0)
{
SaveToDisk();