Context context(*this);
while(!(context)->empty())
{
- // If this layer is active, then go
- // ahead and break out of the loop
- if((*context)->active() && !(*context)->dirty_time_.is_equal(time))
+ // If this layer is active, and
+ // it either isn't already set to the given time or
+ // it's a time loop layer,
+ // then break out of the loop and set its time
+ if((*context)->active() &&
+ (!(*context)->dirty_time_.is_equal(time) ||
+ (*context)->get_name() == "timeloop"))
break;
// Otherwise, we want to keep searching