1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-18 02:45:21 +02:00

Fix segfault in player migration and crash in log_deprecated

Makes log_deprecated work when triggered from no function
This commit is contained in:
SmallJoker
2018-05-14 21:03:48 +02:00
parent a01a9ca24c
commit a1598e1b83
2 changed files with 9 additions and 3 deletions

View File

@@ -1166,8 +1166,12 @@ void PlayerSAO::setBasePosition(const v3f &position)
// This needs to be ran for attachments too
ServerActiveObject::setBasePosition(position);
m_env->updateActiveObject(this);
m_position_not_sent = true;
// Updating is not wanted/required for player migration
if (m_env) {
m_env->updateActiveObject(this);
m_position_not_sent = true;
}
}
void PlayerSAO::setPos(const v3f &pos)