From 23677be951b4dc2b9cc174ceb92f0e0b8e8eb867 Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Tue, 25 Jun 2019 21:18:08 +0200 Subject: Load CSM environment after the restrictions are known Safety-guards for CSM callbacks to abort on a bad implementation Only run callbacks when the mods are loaded (and with it: builtin) Duplication checks inside constructors --- src/client/camera.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/client/camera.cpp') diff --git a/src/client/camera.cpp b/src/client/camera.cpp index 7e953d4c7..025bd081d 100644 --- a/src/client/camera.cpp +++ b/src/client/camera.cpp @@ -99,9 +99,9 @@ bool Camera::successfullyCreated(std::string &error_message) error_message.clear(); } - if (g_settings->getBool("enable_client_modding")) { + if (m_client->modsLoaded()) m_client->getScript()->on_camera_ready(this); - } + return error_message.empty(); } -- cgit v1.2.3