From: chaoskagami Date: Mon, 25 Aug 2014 03:53:59 +0000 (-0400) Subject: Fixed up voice detect this time. PERMANENTLY. I hope. X-Git-Tag: stable-2~5 X-Git-Url: https://chaos.moe/g/?a=commitdiff_plain;h=e65ebe154486c4bd6af60bc0c418bae923055e16;p=vn%2Fvndc.git Fixed up voice detect this time. PERMANENTLY. I hope. --- 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, "!")) {