mirror of
https://github.com/luanti-org/luanti.git
synced 2025-12-17 12:35:21 +01:00
General code refactoring/improvements in server, treegen and connection
This commit is contained in:
@@ -402,11 +402,11 @@ DigParams getDigParams(const ItemGroupList &groups,
|
||||
continue;
|
||||
|
||||
const std::string &groupname = groupcap.first;
|
||||
float time = 0;
|
||||
int rating = itemgroup_get(groups, groupname);
|
||||
bool time_exists = cap.getTime(rating, &time);
|
||||
if (!time_exists)
|
||||
const auto time_o = cap.getTime(rating);
|
||||
if (!time_o.has_value())
|
||||
continue;
|
||||
float time = *time_o;
|
||||
|
||||
if (leveldiff > 1)
|
||||
time /= leveldiff;
|
||||
|
||||
Reference in New Issue
Block a user