1
0
mirror of https://github.com/minetest/minetest.git synced 2025-09-18 19:30:34 +02:00

Server: Add reason for leave to on_leaveplayer callbacks

This commit is contained in:
Diego Martinez
2016-01-04 22:49:11 -03:00
committed by paramat
parent b24d21d1ae
commit dac40af6ee
4 changed files with 8 additions and 5 deletions

View File

@@ -2683,7 +2683,7 @@ void Server::DeleteClient(u16 peer_id, ClientDeletionReason reason)
PlayerSAO *playersao = player->getPlayerSAO();
assert(playersao);
m_script->on_leaveplayer(playersao);
m_script->on_leaveplayer(playersao, reason == CDR_TIMEOUT);
playersao->disconnected();
}