This commit is contained in:
Nikolay Korolev
2021-01-11 17:14:56 +03:00
parent 53a99cb9ee
commit 625376f0d3
7 changed files with 586 additions and 537 deletions

View File

@ -51,6 +51,10 @@ float CWeather::WindClipped;
float CWeather::TrafficLightBrightness;
bool CWeather::bScriptsForceRain;
float CWeather::Stored_InterpolationValue;
int16 CWeather::Stored_OldWeatherType;
int16 CWeather::Stored_NewWeatherType;
float CWeather::Stored_Rain;
tRainStreak Streaks[NUM_RAIN_STREAKS];
@ -647,3 +651,23 @@ void CWeather::RenderRainStreaks(void)
TempBufferVerticesStored = 0;
TempBufferIndicesStored = 0;
}
void CWeather::StoreWeatherState()
{
Stored_StateStored = true;
Stored_InterpolationValue = InterpolationValue;
Stored_Rain = Rain;
Stored_NewWeatherType = NewWeatherType;
Stored_OldWeatherType = OldWeatherType;
}
void CWeather::RestoreWeatherState()
{
#ifdef FIX_BUGS // it's not used anyway though
Stored_StateStored = false;
#endif
InterpolationValue = Stored_InterpolationValue;
Rain = Stored_Rain;
NewWeatherType = Stored_NewWeatherType;
OldWeatherType = Stored_OldWeatherType;
}

View File

@ -42,6 +42,11 @@ public:
static float TrafficLightBrightness;
static bool bScriptsForceRain;
static bool Stored_StateStored;
static float Stored_InterpolationValue;
static int16 Stored_OldWeatherType;
static int16 Stored_NewWeatherType;
static float Stored_Rain;
static void RenderRainStreaks(void);
static void Update(void);
@ -55,6 +60,9 @@ public:
static void AddRain();
static void AddHeatHaze();
static void AddBeastie();
static void StoreWeatherState();
static void RestoreWeatherState();
};
enum {