mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Make string to v3f parsing consistent, replace core.setting_get_pos()
by core.settings:get_pos()
(#15438)
Co-authored-by: sfan5 <sfan5@live.de> Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
This commit is contained in:
@@ -3863,9 +3863,14 @@ void Server::addShutdownError(const ModError &e)
|
||||
v3f Server::findSpawnPos()
|
||||
{
|
||||
ServerMap &map = m_env->getServerMap();
|
||||
v3f nodeposf;
|
||||
if (g_settings->getV3FNoEx("static_spawnpoint", nodeposf))
|
||||
return nodeposf * BS;
|
||||
|
||||
std::optional<v3f> staticSpawnPoint;
|
||||
if (g_settings->getV3FNoEx("static_spawnpoint", staticSpawnPoint) && staticSpawnPoint.has_value())
|
||||
{
|
||||
return *staticSpawnPoint * BS;
|
||||
}
|
||||
|
||||
v3f nodeposf;
|
||||
|
||||
bool is_good = false;
|
||||
// Limit spawn range to mapgen edges (determined by 'mapgen_limit')
|
||||
|
Reference in New Issue
Block a user