mirror of
https://github.com/luanti-org/luanti.git
synced 2026-01-13 12:45:29 +01:00
Server: Fix Server::Send exception caused by leaving players
Leaving players will have PEER_ID_INVALID for database saving purposes.
This patch clarifies that, and properly protects the batch send function.
Bug introduced by 5f5ea132.
This commit is contained in:
@@ -1618,7 +1618,7 @@ void Server::SendSpawnParticles(RemotePlayer *player,
|
||||
const float radius_sq = radius * radius;
|
||||
|
||||
PlayerSAO *sao = player->getPlayerSAO();
|
||||
if (!sao)
|
||||
if (!sao || sao->isGone())
|
||||
return;
|
||||
|
||||
std::ostringstream particle_batch_data(std::ios_base::binary);
|
||||
|
||||
Reference in New Issue
Block a user