1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-12 16:58:39 +00: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)