This commit is contained in:
MadWasp79 2019-10-21 17:27:23 +03:00
parent e25fc71f82
commit bb19a35540

View file

@ -470,8 +470,6 @@ public class RouteDataObject {
return pointNameTypes[ind];
}
public int[] getPointTypes(int ind) {
if (pointTypes == null || ind >= pointTypes.length) {
return null;
@ -508,6 +506,41 @@ public class RouteDataObject {
}
}
}
if (pointTypes != null) {
for (int i = 0; i < pointTypes.length; i++) {
if (pointTypes[i] != null) {
int[] pTypes = pointTypes[i];
int pSz = pTypes.length;
if (pSz > 0) {
for (int j = 0; j < pSz; j++) {
RouteTypeRule r = region.quickGetEncodingRule(pTypes[j]);
if (r != null && r.conditional()) {
int vl = r.conditionalValue(conditionalTime);
if (vl != 0) {
RouteTypeRule rtr = region.quickGetEncodingRule(vl);
String nonCondTag = rtr.getTag();
int ks;
for (ks = 0; ks < pointTypes[i].length; ks++) {
RouteTypeRule toReplace = region.quickGetEncodingRule(pointTypes[i][j]);
if (toReplace != null && toReplace.getTag().contentEquals(nonCondTag)) {
break;
}
}
if (ks == pTypes.length) {
int[] ntypes = new int[pTypes.length + 1];
System.arraycopy(pTypes, 0, ntypes, 0, pTypes.length);
pTypes = ntypes;
}
pTypes[ks] = vl;
}
}
}
}
pointTypes[i] = pTypes;
}
}
}
}
public float getMaximumSpeed(boolean direction) {