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:
parent
b24d21d1ae
commit
dac40af6ee
4 changed files with 8 additions and 5 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue