@@ -579,13 +579,17 @@ class CASW_Mission_Chooser_VScript
579579
580580 FOR_EACH_VEC ( pMission->Links , j )
581581 {
582- ArrayPush ( linksArray, pMission->Links [j] );
582+ char szKey[ 16 ];
583+ V_snprintf ( szKey, sizeof ( szKey ), " %d" , j );
584+ g_pScriptVM->SetValue ( linksArray, szKey, pMission->Links [ j ] );
583585 }
584586
585587 g_pScriptVM->SetValue ( missionTable, " links" , linksArray );
586588 g_pScriptVM->ReleaseValue ( linksArray );
587589
588- ArrayPush ( missionsArray, missionTable );
590+ char szKey[ 16 ];
591+ V_snprintf ( szKey, sizeof ( szKey ), " %d" , i );
592+ g_pScriptVM->SetValue ( missionsArray, szKey, missionTable );
589593 g_pScriptVM->ReleaseValue ( missionTable );
590594 }
591595
@@ -597,7 +601,9 @@ class CASW_Mission_Chooser_VScript
597601
598602 FOR_EACH_VEC ( pCampaign->Tags , i )
599603 {
600- ArrayPush ( tagsArray, STRING ( pCampaign->Tags [i] ) );
604+ char szKey[ 16 ];
605+ V_snprintf ( szKey, sizeof ( szKey ), " %d" , i );
606+ g_pScriptVM->SetValue ( tagsArray, szKey, STRING ( pCampaign->Tags [ i ] ) );
601607 }
602608
603609 g_pScriptVM->SetValue ( table, " tags" , tagsArray );
@@ -637,7 +643,9 @@ class CASW_Mission_Chooser_VScript
637643 g_pScriptVM->SetValue ( sectionTable, " altitude_min" , pMission->VerticalSections [i].AltitudeMin );
638644 g_pScriptVM->SetValue ( sectionTable, " altitude_max" , pMission->VerticalSections [i].AltitudeMax );
639645
640- ArrayPush ( verticalSectionsArray, sectionTable );
646+ char szKey[ 16 ];
647+ V_snprintf ( szKey, sizeof ( szKey ), " %d" , i );
648+ g_pScriptVM->SetValue ( verticalSectionsArray, szKey, sectionTable );
641649 g_pScriptVM->ReleaseValue ( sectionTable );
642650 }
643651
@@ -659,7 +667,9 @@ class CASW_Mission_Chooser_VScript
659667
660668 FOR_EACH_VEC ( pMission->Tags , i )
661669 {
662- ArrayPush ( tagsArray, STRING ( pMission->Tags [i] ) );
670+ char szKey[ 16 ];
671+ V_snprintf ( szKey, sizeof ( szKey ), " %d" , i );
672+ g_pScriptVM->SetValue ( tagsArray, szKey, STRING ( pMission->Tags [ i ] ) );
663673 }
664674
665675 g_pScriptVM->SetValue ( table, " tags" , tagsArray );
0 commit comments