mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/GabsPuNs-MinecraftConsoles.git
synced 2026-05-22 00:05:42 +00:00
Update SoundEngine.cpp
This commit is contained in:
@@ -337,7 +337,7 @@ void SoundEngine::updateMiniAudio()
|
||||
/////////////////////////////////////////////
|
||||
inline void SoundEngine::pickGameModeMusic(Minecraft* pMinecraft, unsigned int i)
|
||||
{
|
||||
if (pMinecraft->localplayers[i] != NULL && pMinecraft->localplayers[i]->abilities.instabuild && pMinecraft->localplayers[i]->abilities.mayfly)
|
||||
if (pMinecraft->localplayers[i] != nullptr && pMinecraft->localplayers[i]->abilities.instabuild && pMinecraft->localplayers[i]->abilities.mayfly)
|
||||
m_musicID = getMusicID(eMusicDomain_Creative);
|
||||
// TODO(3UR): this is a part of minigames also in the future other minigame ids will need to be handled for now TU30 only checks for BATTLE
|
||||
//else if (pMinecraft->GetCustomGameMode() && CustomGameModeInst::GetId() == EMiniGameId::BATTLE) // @3UR: thanks https://github.com/GRAnimated/MinecraftLCE/blob/6947670d152582457bfe02bd909ee30a7ab7eb55/src/Minecraft.World/net/minecraft/world/level/gamemode/minigames/EMiniGameId.h#L3
|
||||
@@ -1456,20 +1456,18 @@ void SoundEngine::playMusicUpdate()
|
||||
bool playerInEnd=false;
|
||||
bool playerInNether=false;
|
||||
|
||||
for(unsigned int i=0;i<MAX_LOCAL_PLAYERS;i++)
|
||||
unsigned int i = 0;
|
||||
for (i = 0; i < MAX_LOCAL_PLAYERS; i++)
|
||||
{
|
||||
if(pMinecraft->localplayers[i]!=nullptr)
|
||||
if(pMinecraft->localplayers[i] != nullptr)
|
||||
{
|
||||
if(pMinecraft->localplayers[i]->dimension==LevelData::DIMENSION_END)
|
||||
{
|
||||
playerInEnd=true;
|
||||
}
|
||||
else if(pMinecraft->localplayers[i]->dimension==LevelData::DIMENSION_NETHER)
|
||||
{
|
||||
playerInNether=true;
|
||||
}
|
||||
if(pMinecraft->localplayers[i]->dimension == LevelData::DIMENSION_END)
|
||||
playerInEnd = true;
|
||||
else if(pMinecraft->localplayers[i]->dimension == LevelData::DIMENSION_NETHER)
|
||||
playerInNether = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(playerInEnd)
|
||||
{
|
||||
m_musicID = getMusicID(eMusicDomain_End);
|
||||
|
||||
Reference in New Issue
Block a user