1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

SAO limits: Allow SAOs to exist outside the set 'mapgen limit'

This commit is contained in:
paramat 2018-02-20 19:32:24 +00:00 committed by paramat
parent 88a7160ad8
commit 359a940dde
6 changed files with 5 additions and 48 deletions

View file

@ -567,8 +567,7 @@ PlayerSAO *ServerEnvironment::loadPlayer(RemotePlayer *player, bool *new_player,
// If the player exists, ensure that they respawn inside legal bounds
// This fixes an assert crash when the player can't be added
// to the environment
ServerMap &map = getServerMap();
if (map.getMapgenParams()->saoPosOverLimit(playersao->getBasePosition())) {
if (objectpos_over_limit(playersao->getBasePosition())) {
actionstream << "Respawn position for player \""
<< player->getName() << "\" outside limits, resetting" << std::endl;
playersao->setBasePosition(m_server->findSpawnPos());