mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-03 02:19:41 +00:00
Fix argument name for setSunDirection.
This commit is contained in:
parent
6c4920c58e
commit
2d17eaa5ea
5 changed files with 8 additions and 8 deletions
|
@ -630,12 +630,12 @@ void RenderingManager::sunDisable(bool real)
|
|||
}
|
||||
}
|
||||
|
||||
void RenderingManager::setSunDirection(const Ogre::Vector3& direction, bool is_moon)
|
||||
void RenderingManager::setSunDirection(const Ogre::Vector3& direction, bool is_night)
|
||||
{
|
||||
// direction * -1 (because 'direction' is camera to sun vector and not sun to camera),
|
||||
if (mSun) mSun->setDirection(Vector3(-direction.x, -direction.y, -direction.z));
|
||||
|
||||
mSkyManager->setSunDirection(direction, is_moon);
|
||||
mSkyManager->setSunDirection(direction, is_night);
|
||||
}
|
||||
|
||||
void RenderingManager::setGlare(bool glare)
|
||||
|
|
|
@ -141,7 +141,7 @@ public:
|
|||
|
||||
void setAmbientColour(const Ogre::ColourValue& colour);
|
||||
void setSunColour(const Ogre::ColourValue& colour);
|
||||
void setSunDirection(const Ogre::Vector3& direction, bool is_moon);
|
||||
void setSunDirection(const Ogre::Vector3& direction, bool is_night);
|
||||
void sunEnable(bool real); ///< @param real whether or not to really disable the sunlight (otherwise just set diffuse to 0)
|
||||
void sunDisable(bool real);
|
||||
|
||||
|
|
|
@ -767,14 +767,14 @@ void SkyManager::setStormDirection(const Vector3 &direction)
|
|||
mStormDirection = direction;
|
||||
}
|
||||
|
||||
void SkyManager::setSunDirection(const Vector3& direction, bool is_moon)
|
||||
void SkyManager::setSunDirection(const Vector3& direction, bool is_night)
|
||||
{
|
||||
if (!mCreated) return;
|
||||
mSun->setPosition(direction);
|
||||
mSunGlare->setPosition(direction);
|
||||
|
||||
float height = direction.z;
|
||||
float fade = is_moon ? 0.0 : (( height > 0.5) ? 1.0 : height * 2);
|
||||
float fade = is_night ? 0.0 : (( height > 0.5) ? 1.0 : height * 2);
|
||||
sh::Factory::getInstance ().setSharedParameter ("waterSunFade_sunHeight", sh::makeProperty<sh::Vector2>(new sh::Vector2(fade, height)));
|
||||
}
|
||||
|
||||
|
|
|
@ -153,7 +153,7 @@ namespace MWRender
|
|||
|
||||
void setStormDirection(const Ogre::Vector3& direction);
|
||||
|
||||
void setSunDirection(const Ogre::Vector3& direction, bool is_moon);
|
||||
void setSunDirection(const Ogre::Vector3& direction, bool is_night);
|
||||
|
||||
void setMasserDirection(const Ogre::Vector3& direction);
|
||||
|
||||
|
|
|
@ -443,13 +443,13 @@ void WeatherManager::update(float duration, bool paused)
|
|||
|
||||
int facing = (mHour > 13.f) ? 1 : -1;
|
||||
|
||||
bool sun_is_moon = mHour >= mNightStart || mHour <= mSunriseTime;
|
||||
bool is_night = mHour >= mNightStart || mHour <= mSunriseTime;
|
||||
|
||||
Vector3 final(
|
||||
(height - 1) * facing,
|
||||
(height - 1) * facing,
|
||||
height);
|
||||
mRendering->setSunDirection(final, sun_is_moon);
|
||||
mRendering->setSunDirection(final, is_night);
|
||||
|
||||
/*
|
||||
* TODO: import separated fadeInStart/Finish, fadeOutStart/Finish
|
||||
|
|
Loading…
Reference in a new issue