diff options
Diffstat (limited to 'src/serverenvironment.cpp')
-rw-r--r-- | src/serverenvironment.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/serverenvironment.cpp b/src/serverenvironment.cpp index 1af3cf6d7..333d32ff5 100644 --- a/src/serverenvironment.cpp +++ b/src/serverenvironment.cpp @@ -1454,6 +1454,19 @@ void ServerEnvironment::step(float dtime) ++i; } } + + // Send outdated player inventories + for (RemotePlayer *player : m_players) { + if (player->getPeerId() == PEER_ID_INEXISTENT) + continue; + + PlayerSAO *sao = player->getPlayerSAO(); + if (sao && player->inventory.checkModified()) + m_server->SendInventory(sao, true); + } + + // Send outdated detached inventories + m_server->sendDetachedInventories(PEER_ID_INEXISTENT, true); } u32 ServerEnvironment::addParticleSpawner(float exptime) |