Skip to content

Commit 8e5e052

Browse files
committed
Changed --no-time-travel to just affect the displayed time.
Previous approach changed the commit timestamp which has other implications to the simulation such as how merge commits get applied when a file has been removed.
1 parent 93b5210 commit 8e5e052

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/gource.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,13 +1114,6 @@ void Gource::readLog() {
11141114
break;
11151115
}
11161116

1117-
if(gGourceSettings.no_time_travel) {
1118-
time_t check_time = commitqueue.empty() ? lasttime : commitqueue.back().timestamp;
1119-
if(commit.timestamp < check_time) {
1120-
commit.timestamp = check_time;
1121-
}
1122-
}
1123-
11241117
commitqueue.push_back(commit);
11251118
}
11261119

@@ -1720,12 +1713,19 @@ void Gource::logic(float t, float dt) {
17201713

17211714
processCommit(commit, t);
17221715

1723-
// allow for non linear time lines
1724-
if(lasttime > commit.timestamp) {
1725-
currtime = commit.timestamp;
1716+
if(gGourceSettings.no_time_travel) {
1717+
if(commit.timestamp > lasttime) {
1718+
lasttime = commit.timestamp;
1719+
}
1720+
1721+
} else {
1722+
// allow for non linear time lines
1723+
if(lasttime > commit.timestamp) {
1724+
currtime = commit.timestamp;
1725+
}
1726+
lasttime = commit.timestamp;
17261727
}
17271728

1728-
lasttime = commit.timestamp;
17291729
subseconds = 0.0;
17301730

17311731
commitqueue.pop_front();

0 commit comments

Comments
 (0)