From dad803e95601ff3d4f6e026da414d5a6f13edb9b Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Tue, 31 Jan 2012 00:44:07 +0000 Subject: [PATCH] Set the start and end times of syllables relative to the line's start time rather than time 0 to match 2.1.x's behavior. Closes #1440. Originally committed to SVN as r6397. --- aegisub/src/auto4_lua_assfile.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aegisub/src/auto4_lua_assfile.cpp b/aegisub/src/auto4_lua_assfile.cpp index fec171e65..0efd12bc2 100644 --- a/aegisub/src/auto4_lua_assfile.cpp +++ b/aegisub/src/auto4_lua_assfile.cpp @@ -641,8 +641,8 @@ namespace Automation4 { // may rely on kara[0] existing so add an empty syllable lua_newtable(L); set_field(L, "duration", 0); - set_field(L, "start_time", dia->Start); - set_field(L, "end_time", dia->Start); + set_field(L, "start_time", 0); + set_field(L, "end_time", 0); set_field(L, "tag", ""); set_field(L, "text", ""); set_field(L, "text_stripped", ""); @@ -652,8 +652,8 @@ namespace Automation4 { for (AssKaraoke::iterator it = kara.begin(); it != kara.end(); ++it) { lua_newtable(L); set_field(L, "duration", it->duration); - set_field(L, "start_time", it->start_time); - set_field(L, "end_time", it->start_time + it->duration); + set_field(L, "start_time", it->start_time - dia->Start); + set_field(L, "end_time", it->start_time + it->duration - dia->Start); set_field(L, "tag", it->tag_type); set_field(L, "text", it->GetText(false)); set_field(L, "text_stripped", it->text);