summaryrefslogtreecommitdiff
path: root/src/serverenvironment.cpp
diff options
context:
space:
mode:
authorparamat <paramat@users.noreply.github.com>2018-02-20 19:32:24 +0000
committerparamat <mat.gregory@virginmedia.com>2018-02-26 17:21:45 +0000
commit359a940dde0d0d85b288c8af6b10bccbd021f9c1 (patch)
tree7eda6f7869726595c25e80961e74059a5f99f91a /src/serverenvironment.cpp
parent88a7160ad8c303e7c1cb7c3141583fab131b2dda (diff)
downloadminetest-359a940dde0d0d85b288c8af6b10bccbd021f9c1.tar.gz
minetest-359a940dde0d0d85b288c8af6b10bccbd021f9c1.tar.bz2
minetest-359a940dde0d0d85b288c8af6b10bccbd021f9c1.zip
SAO limits: Allow SAOs to exist outside the set 'mapgen limit'
Diffstat (limited to 'src/serverenvironment.cpp')
-rw-r--r--src/serverenvironment.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/serverenvironment.cpp b/src/serverenvironment.cpp
index 53d30c4fb..ae0f397ee 100644
--- a/src/serverenvironment.cpp
+++ b/src/serverenvironment.cpp
@@ -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());