mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-09 12:25:17 -04:00
more less preprocessed code lines
This commit is contained in:
parent
3f54d3e569
commit
f1447207b2
@ -222,12 +222,16 @@ namespace MWBase
|
||||
|
||||
virtual const std::vector<MWWorld::Weather>& getAllWeather() const = 0;
|
||||
|
||||
virtual int getCurrentWeatherScriptId() const = 0;
|
||||
|
||||
virtual const MWWorld::Weather& getCurrentWeather() const = 0;
|
||||
|
||||
virtual const MWWorld::Weather* getWeather(size_t index) const = 0;
|
||||
|
||||
virtual const MWWorld::Weather* getWeather(const ESM::RefId& id) const = 0;
|
||||
|
||||
virtual int getNextWeatherScriptId() const = 0;
|
||||
|
||||
virtual const MWWorld::Weather* getNextWeather() const = 0;
|
||||
|
||||
virtual float getWeatherTransition() const = 0;
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include "../mwworld/class.hpp"
|
||||
#include "../mwworld/esmstore.hpp"
|
||||
#include "../mwworld/inventorystore.hpp"
|
||||
#include "../mwworld/weather.hpp"
|
||||
|
||||
#include "../mwmechanics/actorutil.hpp"
|
||||
#include "../mwmechanics/creaturestats.hpp"
|
||||
@ -502,7 +501,7 @@ int MWDialogue::Filter::getSelectStructInteger(const SelectWrapper& select) cons
|
||||
|
||||
case ESM::DialogueCondition::Function_Weather:
|
||||
|
||||
return MWBase::Environment::get().getWorld()->getCurrentWeather().mScriptId;
|
||||
return MWBase::Environment::get().getWorld()->getCurrentWeatherScriptId();
|
||||
|
||||
case ESM::DialogueCondition::Function_Reputation:
|
||||
if (!mActor.getClass().isNpc())
|
||||
|
@ -60,7 +60,6 @@
|
||||
#include "../mwworld/class.hpp"
|
||||
#include "../mwworld/groundcoverstore.hpp"
|
||||
#include "../mwworld/scene.hpp"
|
||||
#include "../mwworld/weather.hpp"
|
||||
|
||||
#include "../mwgui/postprocessorhud.hpp"
|
||||
|
||||
@ -944,8 +943,8 @@ namespace MWRender
|
||||
stateUpdater->setIsUnderwater(isUnderwater);
|
||||
stateUpdater->setFogColor(fogColor);
|
||||
stateUpdater->setGameHour(world->getTimeStamp().getHour());
|
||||
stateUpdater->setWeatherId(world->getCurrentWeather().mScriptId);
|
||||
stateUpdater->setNextWeatherId(world->getNextWeather() != nullptr ? world->getNextWeather()->mScriptId : -1);
|
||||
stateUpdater->setWeatherId(world->getCurrentWeatherScriptId());
|
||||
stateUpdater->setNextWeatherId(world->getNextWeatherScriptId());
|
||||
stateUpdater->setWeatherTransition(world->getWeatherTransition());
|
||||
stateUpdater->setWindSpeed(world->getWindSpeed());
|
||||
stateUpdater->setSkyColor(mSky->getSkyColor());
|
||||
|
@ -14,7 +14,6 @@
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwworld/esmstore.hpp"
|
||||
#include "../mwworld/weather.hpp"
|
||||
|
||||
namespace MWScript
|
||||
{
|
||||
@ -72,7 +71,7 @@ namespace MWScript
|
||||
public:
|
||||
void execute(Interpreter::Runtime& runtime) override
|
||||
{
|
||||
runtime.push(MWBase::Environment::get().getWorld()->getCurrentWeather().mScriptId);
|
||||
runtime.push(MWBase::Environment::get().getWorld()->getCurrentWeatherScriptId());
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1873,6 +1873,11 @@ namespace MWWorld
|
||||
return mWeatherManager->getAllWeather();
|
||||
}
|
||||
|
||||
int World::getCurrentWeatherScriptId() const
|
||||
{
|
||||
return mWeatherManager->getWeather().mScriptId;
|
||||
}
|
||||
|
||||
const MWWorld::Weather& World::getCurrentWeather() const
|
||||
{
|
||||
return mWeatherManager->getWeather();
|
||||
@ -1888,6 +1893,15 @@ namespace MWWorld
|
||||
return mWeatherManager->getWeather(id);
|
||||
}
|
||||
|
||||
int World::getNextWeatherScriptId() const
|
||||
{
|
||||
auto next = mWeatherManager->getNextWeather();
|
||||
if (next == nullptr)
|
||||
return -1;
|
||||
|
||||
return next->mScriptId;
|
||||
}
|
||||
|
||||
const MWWorld::Weather* World::getNextWeather() const
|
||||
{
|
||||
return mWeatherManager->getNextWeather();
|
||||
|
@ -321,10 +321,11 @@ namespace MWWorld
|
||||
|
||||
const std::vector<MWWorld::Weather>& getAllWeather() const override;
|
||||
|
||||
int getCurrentWeatherScriptId() const override;
|
||||
const MWWorld::Weather& getCurrentWeather() const override;
|
||||
const MWWorld::Weather* getWeather(size_t index) const override;
|
||||
const MWWorld::Weather* getWeather(const ESM::RefId& id) const override;
|
||||
|
||||
int getNextWeatherScriptId() const override;
|
||||
const MWWorld::Weather* getNextWeather() const override;
|
||||
|
||||
float getWeatherTransition() const override;
|
||||
|
Loading…
x
Reference in New Issue
Block a user