enemy jumping only if necessary