mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
General code refactoring/improvements in server, treegen and connection
This commit is contained in:
parent
24f2c38093
commit
bc4ab8b99e
34 changed files with 330 additions and 439 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue