Add maximum train speed condition variable.

This commit is contained in:
Jonathan G Rennison
2015-07-22 21:48:12 +01:00
parent 627288277e
commit 0be3b053d5
4 changed files with 82 additions and 17 deletions

View File

@@ -170,6 +170,10 @@ void TraceRestrictProgram::Execute(const Train* v, TraceRestrictProgramResult& o
result = TestCondition(CeilDiv(v->gcache.cached_total_length, TILE_SIZE), condop, condvalue);
break;
case TRIT_COND_MAX_SPEED:
result = TestCondition(v->GetDisplayMaxSpeed(), condop, condvalue);
break;
default:
NOT_REACHED();
}
@@ -260,6 +264,7 @@ void SetTraceRestrictValueDefault(TraceRestrictItem &item, TraceRestrictValueTyp
case TRVT_NONE:
case TRVT_INT:
case TRVT_DENY:
case TRVT_SPEED:
SetTraceRestrictValue(item, 0);
break;