@@ -412,11 +412,10 @@ simulated function StartLadder(int LadderIndex, int DifficultySelection, bool Na
412412 local XComGameStateHistory History ;
413413 local XComGameState_CampaignSettings CurrentCampaign ;
414414 local XComGameState_LadderProgress LadderData ;
415- // Issue #307 Commenting out now unused variables to remove warnings
416- //local int SoldierIndex;
417- //local XComGameState_Unit GameUnit;
418- //local XComGameState_HeadquartersXCom XComHQ;
419- //local StateObjectReference UnitStateRef;
415+ local int SoldierIndex ;
416+ local XComGameState_Unit GameUnit ;
417+ local XComGameState_HeadquartersXCom XComHQ ;
418+ local StateObjectReference UnitStateRef ;
420419
421420 History = class 'XComGameStateHistory' .static .GetGameStateHistory ();
422421
@@ -437,26 +436,29 @@ simulated function StartLadder(int LadderIndex, int DifficultySelection, bool Na
437436 // starting an existing ladder from scratch
438437 //XComCheatManager(GetALocalPlayerController().CheatManager).StartLadder(LadderIndex, DifficultySelection);
439438
440- //XComHQ = XComGameState_HeadquartersXCom(History.GetSingleGameStateObjectForClass(class'XComGameState_HeadquartersXCom'));
441-
442439 LadderData = XComGameState_LadderProgress (History .GetSingleGameStateObjectForClass (class 'XComGameState_LadderProgress' ));
443440 //Mr. Nice #307: As Hacky as this looks, it does the Right Thing. It combines StartLadder() above
444441 // with the commented out code below, plus setting up the squad respecting config settings etc.
445442 LadderData .LadderRung --;
446443 LadderData .ProceedToNextRung ();
447- LadderData = XComGameState_LadderProgress (History .GetSingleGameStateObjectForClass (class 'XComGameState_LadderProgress' ));
448- ConsoleCommand ( LadderData .ProgressCommand );
449- //SoldierIndex = 0;
450- //foreach XComHQ.Squad(UnitStateRef)
451- //{
444+
445+ // Start Issue #1531 - re-add localization
446+ XComHQ = XComGameState_HeadquartersXCom (History .GetSingleGameStateObjectForClass (class 'XComGameState_HeadquartersXCom' ));
447+ SoldierIndex = 0 ;
448+ foreach XComHQ .Squad (UnitStateRef )
449+ {
452450 // pull the unit from the archives, and add it to the start state
453- // GameUnit = XComGameState_Unit(History.GetGameStateForObjectID(UnitStateRef.ObjectID));
451+ GameUnit = XComGameState_Unit (History .GetGameStateForObjectID (UnitStateRef .ObjectID ));
454452
455- // if(LadderIndex <= 4)
456- // class'XComGameState_LadderProgress'.static.LocalizeUnitName(GameUnit, SoldierIndex, LadderIndex);
453+ if (LadderIndex <= 4 )
454+ class 'XComGameState_LadderProgress' .static .LocalizeUnitName (GameUnit , SoldierIndex , LadderIndex );
457455
458- //++SoldierIndex;
459- //}
456+ ++SoldierIndex ;
457+ }
458+ // End Issue #1531
459+
460+ LadderData = XComGameState_LadderProgress (History .GetSingleGameStateObjectForClass (class 'XComGameState_LadderProgress' ));
461+ ConsoleCommand ( LadderData .ProgressCommand );
460462 // End Issue #307
461463
462464 CurrentCampaign = XComGameState_CampaignSettings (History .GetSingleGameStateObjectForClass (class 'XComGameState_CampaignSettings' ));
0 commit comments