From e65ebe154486c4bd6af60bc0c418bae923055e16 Mon Sep 17 00:00:00 2001 From: chaoskagami Date: Sun, 24 Aug 2014 23:53:59 -0400 Subject: [PATCH] Fixed up voice detect this time. PERMANENTLY. I hope. --- vndc/src/op_sound.cpp | 12 +++--------- vndc/src/op_text.cpp | 5 ++++- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/vndc/src/op_sound.cpp b/vndc/src/op_sound.cpp index e219cac..ad34f65 100644 --- a/vndc/src/op_sound.cpp +++ b/vndc/src/op_sound.cpp @@ -23,17 +23,11 @@ void op_sound(char* file, int* times) { // set - e.g. the sound was a voice as well, we stop the previous // sound before playing this one. - if(GetData()->vndc_enabled && - (GetData()->next_line[6] == '"' || + if(GetData()->vndc_enabled && // 0 1 2 3 4 5 + (GetData()->next_line[5] == '"' || // t e x t " GetData()->next_line[strlen(GetData()->next_line) - 1] == '"')) { - if(GetData()->is_spoken_line == true) { - GetData()->ctx->Audio()->FlushSfx(); - } - GetData()->is_spoken_line = true; + GetData()->ctx->Audio()->FlushSfx(); } - else - GetData()->is_spoken_line = false; - // Play command int count = 1; diff --git a/vndc/src/op_text.cpp b/vndc/src/op_text.cpp index 4bf8f7b..6b3be61 100644 --- a/vndc/src/op_text.cpp +++ b/vndc/src/op_text.cpp @@ -33,13 +33,16 @@ void op_text(char* string) { TextManager* txt = GetData()->ctx->Text(); - int xloc = ( GetData()->screen_w - txt->TestLen(string) - GetData()->render_x1 ); + int xloc = ( GetData()->screen_w - (txt->TestLen(string) + GetData()->render_x1) ); txt->Render(string, xloc, GetData()->render_y1); + GetData()->wait_input = true; Wait(); op_cleartext(); + + return; } // Wait for input, then blank if(!strcmp(string, "!")) { -- 2.39.5