X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fsky.cpp;h=be7798407e959e6f3fcfe104ba1b6aac4e75d217;hb=b16cbba21a60de8d3b6e0b2b2caf0a529a0fecd9;hp=04bb3ab42e033d4444409c59ad9d9e79f1a392f2;hpb=f20267862f075cf9cb7a05df3d173499088dca90;p=dragonfireclient.git diff --git a/src/sky.cpp b/src/sky.cpp index 04bb3ab42..be7798407 100644 --- a/src/sky.cpp +++ b/src/sky.cpp @@ -10,6 +10,7 @@ #include "util/numeric.h" // MYMIN #include #include "settings.h" +#include "camera.h" // CameraModes //! constructor Sky::Sky(scene::ISceneNode* parent, scene::ISceneManager* mgr, s32 id, LocalPlayer* player): @@ -577,8 +578,11 @@ void Sky::update(float time_of_day, float time_brightness, if (m_directional_colored_fog) { if (m_horizon_blend() != 0) { - // calculate hemisphere value from yaw - f32 pointcolor_blend = wrapDegrees_0_360(m_player->getYaw() + 90); + // calculate hemisphere value from yaw, (inverted in third person front view) + s8 dir_factor = 1; + if (m_player->camera_mode > CAMERA_MODE_THIRD) + dir_factor = -1; + f32 pointcolor_blend = wrapDegrees_0_360(m_player->getYaw()*dir_factor + 90); if (pointcolor_blend > 180) pointcolor_blend = 360 - pointcolor_blend; pointcolor_blend /= 180;