|
|
|
|
@ -10,7 +10,7 @@ FText UFTDFluxUtils::GetFormatedName(const int& Bib, const int MaxChar, const FS
|
|
|
|
|
const FString OverFlowChar)
|
|
|
|
|
{
|
|
|
|
|
UDTFluxCoreSubsystem* CoreSubsystem = GEngine->GetEngineSubsystem<UDTFluxCoreSubsystem>();
|
|
|
|
|
if (CoreSubsystem == nullptr)
|
|
|
|
|
if (CoreSubsystem != nullptr)
|
|
|
|
|
{
|
|
|
|
|
FDTFluxParticipant OutParticipant;
|
|
|
|
|
CoreSubsystem->GetParticipant(Bib, OutParticipant);
|
|
|
|
|
@ -31,28 +31,27 @@ void UFTDFluxUtils::GetFullName(const int Bib, FText& OutFullName)
|
|
|
|
|
{
|
|
|
|
|
OutFullName = FText();
|
|
|
|
|
UDTFluxCoreSubsystem* CoreSubsystem = GEngine->GetEngineSubsystem<UDTFluxCoreSubsystem>();
|
|
|
|
|
FDTFluxParticipant Participant;
|
|
|
|
|
CoreSubsystem->GetParticipant(Bib, Participant);
|
|
|
|
|
if(CoreSubsystem != nullptr)
|
|
|
|
|
{
|
|
|
|
|
FDTFluxParticipant OutParticipant;
|
|
|
|
|
if(CoreSubsystem->GetParticipant(Bib, OutParticipant))
|
|
|
|
|
{
|
|
|
|
|
FString FormattedName = "";
|
|
|
|
|
if (OutParticipant.IsTeam())
|
|
|
|
|
FDTFluxParticipant Participant;
|
|
|
|
|
if(CoreSubsystem->GetParticipant(Bib, Participant))
|
|
|
|
|
{
|
|
|
|
|
OutFullName = FText::FromString(Participant.Team);
|
|
|
|
|
FString FormattedName = "";
|
|
|
|
|
if (Participant.IsTeam())
|
|
|
|
|
{
|
|
|
|
|
OutFullName = FText::FromString(Participant.Team);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (Participant.GetTeammate().IsEmpty())
|
|
|
|
|
{
|
|
|
|
|
UE_LOG(logDTFluxUtilities, Warning, TEXT("Non teammate found with Bib %i"), Bib)
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
OutFullName = FText::FromString(FString::Printf(TEXT("%s %s"), *Participant.GetTeammate()[0].FirstName,
|
|
|
|
|
*Participant.GetTeammate()[0].LastName));
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (Participant.GetTeammate().IsEmpty())
|
|
|
|
|
{
|
|
|
|
|
UE_LOG(logDTFluxUtilities, Warning, TEXT("Non teammate found with Bib %i"), Bib)
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
OutFullName = FText::FromString(FString::Printf(TEXT("%s %s"), *Participant.GetTeammate()[0].FirstName,
|
|
|
|
|
*Participant.GetTeammate()[0].LastName));
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
UE_LOG(logDTFluxUtilities, Warning, TEXT("Participant not found with Bib %i"), Bib);
|
|
|
|
|
UE_LOG(logDTFluxUtilities, Warning, TEXT("Participant not found with Bib %i"), Bib);
|
|
|
|
|
}
|
|
|
|
|
UE_LOG(logDTFluxUtilities, Error, TEXT("DTFluxCoreSubsystem not available"));
|
|
|
|
|
}
|
|
|
|
|
|