voice hints, here: cf=9999 survive decoder

This commit is contained in:
Arndt 2016-05-01 11:51:42 +02:00
parent 23d1812371
commit e8d8bc084a
6 changed files with 40 additions and 17 deletions

View file

@ -49,13 +49,19 @@ public final class BExpressionContextWay extends BExpressionContext implements T
}
@Override
public boolean accessAllowed( byte[] description )
public int accessType( byte[] description )
{
evaluate( false, description, null );
boolean ok = getCostfactor() < 10000.;
evaluate( true, description, null );
ok |= getCostfactor() < 10000.;
return ok;
float minCostFactor = getCostfactor();
if ( minCostFactor >= 9999.f )
{
evaluate( true, description, null );
float reverseCostFactor = getCostfactor();
if ( reverseCostFactor < minCostFactor )
{
minCostFactor = reverseCostFactor;
}
}
return minCostFactor < 9999.f ? 2 : minCostFactor < 10000.f ? 1 : 0;
}
}