aboutsummaryrefslogtreecommitdiff
path: root/src/serverenvironment.cpp
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2022-12-04 12:35:14 +0100
committerGitHub <noreply@github.com>2022-12-04 12:35:14 +0100
commit37386b9c3cfc6746734f8c00fa99a44a63b8aeed (patch)
tree9baec3820a02044290eee400db4bcd2f2ddb674f /src/serverenvironment.cpp
parentaa3505a9e4523c2a8bec5ca6368b3bc2068185ef (diff)
downloadminetest-37386b9c3cfc6746734f8c00fa99a44a63b8aeed.tar.xz
Expose dtime_s to LBM handler
Diffstat (limited to 'src/serverenvironment.cpp')
-rw-r--r--src/serverenvironment.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/serverenvironment.cpp b/src/serverenvironment.cpp
index 045f05994..9dd5ba621 100644
--- a/src/serverenvironment.cpp
+++ b/src/serverenvironment.cpp
@@ -249,7 +249,8 @@ std::string LBMManager::createIntroductionTimesString()
return oss.str();
}
-void LBMManager::applyLBMs(ServerEnvironment *env, MapBlock *block, u32 stamp)
+void LBMManager::applyLBMs(ServerEnvironment *env, MapBlock *block,
+ const u32 stamp, const float dtime_s)
{
// Precondition, we need m_lbm_lookup to be initialized
FATAL_ERROR_IF(!m_query_mode,
@@ -280,7 +281,7 @@ void LBMManager::applyLBMs(ServerEnvironment *env, MapBlock *block, u32 stamp)
if (!lbm_list)
continue;
for (auto lbmdef : *lbm_list) {
- lbmdef->trigger(env, pos + pos_of_block, n);
+ lbmdef->trigger(env, pos + pos_of_block, n, dtime_s);
}
}
}
@@ -997,7 +998,7 @@ void ServerEnvironment::activateBlock(MapBlock *block, u32 additional_dtime)
activateObjects(block, dtime_s);
/* Handle LoadingBlockModifiers */
- m_lbm_mgr.applyLBMs(this, block, stamp);
+ m_lbm_mgr.applyLBMs(this, block, stamp, (float)dtime_s);
// Run node timers
block->step((float)dtime_s, [&](v3s16 p, MapNode n, f32 d) -> bool {