1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00: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();
}