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 SmallJoker
parent c683e050d4
commit 8aaf526730
6 changed files with 5 additions and 50 deletions

View File

@@ -579,8 +579,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());