From 6bedb6de408d531c1843888edc6576040c368695 Mon Sep 17 00:00:00 2001 From: Ben Deutsch Date: Sun, 7 May 2017 18:41:47 +0200 Subject: Fog effect when camera is inside cloud Fixes issue #3576 * Clouds now take camera position as 3D, not 2D * Cloud grid filling extracted to gridFilled method * Clouds detect whether camera is inside cloud * Camera in cloud changes fog by overriding sky colors with cloud color * Sun, moon and stars can be temporarily disabled with setBodiesVisible * Disabling fog also disables all "inside cloud" behaviors --- src/client/clientlauncher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/client/clientlauncher.cpp') diff --git a/src/client/clientlauncher.cpp b/src/client/clientlauncher.cpp index 4fc8fb3ee..718255cad 100644 --- a/src/client/clientlauncher.cpp +++ b/src/client/clientlauncher.cpp @@ -129,7 +129,7 @@ bool ClientLauncher::run(GameParams &game_params, const Settings &cmd_args) g_menucloudsmgr = RenderingEngine::get_scene_manager()->createNewSceneManager(); if (!g_menuclouds) g_menuclouds = new Clouds(g_menucloudsmgr, -1, rand(), 100); - g_menuclouds->update(v2f(0, 0), video::SColor(255, 200, 200, 255)); + g_menuclouds->update(v3f(0, 0, 0), video::SColor(255, 200, 200, 255)); scene::ICameraSceneNode* camera; camera = g_menucloudsmgr->addCameraSceneNode(0, v3f(0, 0, 0), v3f(0, 60, 100)); -- cgit v1.2.3