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:
parent
88a7160ad8
commit
359a940dde
6 changed files with 5 additions and 48 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue