Small fix to elapse time function.
This commit is contained in:
parent
780f0fe460
commit
5ccaa39d60
|
@ -35,9 +35,12 @@ void ATrafficLightGroup::ResetGroup()
|
||||||
Controller->ResetState();
|
Controller->ResetState();
|
||||||
}
|
}
|
||||||
CurrentController = 0;
|
CurrentController = 0;
|
||||||
if(Controllers.Num() > 0) {
|
if(Controllers.Num() > 0)
|
||||||
|
{
|
||||||
Timer = Controllers[CurrentController]->NextState();
|
Timer = Controllers[CurrentController]->NextState();
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
Timer = 0.0f;
|
Timer = 0.0f;
|
||||||
}
|
}
|
||||||
CurrentStateTimer = Timer;
|
CurrentStateTimer = Timer;
|
||||||
|
@ -94,6 +97,7 @@ void ATrafficLightGroup::NextCycleStep()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Timer = controller->NextState();
|
Timer = controller->NextState();
|
||||||
|
CurrentStateTimer = Timer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue