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