c_trace?

Maybe have it check which floor level the trace hits. If it hits the lower level - i.e. it reaches the gap, then it goes into jump mode. When it hits the higher level, it continues to do the normal, non-jumping movement.