mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 08:53:52 +00:00
Merge remote branch 'scrawl/weather'
This commit is contained in:
commit
af39275a63
6 changed files with 125 additions and 155 deletions
|
@ -51,7 +51,7 @@ RenderingManager::RenderingManager (OEngine::Render::OgreRenderer& _rend, const
|
|||
cameraPitchNode->attachObject(mRendering.getCamera());
|
||||
|
||||
//mSkyManager = 0;
|
||||
mSkyManager = new SkyManager(mMwRoot, mRendering.getCamera());
|
||||
mSkyManager = new SkyManager(mMwRoot, mRendering.getCamera(), &environment);
|
||||
|
||||
mPlayer = new MWRender::Player (mRendering.getCamera(), playerNode);
|
||||
mSun = 0;
|
||||
|
|
|
@ -10,16 +10,12 @@
|
|||
|
||||
#include <components/nifogre/ogre_nif_loader.hpp>
|
||||
|
||||
#include "../mwworld/environment.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
|
||||
using namespace MWRender;
|
||||
using namespace Ogre;
|
||||
|
||||
// the speed at which the clouds are animated
|
||||
#define CLOUD_SPEED 0.001
|
||||
|
||||
// this distance has to be set accordingly so that the
|
||||
// celestial bodies are behind the clouds, but in front of the atmosphere
|
||||
#define CELESTIAL_BODY_DISTANCE 1000.f
|
||||
|
||||
BillboardObject::BillboardObject( const String& textureName,
|
||||
const float initialSize,
|
||||
const Vector3& position,
|
||||
|
@ -50,7 +46,7 @@ void BillboardObject::setVisibility(const float visibility)
|
|||
void BillboardObject::setPosition(const Vector3& pPosition)
|
||||
{
|
||||
Vector3 normalised = pPosition.normalisedCopy();
|
||||
Vector3 finalPosition = normalised * CELESTIAL_BODY_DISTANCE;
|
||||
Vector3 finalPosition = normalised * 1000.f;
|
||||
|
||||
mBBSet->setCommonDirection( -normalised );
|
||||
|
||||
|
@ -85,7 +81,7 @@ void BillboardObject::init(const String& textureName,
|
|||
{
|
||||
SceneManager* sceneMgr = rootNode->getCreator();
|
||||
|
||||
Vector3 finalPosition = position.normalisedCopy() * CELESTIAL_BODY_DISTANCE;
|
||||
Vector3 finalPosition = position.normalisedCopy() * 1000.f;
|
||||
|
||||
static unsigned int bodyCount=0;
|
||||
|
||||
|
@ -296,9 +292,10 @@ void SkyManager::ModVertexAlpha(Entity* ent, unsigned int meshType)
|
|||
ent->getMesh()->getSubMesh(0)->vertexData->vertexBufferBinding->getBuffer(ves_diffuse->getSource())->unlock();
|
||||
}
|
||||
|
||||
SkyManager::SkyManager (SceneNode* pMwRoot, Camera* pCamera) :
|
||||
SkyManager::SkyManager (SceneNode* pMwRoot, Camera* pCamera, MWWorld::Environment* env) :
|
||||
mGlareFade(0), mGlareEnabled(false)
|
||||
{
|
||||
mEnvironment = env;
|
||||
mViewport = pCamera->getViewport();
|
||||
mSceneMgr = pMwRoot->getCreator();
|
||||
mRootNode = pCamera->getParentSceneNode()->createChildSceneNode();
|
||||
|
@ -312,7 +309,7 @@ SkyManager::SkyManager (SceneNode* pMwRoot, Camera* pCamera) :
|
|||
Pass* pass = material->getTechnique(0)->getPass(0);
|
||||
pass->setSceneBlending(SBT_TRANSPARENT_ALPHA);
|
||||
mThunderTextureUnit = pass->createTextureUnitState();
|
||||
mThunderTextureUnit->setColourOperationEx(LBX_SOURCE1, LBS_MANUAL, LBS_CURRENT, ColourValue(1.f, 1.f, 1.f)); // always black colour
|
||||
mThunderTextureUnit->setColourOperationEx(LBX_SOURCE1, LBS_MANUAL, LBS_CURRENT, ColourValue(1.f, 1.f, 1.f));
|
||||
mThunderTextureUnit->setAlphaOperation(LBX_SOURCE1, LBS_MANUAL, LBS_CURRENT, 0.5f);
|
||||
OverlayManager& ovm = OverlayManager::getSingleton();
|
||||
mThunderOverlay = ovm.create( "ThunderOverlay" );
|
||||
|
@ -504,7 +501,7 @@ SkyManager::SkyManager (SceneNode* pMwRoot, Camera* pCamera) :
|
|||
" uniform float4 emissive \n"
|
||||
") \n"
|
||||
"{ \n"
|
||||
" uv += float2(1,1) * time * speed * "<<CLOUD_SPEED<<"; \n" // Scroll in x,y direction
|
||||
" uv += float2(1,0) * time * speed * 0.003; \n" // Scroll in x direction
|
||||
" float4 tex = lerp(tex2D(texture, uv), tex2D(secondTexture, uv), transitionFactor); \n"
|
||||
" oColor = color * float4(emissive.xyz,1) * tex * float4(1,1,1,opacity); \n"
|
||||
"}";
|
||||
|
@ -558,7 +555,7 @@ void SkyManager::update(float duration)
|
|||
if (!mEnabled) return;
|
||||
|
||||
// UV Scroll the clouds
|
||||
mCloudMaterial->getTechnique(0)->getPass(0)->getFragmentProgramParameters()->setNamedConstantFromTime("time", 1);
|
||||
mCloudMaterial->getTechnique(0)->getPass(0)->getFragmentProgramParameters()->setNamedConstantFromTime("time", mEnvironment->mWorld->getTimeScaleFactor()/30.f);
|
||||
|
||||
/// \todo improve this
|
||||
mMasser->setPhase( static_cast<Moon::Phase>( (int) ((mDay % 32)/4.f)) );
|
||||
|
@ -594,8 +591,8 @@ void SkyManager::update(float duration)
|
|||
mMasser->setVisible(mMasserEnabled);
|
||||
mSecunda->setVisible(mSecundaEnabled);
|
||||
|
||||
// rotate the whole sky by 360 degrees every 4 days
|
||||
mRootNode->roll(Degree(mHourDiff*360/96.f));
|
||||
// rotate the stars by 360 degrees every 4 days
|
||||
mAtmosphereNight->roll(Degree(mEnvironment->mWorld->getTimeScaleFactor()*duration*360 / (3600*96.f)));
|
||||
}
|
||||
|
||||
void SkyManager::enable()
|
||||
|
@ -692,6 +689,7 @@ void SkyManager::setWeather(const MWWorld::WeatherResult& weather)
|
|||
strength = 1.f;
|
||||
|
||||
mSunGlare->setVisibility(weather.mGlareView * strength);
|
||||
mSun->setVisibility(strength);
|
||||
|
||||
mAtmosphereNight->setVisible(weather.mNight && mEnabled);
|
||||
}
|
||||
|
@ -775,9 +773,6 @@ void SkyManager::setSecundaFade(const float fade)
|
|||
|
||||
void SkyManager::setHour(double hour)
|
||||
{
|
||||
mHourDiff = mHour - hour;
|
||||
if (mHourDiff > 0) mHourDiff -= 24;
|
||||
|
||||
mHour = hour;
|
||||
}
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ namespace MWRender
|
|||
class SkyManager
|
||||
{
|
||||
public:
|
||||
SkyManager(Ogre::SceneNode* pMwRoot, Ogre::Camera* pCamera);
|
||||
SkyManager(Ogre::SceneNode* pMwRoot, Ogre::Camera* pCamera, MWWorld::Environment* env);
|
||||
~SkyManager();
|
||||
|
||||
void update(float duration);
|
||||
|
@ -164,12 +164,11 @@ namespace MWRender
|
|||
Ogre::Vector3 getRealSunPos();
|
||||
|
||||
private:
|
||||
MWWorld::Environment* mEnvironment;
|
||||
float mHour;
|
||||
int mDay;
|
||||
int mMonth;
|
||||
|
||||
float mHourDiff;
|
||||
|
||||
BillboardObject* mSun;
|
||||
BillboardObject* mSunGlare;
|
||||
Moon* mMasser;
|
||||
|
|
|
@ -22,6 +22,14 @@ const std::string WeatherGlobals::mThunderSoundID1 = "Thunder1";
|
|||
const std::string WeatherGlobals::mThunderSoundID2 = "Thunder2";
|
||||
const std::string WeatherGlobals::mThunderSoundID3 = "Thunder3";
|
||||
|
||||
const float WeatherGlobals::mWeatherUpdateTime = 20.f;
|
||||
|
||||
// morrowind sets these per-weather, but since they are only used by 'thunderstorm'
|
||||
// weather setting anyway, we can just as well set them globally
|
||||
const float WeatherGlobals::mThunderFrequency = .4;
|
||||
const float WeatherGlobals::mThunderThreshold = 0.6;
|
||||
const float WeatherGlobals::mThunderSoundDelay = 0.25;
|
||||
|
||||
WeatherManager::WeatherManager(MWRender::RenderingManager* rendering, Environment* env) :
|
||||
mHour(14), mCurrentWeather("clear"), mFirstUpdate(true), mWeatherUpdateTime(0),
|
||||
mThunderFlash(0), mThunderChance(0), mThunderChanceNeeded(50), mThunderSoundDelay(0)
|
||||
|
@ -320,6 +328,9 @@ WeatherManager::WeatherManager(MWRender::RenderingManager* rendering, Environmen
|
|||
|
||||
void WeatherManager::setWeather(const String& weather, bool instant)
|
||||
{
|
||||
if (weather == mCurrentWeather && mNextWeather == "")
|
||||
return;
|
||||
|
||||
if (instant || mFirstUpdate)
|
||||
{
|
||||
mNextWeather = "";
|
||||
|
@ -331,12 +342,12 @@ void WeatherManager::setWeather(const String& weather, bool instant)
|
|||
if (mNextWeather != "")
|
||||
{
|
||||
// transition more than 50% finished?
|
||||
if (mRemainingTransitionTime/(mWeatherSettings[mCurrentWeather].mTransitionDelta*24.f*60) <= 0.5)
|
||||
if (mRemainingTransitionTime/(mWeatherSettings[mCurrentWeather].mTransitionDelta*24.f*3600) <= 0.5)
|
||||
mCurrentWeather = mNextWeather;
|
||||
}
|
||||
|
||||
mNextWeather = weather;
|
||||
mRemainingTransitionTime = mWeatherSettings[mCurrentWeather].mTransitionDelta*24.f*60;
|
||||
mRemainingTransitionTime = mWeatherSettings[mCurrentWeather].mTransitionDelta*24.f*3600;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -354,15 +365,12 @@ WeatherResult WeatherManager::getResult(const String& weather)
|
|||
result.mAmbientLoopSoundID = current.mAmbientLoopSoundID;
|
||||
result.mSunColor = current.mSunDiscSunsetColor;
|
||||
|
||||
const float fade_duration = current.mTransitionDelta * 24.f;
|
||||
|
||||
result.mNight = (mHour < 6.f+fade_duration || mHour > 20.f-fade_duration);
|
||||
result.mNight = (mHour < 6 || mHour > 19);
|
||||
|
||||
result.mFogDepth = result.mNight ? current.mLandFogNightDepth : current.mLandFogDayDepth;
|
||||
|
||||
// night
|
||||
if (mHour <= (WeatherGlobals::mSunriseTime-WeatherGlobals::mSunriseDuration)
|
||||
|| mHour >= (WeatherGlobals::mSunsetTime+WeatherGlobals::mSunsetDuration))
|
||||
if (mHour <= 5.5f || mHour >= 21)
|
||||
{
|
||||
result.mFogColor = current.mFogNightColor;
|
||||
result.mAmbientColor = current.mAmbientNightColor;
|
||||
|
@ -372,40 +380,33 @@ WeatherResult WeatherManager::getResult(const String& weather)
|
|||
}
|
||||
|
||||
// sunrise
|
||||
else if (mHour >= (WeatherGlobals::mSunriseTime-WeatherGlobals::mSunriseDuration) && mHour <= WeatherGlobals::mSunriseTime)
|
||||
else if (mHour >= 5.5f && mHour <= 9)
|
||||
{
|
||||
if (mHour <= (WeatherGlobals::mSunriseTime-WeatherGlobals::mSunriseDuration+fade_duration))
|
||||
if (mHour <= 6)
|
||||
{
|
||||
// fade in
|
||||
float advance = (WeatherGlobals::mSunriseTime-WeatherGlobals::mSunriseDuration+fade_duration)-mHour;
|
||||
float factor = (advance / fade_duration);
|
||||
float advance = 6-mHour;
|
||||
float factor = advance / 0.5f;
|
||||
result.mFogColor = lerp(current.mFogSunriseColor, current.mFogNightColor);
|
||||
result.mAmbientColor = lerp(current.mAmbientSunriseColor, current.mAmbientNightColor);
|
||||
result.mSunColor = lerp(current.mSunSunriseColor, current.mSunNightColor);
|
||||
result.mSkyColor = lerp(current.mSkySunriseColor, current.mSkyNightColor);
|
||||
result.mNightFade = factor;
|
||||
}
|
||||
else if (mHour >= (WeatherGlobals::mSunriseTime-fade_duration))
|
||||
else //if (mHour >= 6)
|
||||
{
|
||||
// fade out
|
||||
float advance = mHour-(WeatherGlobals::mSunriseTime-fade_duration);
|
||||
float factor = advance / fade_duration;
|
||||
float advance = mHour-6;
|
||||
float factor = advance / 3.f;
|
||||
result.mFogColor = lerp(current.mFogSunriseColor, current.mFogDayColor);
|
||||
result.mAmbientColor = lerp(current.mAmbientSunriseColor, current.mAmbientDayColor);
|
||||
result.mSunColor = lerp(current.mSunSunriseColor, current.mSunDayColor);
|
||||
result.mSkyColor = lerp(current.mSkySunriseColor, current.mSkyDayColor);
|
||||
}
|
||||
else
|
||||
{
|
||||
result.mFogColor = current.mFogSunriseColor;
|
||||
result.mAmbientColor = current.mAmbientSunriseColor;
|
||||
result.mSunColor = current.mSunSunriseColor;
|
||||
result.mSkyColor = current.mSkySunriseColor;
|
||||
}
|
||||
}
|
||||
|
||||
// day
|
||||
else if (mHour >= (WeatherGlobals::mSunriseTime) && mHour <= (WeatherGlobals::mSunsetTime))
|
||||
else if (mHour >= 9 && mHour <= 17)
|
||||
{
|
||||
result.mFogColor = current.mFogDayColor;
|
||||
result.mAmbientColor = current.mAmbientDayColor;
|
||||
|
@ -414,36 +415,29 @@ WeatherResult WeatherManager::getResult(const String& weather)
|
|||
}
|
||||
|
||||
// sunset
|
||||
else if (mHour >= (WeatherGlobals::mSunsetTime) && mHour <= (WeatherGlobals::mSunsetTime+WeatherGlobals::mSunsetDuration))
|
||||
else if (mHour >= 17 && mHour <= 21)
|
||||
{
|
||||
if (mHour <= (WeatherGlobals::mSunsetTime+fade_duration))
|
||||
if (mHour <= 19)
|
||||
{
|
||||
// fade in
|
||||
float advance = (WeatherGlobals::mSunsetTime+fade_duration)-mHour;
|
||||
float factor = (advance / fade_duration);
|
||||
float advance = 19-mHour;
|
||||
float factor = (advance / 2);
|
||||
result.mFogColor = lerp(current.mFogSunsetColor, current.mFogDayColor);
|
||||
result.mAmbientColor = lerp(current.mAmbientSunsetColor, current.mAmbientDayColor);
|
||||
result.mSunColor = lerp(current.mSunSunsetColor, current.mSunDayColor);
|
||||
result.mSkyColor = lerp(current.mSkySunsetColor, current.mSkyDayColor);
|
||||
}
|
||||
else if (mHour >= (WeatherGlobals::mSunsetTime+WeatherGlobals::mSunsetDuration-fade_duration))
|
||||
else //if (mHour >= 19)
|
||||
{
|
||||
// fade out
|
||||
float advance = mHour-(WeatherGlobals::mSunsetTime+WeatherGlobals::mSunsetDuration-fade_duration);
|
||||
float factor = advance / fade_duration;
|
||||
float advance = mHour-19;
|
||||
float factor = advance / 2.f;
|
||||
result.mFogColor = lerp(current.mFogSunsetColor, current.mFogNightColor);
|
||||
result.mAmbientColor = lerp(current.mAmbientSunsetColor, current.mAmbientNightColor);
|
||||
result.mSunColor = lerp(current.mSunSunsetColor, current.mSunNightColor);
|
||||
result.mSkyColor = lerp(current.mSkySunsetColor, current.mSkyNightColor);
|
||||
result.mNightFade = factor;
|
||||
}
|
||||
else
|
||||
{
|
||||
result.mFogColor = current.mFogSunsetColor;
|
||||
result.mAmbientColor = current.mAmbientSunsetColor;
|
||||
result.mSunColor = current.mSunSunsetColor;
|
||||
result.mSkyColor = current.mSkySunsetColor;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -468,26 +462,19 @@ WeatherResult WeatherManager::transition(float factor)
|
|||
result.mSunDiscColor = lerp(current.mSunDiscColor, other.mSunDiscColor);
|
||||
result.mFogDepth = lerp(current.mFogDepth, other.mFogDepth);
|
||||
result.mWindSpeed = lerp(current.mWindSpeed, other.mWindSpeed);
|
||||
result.mCloudSpeed = lerp(current.mCloudSpeed, other.mCloudSpeed);
|
||||
//result.mCloudSpeed = lerp(current.mCloudSpeed, other.mCloudSpeed);
|
||||
result.mCloudSpeed = current.mCloudSpeed;
|
||||
result.mCloudOpacity = lerp(current.mCloudOpacity, other.mCloudOpacity);
|
||||
result.mGlareView = lerp(current.mGlareView, other.mGlareView);
|
||||
|
||||
result.mNight = current.mNight;
|
||||
|
||||
// sound change behaviour:
|
||||
// if 'other' has a new sound, switch to it after 1/2 of the transition length
|
||||
if (other.mAmbientLoopSoundID != "")
|
||||
result.mAmbientLoopSoundID = factor>0.5 ? other.mAmbientLoopSoundID : current.mAmbientLoopSoundID;
|
||||
// if 'current' has a sound and 'other' does not have a sound, turn off the sound immediately
|
||||
else if (current.mAmbientLoopSoundID != "")
|
||||
result.mAmbientLoopSoundID = "";
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void WeatherManager::update(float duration)
|
||||
{
|
||||
mWeatherUpdateTime -= duration;
|
||||
mWeatherUpdateTime -= duration * mEnvironment->mWorld->getTimeScaleFactor();
|
||||
|
||||
bool exterior = (mEnvironment->mWorld->isCellExterior() || mEnvironment->mWorld->isCellQuasiExterior());
|
||||
|
||||
|
@ -499,7 +486,7 @@ void WeatherManager::update(float duration)
|
|||
if (mWeatherUpdateTime <= 0 || regionstr != mCurrentRegion)
|
||||
{
|
||||
mCurrentRegion = regionstr;
|
||||
mWeatherUpdateTime = WeatherGlobals::mWeatherUpdateTime*60.f;
|
||||
mWeatherUpdateTime = WeatherGlobals::mWeatherUpdateTime*3600;
|
||||
|
||||
std::string weather;
|
||||
|
||||
|
@ -550,22 +537,13 @@ void WeatherManager::update(float duration)
|
|||
}
|
||||
|
||||
setWeather(weather, false);
|
||||
/*
|
||||
std::cout << "roll result: " << random << std::endl;
|
||||
|
||||
std::cout << regionstr << " weather probabilities: " << clear << " " << cloudy << " " << foggy << " "
|
||||
<< overcast << " " << rain << " " << thunder << " " << ash << " " << blight << " " << snow << " "
|
||||
<< blizzard << std::endl;
|
||||
|
||||
std::cout << "New weather : " << weather << std::endl;
|
||||
*/
|
||||
}
|
||||
|
||||
WeatherResult result;
|
||||
|
||||
if (mNextWeather != "")
|
||||
{
|
||||
mRemainingTransitionTime -= duration;
|
||||
mRemainingTransitionTime -= duration * mEnvironment->mWorld->getTimeScaleFactor();
|
||||
if (mRemainingTransitionTime < 0)
|
||||
{
|
||||
mCurrentWeather = mNextWeather;
|
||||
|
@ -574,30 +552,37 @@ void WeatherManager::update(float duration)
|
|||
}
|
||||
|
||||
if (mNextWeather != "")
|
||||
result = transition(1-(mRemainingTransitionTime/(mWeatherSettings[mCurrentWeather].mTransitionDelta*24.f*60)));
|
||||
result = transition(1-(mRemainingTransitionTime/(mWeatherSettings[mCurrentWeather].mTransitionDelta*24.f*3600)));
|
||||
else
|
||||
result = getResult(mCurrentWeather);
|
||||
|
||||
mRendering->configureFog(result.mFogDepth, result.mFogColor);
|
||||
|
||||
// disable sun during night
|
||||
if (mHour >= WeatherGlobals::mSunsetTime+WeatherGlobals::mSunsetDuration
|
||||
|| mHour <= WeatherGlobals::mSunriseTime-WeatherGlobals::mSunriseDuration)
|
||||
if (mHour >= 20 || mHour <= 6.f)
|
||||
mRendering->getSkyManager()->sunDisable();
|
||||
else
|
||||
{
|
||||
// during day, calculate sun angle
|
||||
float height = 1-std::abs(((mHour-13)/7.f));
|
||||
int facing = mHour > 13.f ? 1 : -1;
|
||||
mRendering->getSkyManager()->sunEnable();
|
||||
|
||||
// sun angle
|
||||
float height;
|
||||
|
||||
// rise at 6, set at 20
|
||||
if (mHour >= 6 && mHour <= 20)
|
||||
height = 1-std::abs(((mHour-13)/7.f));
|
||||
else if (mHour > 20)
|
||||
height = (mHour-20.f)/4.f;
|
||||
else //if (mHour > 0 && mHour < 6)
|
||||
height = 1-(mHour/6.f);
|
||||
|
||||
int facing = (mHour > 13.f) ? 1 : -1;
|
||||
|
||||
Vector3 final(
|
||||
(1-height)*facing,
|
||||
(1-height)*facing,
|
||||
height);
|
||||
mRendering->setSunDirection(final);
|
||||
|
||||
mRendering->getSkyManager()->sunEnable();
|
||||
}
|
||||
|
||||
// moon calculations
|
||||
float night;
|
||||
if (mHour >= 14)
|
||||
|
@ -765,15 +750,6 @@ void WeatherManager::update(float duration)
|
|||
|
||||
void WeatherManager::setHour(const float hour)
|
||||
{
|
||||
// accelerate a bit for testing
|
||||
/*
|
||||
mHour += 0.005;
|
||||
|
||||
if (mHour >= 24.f) mHour = 0.f;
|
||||
|
||||
std::cout << "hour " << mHour << std::endl;
|
||||
*/
|
||||
|
||||
mHour = hour;
|
||||
}
|
||||
|
||||
|
|
|
@ -95,18 +95,18 @@ namespace MWWorld
|
|||
Script Color=255,20,20
|
||||
*/
|
||||
|
||||
static const float mSunriseTime = 8;
|
||||
static const float mSunsetTime = 18;
|
||||
static const float mSunriseDuration = 2;
|
||||
static const float mSunsetDuration = 2;
|
||||
static const float mSunriseTime;
|
||||
static const float mSunsetTime;
|
||||
static const float mSunriseDuration;
|
||||
static const float mSunsetDuration;
|
||||
|
||||
static const float mWeatherUpdateTime = 20.f;
|
||||
static const float mWeatherUpdateTime;
|
||||
|
||||
// morrowind sets these per-weather, but since they are only used by 'thunderstorm'
|
||||
// weather setting anyway, we can just as well set them globally
|
||||
static const float mThunderFrequency = .4;
|
||||
static const float mThunderThreshold = 0.6;
|
||||
static const float mThunderSoundDelay = 0.25;
|
||||
static const float mThunderFrequency;
|
||||
static const float mThunderThreshold;
|
||||
static const float mThunderSoundDelay;
|
||||
static const std::string mThunderSoundID0;
|
||||
static const std::string mThunderSoundID1;
|
||||
static const std::string mThunderSoundID2;
|
||||
|
|
|
@ -478,7 +478,7 @@ namespace MWWorld
|
|||
|
||||
float World::getTimeScaleFactor() const
|
||||
{
|
||||
return mGlobalVariables->getInt ("timescale");
|
||||
return mGlobalVariables->getFloat ("timescale");
|
||||
}
|
||||
|
||||
void World::changeToInteriorCell (const std::string& cellName, const ESM::Position& position)
|
||||
|
|
Loading…
Reference in a new issue