mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 03:35:27 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
89329dfbaf
@ -53,7 +53,6 @@ namespace MWInput
|
|||||||
, mInvertY (Settings::Manager::getBool("invert y axis", "Input"))
|
, mInvertY (Settings::Manager::getBool("invert y axis", "Input"))
|
||||||
, mControlsDisabled(false)
|
, mControlsDisabled(false)
|
||||||
, mCameraSensitivity (Settings::Manager::getFloat("camera sensitivity", "Input"))
|
, mCameraSensitivity (Settings::Manager::getFloat("camera sensitivity", "Input"))
|
||||||
, mUISensitivity (Settings::Manager::getFloat("ui sensitivity", "Input"))
|
|
||||||
, mCameraYMultiplier (Settings::Manager::getFloat("camera y multiplier", "Input"))
|
, mCameraYMultiplier (Settings::Manager::getFloat("camera y multiplier", "Input"))
|
||||||
, mPreviewPOVDelay(0.f)
|
, mPreviewPOVDelay(0.f)
|
||||||
, mTimeIdle(0.f)
|
, mTimeIdle(0.f)
|
||||||
@ -586,9 +585,6 @@ namespace MWInput
|
|||||||
if (it->first == "Input" && it->second == "camera sensitivity")
|
if (it->first == "Input" && it->second == "camera sensitivity")
|
||||||
mCameraSensitivity = Settings::Manager::getFloat("camera sensitivity", "Input");
|
mCameraSensitivity = Settings::Manager::getFloat("camera sensitivity", "Input");
|
||||||
|
|
||||||
if (it->first == "Input" && it->second == "ui sensitivity")
|
|
||||||
mUISensitivity = Settings::Manager::getFloat("ui sensitivity", "Input");
|
|
||||||
|
|
||||||
if (it->first == "Input" && it->second == "grab cursor")
|
if (it->first == "Input" && it->second == "grab cursor")
|
||||||
mGrabCursor = Settings::Manager::getBool("grab cursor", "Input");
|
mGrabCursor = Settings::Manager::getBool("grab cursor", "Input");
|
||||||
|
|
||||||
|
@ -174,7 +174,6 @@ namespace MWInput
|
|||||||
bool mControlsDisabled;
|
bool mControlsDisabled;
|
||||||
|
|
||||||
float mCameraSensitivity;
|
float mCameraSensitivity;
|
||||||
float mUISensitivity;
|
|
||||||
float mCameraYMultiplier;
|
float mCameraYMultiplier;
|
||||||
float mPreviewPOVDelay;
|
float mPreviewPOVDelay;
|
||||||
float mTimeIdle;
|
float mTimeIdle;
|
||||||
|
@ -138,8 +138,7 @@ namespace MWWorld
|
|||||||
{
|
{
|
||||||
if (mSky && (isCellExterior() || isCellQuasiExterior()))
|
if (mSky && (isCellExterior() || isCellQuasiExterior()))
|
||||||
{
|
{
|
||||||
mRendering->skySetDate (mGlobalVariables["day"].getInteger(),
|
mRendering->skySetDate (mDay->getInteger(), mMonth->getInteger());
|
||||||
mGlobalVariables["month"].getInteger());
|
|
||||||
|
|
||||||
mRendering->setSkyEnabled(true);
|
mRendering->setSkyEnabled(true);
|
||||||
}
|
}
|
||||||
@ -188,18 +187,30 @@ namespace MWWorld
|
|||||||
if (mEsm[0].getFormat() == 0)
|
if (mEsm[0].getFormat() == 0)
|
||||||
ensureNeededRecords();
|
ensureNeededRecords();
|
||||||
|
|
||||||
|
fillGlobalVariables();
|
||||||
|
|
||||||
mStore.setUp();
|
mStore.setUp();
|
||||||
mStore.movePlayerRecord();
|
mStore.movePlayerRecord();
|
||||||
|
|
||||||
mSwimHeightScale = mStore.get<ESM::GameSetting>().find("fSwimHeightScale")->getFloat();
|
mSwimHeightScale = mStore.get<ESM::GameSetting>().find("fSwimHeightScale")->getFloat();
|
||||||
|
|
||||||
mGlobalVariables.fill (mStore);
|
|
||||||
|
|
||||||
mWeatherManager = new MWWorld::WeatherManager(*mRendering, mFallback, mStore);
|
mWeatherManager = new MWWorld::WeatherManager(*mRendering, mFallback, mStore);
|
||||||
|
|
||||||
mWorldScene = new Scene(*mRendering, mPhysics);
|
mWorldScene = new Scene(*mRendering, mPhysics);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void World::fillGlobalVariables()
|
||||||
|
{
|
||||||
|
mGlobalVariables.fill (mStore);
|
||||||
|
|
||||||
|
mGameHour = &mGlobalVariables["gamehour"];
|
||||||
|
mDaysPassed = &mGlobalVariables["dayspassed"];
|
||||||
|
mDay = &mGlobalVariables["day"];
|
||||||
|
mMonth = &mGlobalVariables["month"];
|
||||||
|
mYear = &mGlobalVariables["year"];
|
||||||
|
mTimeScale = &mGlobalVariables["timescale"];
|
||||||
|
}
|
||||||
|
|
||||||
void World::startNewGame (bool bypass)
|
void World::startNewGame (bool bypass)
|
||||||
{
|
{
|
||||||
mGoToJail = false;
|
mGoToJail = false;
|
||||||
@ -306,7 +317,7 @@ namespace MWWorld
|
|||||||
mTeleportEnabled = true;
|
mTeleportEnabled = true;
|
||||||
mLevitationEnabled = true;
|
mLevitationEnabled = true;
|
||||||
|
|
||||||
mGlobalVariables.fill (mStore);
|
fillGlobalVariables();
|
||||||
}
|
}
|
||||||
|
|
||||||
int World::countSavedGameRecords() const
|
int World::countSavedGameRecords() const
|
||||||
@ -798,15 +809,15 @@ namespace MWWorld
|
|||||||
|
|
||||||
mWeatherManager->advanceTime (hours, incremental);
|
mWeatherManager->advanceTime (hours, incremental);
|
||||||
|
|
||||||
hours += mGlobalVariables["gamehour"].getFloat();
|
hours += mGameHour->getFloat();
|
||||||
|
|
||||||
setHour (hours);
|
setHour (hours);
|
||||||
|
|
||||||
int days = static_cast<int>(hours / 24);
|
int days = static_cast<int>(hours / 24);
|
||||||
|
|
||||||
if (days>0)
|
if (days>0)
|
||||||
mGlobalVariables["dayspassed"].setInteger (
|
mDaysPassed->setInteger (
|
||||||
days + mGlobalVariables["dayspassed"].getInteger());
|
days + mDaysPassed->getInteger());
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::setHour (double hour)
|
void World::setHour (double hour)
|
||||||
@ -818,10 +829,10 @@ namespace MWWorld
|
|||||||
|
|
||||||
hour = std::fmod (hour, 24);
|
hour = std::fmod (hour, 24);
|
||||||
|
|
||||||
mGlobalVariables["gamehour"].setFloat(static_cast<float>(hour));
|
mGameHour->setFloat(static_cast<float>(hour));
|
||||||
|
|
||||||
if (days>0)
|
if (days>0)
|
||||||
setDay (days + mGlobalVariables["day"].getInteger());
|
setDay (days + mDay->getInteger());
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::setDay (int day)
|
void World::setDay (int day)
|
||||||
@ -829,7 +840,7 @@ namespace MWWorld
|
|||||||
if (day<1)
|
if (day<1)
|
||||||
day = 1;
|
day = 1;
|
||||||
|
|
||||||
int month = mGlobalVariables["month"].getInteger();
|
int month = mMonth->getInteger();
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
@ -844,14 +855,14 @@ namespace MWWorld
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
month = 0;
|
month = 0;
|
||||||
mGlobalVariables["year"].setInteger (mGlobalVariables["year"].getInteger()+1);
|
mYear->setInteger(mYear->getInteger()+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
day -= days;
|
day -= days;
|
||||||
}
|
}
|
||||||
|
|
||||||
mGlobalVariables["day"].setInteger (day);
|
mDay->setInteger(day);
|
||||||
mGlobalVariables["month"].setInteger (month);
|
mMonth->setInteger(month);
|
||||||
|
|
||||||
mRendering->skySetDate(day, month);
|
mRendering->skySetDate(day, month);
|
||||||
}
|
}
|
||||||
@ -866,30 +877,30 @@ namespace MWWorld
|
|||||||
|
|
||||||
int days = getDaysPerMonth (month);
|
int days = getDaysPerMonth (month);
|
||||||
|
|
||||||
if (mGlobalVariables["day"].getInteger()>days)
|
if (mDay->getInteger()>days)
|
||||||
mGlobalVariables["day"].setInteger (days);
|
mDay->setInteger (days);
|
||||||
|
|
||||||
mGlobalVariables["month"].setInteger (month);
|
mMonth->setInteger (month);
|
||||||
|
|
||||||
if (years>0)
|
if (years>0)
|
||||||
mGlobalVariables["year"].setInteger (years+mGlobalVariables["year"].getInteger());
|
mYear->setInteger (years+mYear->getInteger());
|
||||||
|
|
||||||
mRendering->skySetDate (mGlobalVariables["day"].getInteger(), month);
|
mRendering->skySetDate (mDay->getInteger(), month);
|
||||||
}
|
}
|
||||||
|
|
||||||
int World::getDay() const
|
int World::getDay() const
|
||||||
{
|
{
|
||||||
return mGlobalVariables["day"].getInteger();
|
return mDay->getInteger();
|
||||||
}
|
}
|
||||||
|
|
||||||
int World::getMonth() const
|
int World::getMonth() const
|
||||||
{
|
{
|
||||||
return mGlobalVariables["month"].getInteger();
|
return mMonth->getInteger();
|
||||||
}
|
}
|
||||||
|
|
||||||
int World::getYear() const
|
int World::getYear() const
|
||||||
{
|
{
|
||||||
return mGlobalVariables["year"].getInteger();
|
return mYear->getInteger();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string World::getMonthName (int month) const
|
std::string World::getMonthName (int month) const
|
||||||
@ -914,8 +925,7 @@ namespace MWWorld
|
|||||||
|
|
||||||
TimeStamp World::getTimeStamp() const
|
TimeStamp World::getTimeStamp() const
|
||||||
{
|
{
|
||||||
return TimeStamp (mGlobalVariables["gamehour"].getFloat(),
|
return TimeStamp (mGameHour->getFloat(), mDaysPassed->getInteger());
|
||||||
mGlobalVariables["dayspassed"].getInteger());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool World::toggleSky()
|
bool World::toggleSky()
|
||||||
@ -942,7 +952,7 @@ namespace MWWorld
|
|||||||
|
|
||||||
float World::getTimeScaleFactor() const
|
float World::getTimeScaleFactor() const
|
||||||
{
|
{
|
||||||
return mGlobalVariables["timescale"].getFloat();
|
return mTimeScale->getFloat();
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::changeToInteriorCell (const std::string& cellName, const ESM::Position& position)
|
void World::changeToInteriorCell (const std::string& cellName, const ESM::Position& position)
|
||||||
|
@ -85,6 +85,13 @@ namespace MWWorld
|
|||||||
MWPhysics::PhysicsSystem *mPhysics;
|
MWPhysics::PhysicsSystem *mPhysics;
|
||||||
bool mSky;
|
bool mSky;
|
||||||
|
|
||||||
|
ESM::Variant* mGameHour;
|
||||||
|
ESM::Variant* mDaysPassed;
|
||||||
|
ESM::Variant* mDay;
|
||||||
|
ESM::Variant* mMonth;
|
||||||
|
ESM::Variant* mYear;
|
||||||
|
ESM::Variant* mTimeScale;
|
||||||
|
|
||||||
Cells mCells;
|
Cells mCells;
|
||||||
|
|
||||||
std::string mCurrentWorldSpace;
|
std::string mCurrentWorldSpace;
|
||||||
@ -135,6 +142,8 @@ namespace MWWorld
|
|||||||
|
|
||||||
void ensureNeededRecords();
|
void ensureNeededRecords();
|
||||||
|
|
||||||
|
void fillGlobalVariables();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief loadContentFiles - Loads content files (esm,esp,omwgame,omwaddon)
|
* @brief loadContentFiles - Loads content files (esm,esp,omwgame,omwaddon)
|
||||||
* @param fileCollections- Container which holds content file names and their paths
|
* @param fileCollections- Container which holds content file names and their paths
|
||||||
|
@ -463,11 +463,15 @@ voice volume = 0.8
|
|||||||
|
|
||||||
[Terrain]
|
[Terrain]
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
# Not currently used, presumably due to the OpenSceneGraph upgrade.
|
# Not currently used, presumably due to the OpenSceneGraph upgrade.
|
||||||
distant land = false
|
distant land = false
|
||||||
|
|
||||||
# Not currently used, presumably due to the OpenSceneGraph upgrade.
|
# Not currently used, presumably due to the OpenSceneGraph upgrade.
|
||||||
shader = true
|
shader = true
|
||||||
|
=======
|
||||||
|
camera y multiplier = 1.0
|
||||||
|
>>>>>>> upstream/master
|
||||||
|
|
||||||
[Video]
|
[Video]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user