mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-22 21:40:42 +00:00
Merge branch 'thunderstorm' into 'master'
Interrupt thunder SFX indoors (bug #6402) Closes #6402 See merge request OpenMW/openmw!3741
This commit is contained in:
commit
4c88ab5e07
@ -32,6 +32,7 @@
|
||||
Bug #6190: Unintuitive sun specularity time of day dependence
|
||||
Bug #6222: global map cell size can crash openmw if set to too high a value
|
||||
Bug #6313: Followers with high Fight can turn hostile
|
||||
Bug #6402: The sound of a thunderstorm does not stop playing after entering the premises
|
||||
Bug #6427: Enemy health bar disappears before damaging effect ends
|
||||
Bug #6550: Cloned body parts don't inherit texture effects
|
||||
Bug #6645: Enemy block sounds align with animation instead of blocked hits
|
||||
|
@ -180,7 +180,6 @@ namespace MWWorld
|
||||
, mTransitionDelta(Fallback::Map::getFloat("Weather_" + name + "_Transition_Delta"))
|
||||
, mThunderFrequency(Fallback::Map::getFloat("Weather_" + name + "_Thunder_Frequency"))
|
||||
, mThunderThreshold(Fallback::Map::getFloat("Weather_" + name + "_Thunder_Threshold"))
|
||||
, mThunderSoundID()
|
||||
, mFlashDecrement(Fallback::Map::getFloat("Weather_" + name + "_Flash_Decrement"))
|
||||
, mFlashBrightness(0.0f)
|
||||
{
|
||||
@ -823,19 +822,29 @@ namespace MWWorld
|
||||
|
||||
void WeatherManager::stopSounds()
|
||||
{
|
||||
MWBase::SoundManager* sndMgr = MWBase::Environment::get().getSoundManager();
|
||||
if (mAmbientSound)
|
||||
{
|
||||
MWBase::Environment::get().getSoundManager()->stopSound(mAmbientSound);
|
||||
sndMgr->stopSound(mAmbientSound);
|
||||
mAmbientSound = nullptr;
|
||||
}
|
||||
mPlayingAmbientSoundID = ESM::RefId();
|
||||
|
||||
if (mRainSound)
|
||||
{
|
||||
MWBase::Environment::get().getSoundManager()->stopSound(mRainSound);
|
||||
sndMgr->stopSound(mRainSound);
|
||||
mRainSound = nullptr;
|
||||
}
|
||||
mPlayingRainSoundID = ESM::RefId();
|
||||
|
||||
for (ESM::RefId soundId : mWeatherSettings[mCurrentWeather].mThunderSoundID)
|
||||
if (!soundId.empty() && sndMgr->getSoundPlaying(MWWorld::ConstPtr(), soundId))
|
||||
sndMgr->stopSound3D(MWWorld::ConstPtr(), soundId);
|
||||
|
||||
if (inTransition())
|
||||
for (ESM::RefId soundId : mWeatherSettings[mNextWeather].mThunderSoundID)
|
||||
if (!soundId.empty() && sndMgr->getSoundPlaying(MWWorld::ConstPtr(), soundId))
|
||||
sndMgr->stopSound3D(MWWorld::ConstPtr(), soundId);
|
||||
}
|
||||
|
||||
float WeatherManager::getWindSpeed() const
|
||||
|
@ -162,6 +162,8 @@ namespace MWWorld
|
||||
// This is used for Rain and Thunderstorm
|
||||
ESM::RefId mRainLoopSoundID;
|
||||
|
||||
std::array<ESM::RefId, 4> mThunderSoundID;
|
||||
|
||||
// Is this an ash storm / blight storm? If so, the following will happen:
|
||||
// - The particles and clouds will be oriented so they appear to come from the Red Mountain.
|
||||
// - Characters will animate their hand to protect eyes from the storm when looking in its direction (idlestorm
|
||||
@ -213,7 +215,6 @@ namespace MWWorld
|
||||
// non-zero values.
|
||||
float mThunderFrequency;
|
||||
float mThunderThreshold;
|
||||
ESM::RefId mThunderSoundID[4];
|
||||
float mFlashDecrement;
|
||||
|
||||
float mFlashBrightness;
|
||||
|
Loading…
x
Reference in New Issue
Block a user