Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 2f9822c

Browse files
committed
Make the game play an error sound when you try to use a pieslice with a submenu by deactivating the pie menu instead of pressing the slice (thanks 4zK for the idea)
1 parent 196b607 commit 2f9822c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Entities/PieMenu.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -844,8 +844,12 @@ namespace RTE {
844844
m_ActivatedPieSlice = m_HoveredPieSlice->IsEnabled() ? m_HoveredPieSlice : m_ActivatedPieSlice;
845845
m_AlreadyActivatedPieSlice = m_ActivatedPieSlice;
846846

847-
SoundContainer *soundToPlay = m_HoveredPieSlice->IsEnabled() ? g_GUISound.SlicePickedSound() : g_GUISound.DisabledPickedSound();
848-
soundToPlay->Play();
847+
if (m_HoveredPieSlice->GetSubPieMenu() && controller->IsState(ControlState::RELEASE_SECONDARY)) {
848+
g_GUISound.UserErrorSound()->Play();
849+
} else {
850+
SoundContainer *soundToPlay = m_HoveredPieSlice->IsEnabled() ? g_GUISound.SlicePickedSound() : g_GUISound.DisabledPickedSound();
851+
soundToPlay->Play();
852+
}
849853
}
850854

851855
if (IsEnabled()) {

0 commit comments

Comments
 (0)