mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-07 12:54:00 +00:00
54fa5273dc
Fixed several issues: * Waiting/jail time/training all now properly skip remaining transitions * ChangeWeather no longer permanently sets the region's weather * ChangeWeather being called during a transition now correctly queues up another transition * Corrected transition delta and factor calculations * ModRegion settings are now saved
37 lines
742 B
C++
37 lines
742 B
C++
#ifndef OPENMW_ESM_WEATHERSTATE_H
|
|
#define OPENMW_ESM_WEATHERSTATE_H
|
|
|
|
#include <map>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace ESM
|
|
{
|
|
class ESMReader;
|
|
class ESMWriter;
|
|
|
|
struct RegionWeatherState
|
|
{
|
|
int mWeather;
|
|
std::vector<char> mChances;
|
|
};
|
|
|
|
struct WeatherState
|
|
{
|
|
std::string mCurrentRegion;
|
|
float mTimePassed;
|
|
bool mFastForward;
|
|
float mWeatherUpdateTime;
|
|
float mTransitionFactor;
|
|
int mCurrentWeather;
|
|
int mNextWeather;
|
|
int mQueuedWeather;
|
|
std::map<std::string, RegionWeatherState> mRegions;
|
|
|
|
void load(ESMReader& esm);
|
|
void save(ESMWriter& esm) const;
|
|
};
|
|
}
|
|
|
|
#endif
|