Tracerestrict: Add long reserve (unless stopping) mode

Requires realistic braking
This commit is contained in:
Jonathan G Rennison
2023-10-03 20:59:28 +01:00
parent b299c4dce8
commit 0620026d56
6 changed files with 41 additions and 11 deletions

View File

@@ -687,6 +687,12 @@ void TraceRestrictProgram::Execute(const Train* v, const TraceRestrictProgramInp
out.flags &= ~TRPRF_LONG_RESERVE;
break;
case TRLRVF_LONG_RESERVE_UNLESS_STOPPING:
if (!(input.input_flags & TRPIF_PASSED_STOP)) {
out.flags |= TRPRF_LONG_RESERVE;
}
break;
default:
NOT_REACHED();
break;