[fix] Fixed an issue that time variable might be more than 1f.

This commit is contained in:
falsycat 2019-10-17 00:00:00 +00:00
parent fc81f9dcc7
commit a6a0747931

View File

@ -30,7 +30,7 @@ abstract class AbstractScheduledController : ScheduledControllerInterface {
if (next_operation_index_ >= 1) { if (next_operation_index_ >= 1) {
const current = &operations_[next_operation_index_-1]; const current = &operations_[next_operation_index_-1];
ProcessOperation( ProcessOperation(
current.period.ConvertToRelativeTime(time), *current); current.period.ConvertToRelativeTime(time).clamp(0f, 1f), *current);
if (current.period.end > time) return; if (current.period.end > time) return;
FinalizeOperation(*current); FinalizeOperation(*current);
} }