mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-09 00:24:15 +00:00
fix: Nether portal trigger and travel sounds not playing (#1523)
This commit is contained in:
@@ -8,6 +8,9 @@
|
||||
#include "Settings.h"
|
||||
#include "PlayerList.h"
|
||||
#include "MultiPlayerLevel.h"
|
||||
#include "Minecraft.h"
|
||||
#include "Common/Audio/SoundEngine.h"
|
||||
#include "../Minecraft.World/SoundTypes.h"
|
||||
|
||||
#include "../Minecraft.World/net.minecraft.network.packet.h"
|
||||
#include "../Minecraft.World/net.minecraft.world.damagesource.h"
|
||||
@@ -783,6 +786,13 @@ void ServerPlayer::changeDimension(int i)
|
||||
// 4J: Removed on the advice of the mighty King of Achievments (JV)
|
||||
// awardStat(GenericStats::portal(), GenericStats::param_portal());
|
||||
}
|
||||
// play the travel whoosh right before the actual dimension swap
|
||||
Minecraft *mc = Minecraft::GetInstance();
|
||||
if (mc != nullptr && mc->soundEngine != nullptr)
|
||||
{
|
||||
mc->soundEngine->playUI(eSoundType_PORTAL_TRAVEL, 1, 1.0f);
|
||||
}
|
||||
|
||||
server->getPlayers()->toggleDimension( dynamic_pointer_cast<ServerPlayer>(shared_from_this()), i);
|
||||
lastSentExp = -1;
|
||||
lastSentHealth = -1;
|
||||
|
||||
Reference in New Issue
Block a user