Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions TLM/TLM/TrafficLight/Impl/TimedTrafficLightsStep.cs
Original file line number Diff line number Diff line change
Expand Up @@ -677,10 +677,6 @@ public bool StepDone(bool updateValues) {
float newFlow = CurrentFlow;
float newWait = CurrentWait;

#if DEBUG
newFlow = flow;
newWait = wait;
#else
if (ChangeMetric != StepChangeMetric.Default || Single.IsNaN(newFlow)) {
newFlow = flow;
} else {
Expand All @@ -689,7 +685,7 @@ public bool StepDone(bool updateValues) {
flow; // some smoothing
}

if (Single.IsNaN(newWait)) {
if (Single.IsNaN(newWait) && ChangeMetric != StepChangeMetric.NoWait) {
newWait = 0;
} else if (ChangeMetric != StepChangeMetric.Default) {
newWait = wait;
Expand All @@ -698,7 +694,6 @@ public bool StepDone(bool updateValues) {
(1f - GlobalConfig.Instance.TimedTrafficLights.SmoothingFactor) *
wait; // some smoothing
}
#endif

// if more cars are waiting than flowing, we change the step
bool done = ShouldGoToNextStep(newFlow, newWait, out float _);
Expand Down