Reimplement miles sound artifacts, Stone Brick Stairs recipe, and craft sound (#684)
* Reimplement miles sound artifacts * Fix stone brick stairs recipe * Fix craft and scroll sound
This commit is contained in:
@@ -266,10 +266,7 @@ void SoundEngine::updateMiniAudio()
|
||||
|
||||
ma_sound_set_volume(&s->sound, finalVolume);
|
||||
|
||||
if (!s->info.bUseSoundsPitchVal)
|
||||
{
|
||||
ma_sound_set_pitch(&s->sound, s->info.pitch);
|
||||
}
|
||||
ma_sound_set_pitch(&s->sound, s->info.pitch);
|
||||
|
||||
if (s->info.bIs3D)
|
||||
{
|
||||
|
||||
@@ -2342,7 +2342,13 @@ void UIController::PlayUISFX(ESoundEffect eSound)
|
||||
if (time - m_lastUiSfx < 10) { return; }
|
||||
m_lastUiSfx = time;
|
||||
|
||||
Minecraft::GetInstance()->soundEngine->playUI(eSound,1.0f,1.0f);
|
||||
float pitch = 1.0f;
|
||||
if (eSound == eSFX_Focus)
|
||||
{
|
||||
pitch += (m_randomDistribution(m_randomGenerator) - 0.5f) / 10;
|
||||
}
|
||||
|
||||
Minecraft::GetInstance()->soundEngine->playUI(eSound,1.0f,pitch);
|
||||
}
|
||||
|
||||
void UIController::DisplayGamertag(unsigned int iPad, bool show)
|
||||
|
||||
@@ -3,6 +3,7 @@ using namespace std;
|
||||
#include "IUIController.h"
|
||||
#include "UIEnums.h"
|
||||
#include "UIGroup.h"
|
||||
#include <random>
|
||||
|
||||
class UIAbstractBitmapFont;
|
||||
class UIBitmapFont;
|
||||
@@ -63,6 +64,9 @@ private:
|
||||
UITTFFont *m_mcTTFFont;
|
||||
UIBitmapFont *m_moj7, *m_moj11;
|
||||
|
||||
std::mt19937 m_randomGenerator;
|
||||
std::uniform_real_distribution<float> m_randomDistribution;
|
||||
|
||||
public:
|
||||
void setCleanupOnReload();
|
||||
void updateCurrentFont();
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user