Skip to content

Commit

Permalink
Fix find spawn pos
Browse files Browse the repository at this point in the history
  • Loading branch information
proller committed Jul 20, 2024
1 parent 2f94fa5 commit 24086c2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4275,10 +4275,12 @@ v3f Server::findSpawnPos(const std::string &player_name)

pos_t find = 0;
g_settings->getS16NoEx("static_spawnpoint_find", find);
if (g_settings->getV3FNoEx("static_spawnpoint", nodeposf) && !find) {
return nodeposf * BS;
} else if (g_settings->getV3FNoEx("static_spawnpoint_" + player_name, nodeposf) && !find) {
return nodeposf * BS;
if (g_settings->getV3FNoEx("static_spawnpoint_" + player_name, nodeposf)) {
if (!find)
return nodeposf * BS;
} else if (g_settings->getV3FNoEx("static_spawnpoint", nodeposf)) {
if (!find)
return nodeposf * BS;
}

pos_t min_air_height = 3;
Expand Down

0 comments on commit 24086c2

Please sign in to comment.