Skip to content
Snippets Groups Projects
Commit 94c57942 authored by Jonathan Ehret's avatar Jonathan Ehret
Browse files

fix too much trial data being stored if an unfinished condition is continued

closes #90
parent 6e6cec42
No related branches found
No related tags found
No related merge requests found
...@@ -314,6 +314,16 @@ void USFGameInstance::PrepareWithStudySetup(ASFStudySetup* Setup) ...@@ -314,6 +314,16 @@ void USFGameInstance::PrepareWithStudySetup(ASFStudySetup* Setup)
if (bRecoverParticipantData) if (bRecoverParticipantData)
{ {
Participant->RecoverStudyResultsOfFinishedConditions(); Participant->RecoverStudyResultsOfFinishedConditions();
//also delete any data of the condition that is now restarted (StartCondition)
Participant->DeleteStoredDataForConditionFromLongTable(StartCondition);
for (USFDependentVariable* DV : StartCondition->DependentVariables)
{
if (USFMultipleTrialDependentVariable* MTDV = Cast<USFMultipleTrialDependentVariable>(DV))
{
Participant->DeleteStoredTrialDataForCondition(StartCondition, MTDV);
}
}
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment