=== modified file 'rocrail/impl/model.c' --- rocrail/impl/model.c 2013-01-15 16:07:24 +0000 +++ rocrail/impl/model.c 2013-01-17 08:10:35 +0000 @@ -4321,17 +4321,23 @@ /* Check for wanted block: */ if( gotoBlockId != NULL && StrOp.equals( gotoBlockId, blockId ) ) { - TraceOp.trc( name, TRCLEVEL_USER1, __LINE__, 9999, - "found the GOTO block [%s] for [%s]", gotoBlockId, LocOp.getId( loc ) ); - blockBest = block; - routeBest = route; - /* ignore all other found fitting blocks */ - ListOp.clear(fitBlocks); - ListOp.clear(fitRoutes); - /* add the goto block as the one and only */ - ListOp.add( fitBlocks, (obj)block ); - ListOp.add( fitRoutes, (obj)route ); - break; + if( forceSameDir && !samedir ) { + TraceOp.trc( name, TRCLEVEL_USER1, __LINE__, 9999, + "found the GOTO block [%s] for [%s] but its in the wrong direction", gotoBlockId, LocOp.getId( loc ) ); + } + else { + TraceOp.trc( name, TRCLEVEL_USER1, __LINE__, 9999, + "found the GOTO block [%s] for [%s]", gotoBlockId, LocOp.getId( loc ) ); + blockBest = block; + routeBest = route; + /* ignore all other found fitting blocks */ + ListOp.clear(fitBlocks); + ListOp.clear(fitRoutes); + /* add the goto block as the one and only */ + ListOp.add( fitBlocks, (obj)block ); + ListOp.add( fitRoutes, (obj)route ); + break; + } } suits = block->isSuited( block, loc, &restlen, !selectShortest );