aboutsummaryrefslogtreecommitdiff
path: root/src/clientenvironment.cpp
diff options
context:
space:
mode:
authorParamat <paramat@users.noreply.github.com>2018-11-24 10:41:11 +0000
committerGitHub <noreply@github.com>2018-11-24 10:41:11 +0000
commit2e37ee956530b7cd310e0d6cfb8ce3cd8f6973e6 (patch)
tree4f607e1f226fa169c2bd98de531b62cba4de3260 /src/clientenvironment.cpp
parenta969635322576218312be3e32e5b4fcb0359ac05 (diff)
downloadminetest-2e37ee956530b7cd310e0d6cfb8ce3cd8f6973e6.tar.xz
CSM: Don't create the client script environment if CSM is disabled (#7874)
Use the CSM death formspec when CSM is enabled and use the engine death formspec when CSM is disabled. Move the CSM death formspec code to a dedicated file.
Diffstat (limited to 'src/clientenvironment.cpp')
-rw-r--r--src/clientenvironment.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/clientenvironment.cpp b/src/clientenvironment.cpp
index a81d0dd8f..e2f24aaa3 100644
--- a/src/clientenvironment.cpp
+++ b/src/clientenvironment.cpp
@@ -233,14 +233,14 @@ void ClientEnvironment::step(float dtime)
u8 damage = (u8)MYMIN(damage_f + 0.5, 255);
if (damage != 0) {
damageLocalPlayer(damage, true);
- m_client->getEventManager()->put(new SimpleTriggerEvent(MtEvent::PLAYER_FALLING_DAMAGE));
+ m_client->getEventManager()->put(
+ new SimpleTriggerEvent(MtEvent::PLAYER_FALLING_DAMAGE));
}
}
}
- if (m_client->moddingEnabled()) {
+ if (m_client->modsLoaded())
m_script->environment_step(dtime);
- }
// Update lighting on local player (used for wield item)
u32 day_night_ratio = getDayNightRatio();