From 41882442f807aaa181730a5c35edf67fab83f1b5 Mon Sep 17 00:00:00 2001
From: jehret <ehret@vr.rwth-aachen.de>
Date: Wed, 17 Jan 2024 11:10:37 +0100
Subject: [PATCH] minor bugfix for starting unrelated maps

---
 Source/StudyFrameworkPlugin/Private/SFGameInstance.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Source/StudyFrameworkPlugin/Private/SFGameInstance.cpp b/Source/StudyFrameworkPlugin/Private/SFGameInstance.cpp
index 6110a10..cd15145 100644
--- a/Source/StudyFrameworkPlugin/Private/SFGameInstance.cpp
+++ b/Source/StudyFrameworkPlugin/Private/SFGameInstance.cpp
@@ -783,13 +783,14 @@ void USFGameInstance::OnLevelLoaded()
 
 void USFGameInstance::OnFadedIn()
 {
-	FString NumberStr = FString::FromInt(GetCurrentConditionsSequenceNumber()) + "/" + FString::FromInt(Participant->GetAllConditions().Num());
+
 	if (Participant && Participant->GetCurrentCondition())
 	{
 		//this should be logged first
 		if (bInDebugMode) {
 			USFLoggingBPLibrary::LogComment("Running in DEBUG MODE");
 		}
+		FString NumberStr = FString::FromInt(GetCurrentConditionsSequenceNumber()) + "/" + FString::FromInt(Participant->GetAllConditions().Num());
 		USFLoggingBPLibrary::LogComment("Start Condition " + NumberStr + ": " + Participant->GetCurrentCondition()->GetPrettyName());
 	}
 
@@ -802,7 +803,7 @@ void USFGameInstance::OnFadedIn()
 
 	Participant->GetCurrentCondition()->Begin();
 
-	UpdateHUD("Condition " + NumberStr);
+	UpdateHUD("Condition " + FString::FromInt(GetCurrentConditionsSequenceNumber()) + "/" + FString::FromInt(Participant->GetAllConditions().Num()));
 }
 
 USFParticipant* USFGameInstance::GetParticipant() const
-- 
GitLab