Added Tracking Mechanism for Participant
This commit is contained in:
@ -17,7 +17,23 @@ void UDTFluxModelAsset::AddContest(const FDTFluxContest& Contest)
|
||||
for (const auto& Stage : Contest.Stages)
|
||||
{
|
||||
FinishedStagesCache.Add(FDTFluxStageKey(Contest.ContestId, Stage.StageId), Stage.IsFinished());
|
||||
for (const auto&Split : Contest.Splits)
|
||||
{
|
||||
// init Cached SplitSensorInfo
|
||||
SplitSensorInfoCache.Add(FDTFluxSplitSensorKey(Contest.ContestId, Stage.StageId, Split.SplitId, -1),
|
||||
FDTFluxSplitSensorInfo(Split.Name));
|
||||
}
|
||||
|
||||
}
|
||||
TArray<FDTFluxSplit> Splits = Contest.Splits;
|
||||
Splits.Sort([](const FDTFluxSplit& A, const FDTFluxSplit& B)
|
||||
{
|
||||
return A.SplitId < B.SplitId;
|
||||
});
|
||||
// last and Penultimate split cache for contest
|
||||
LastSplitIdCache.Add(Contest.ContestId, Splits.Pop().SplitId);
|
||||
PenultimateSplitIdCache.Add(Contest.ContestId, Splits.Pop().SplitId);
|
||||
|
||||
}
|
||||
|
||||
bool UDTFluxModelAsset::GetContestById(const int InContestId, FDTFluxContest& OutContest)
|
||||
@ -151,6 +167,12 @@ bool UDTFluxModelAsset::IsStageFinished(FDTFluxStageKey StageKey)
|
||||
return false;
|
||||
}
|
||||
|
||||
void UDTFluxModelAsset::CacheSplitSensorInfo(const FDTFluxSplitSensorKey SplitSensorKey,
|
||||
const FDTFluxSplitSensorInfo& SplitSensorInfo)
|
||||
{
|
||||
SplitSensorInfoCache.Add(SplitSensorKey, SplitSensorInfo);
|
||||
}
|
||||
|
||||
|
||||
bool UDTFluxModelAsset::CheckStageIsFinished(FDTFluxStageKey StageKey)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user