Fix a bug where a failinb build that causes death would play both the death sound and build failed sound.
This commit is contained in:
parent
e8163bbeaf
commit
fee724e637
3 changed files with 9 additions and 4 deletions
8
gui.cpp
8
gui.cpp
|
@ -139,9 +139,13 @@ void GUI::build_works() {
|
|||
output("BUILD FINISHED!");
|
||||
}
|
||||
|
||||
void GUI::build_failed(const string &command) {
|
||||
void GUI::build_failed(bool play_sound, const string &command) {
|
||||
building_sound.stop();
|
||||
build_failed_sound.play();
|
||||
|
||||
if(play_sound) {
|
||||
build_failed_sound.play();
|
||||
}
|
||||
|
||||
output(format("!!! BUILD FAILED. Your command correct? '{}'", command));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue