aboutsummaryrefslogtreecommitdiff
path: root/src/serverenvironment.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/serverenvironment.cpp')
-rw-r--r--src/serverenvironment.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/serverenvironment.cpp b/src/serverenvironment.cpp
index f013a3cc7..7be958920 100644
--- a/src/serverenvironment.cpp
+++ b/src/serverenvironment.cpp
@@ -579,7 +579,8 @@ 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
- if (objectpos_over_limit(playersao->getBasePosition())) {
+ ServerMap &map = getServerMap();
+ if (map.getMapgenParams()->saoPosOverLimit(playersao->getBasePosition())) {
actionstream << "Respawn position for player \""
<< player->getName() << "\" outside limits, resetting" << std::endl;
playersao->setBasePosition(m_server->findSpawnPos());