| 1473 | } |
| 1474 | |
| 1475 | void cFodder::Mission_Troop_Prepare_Next_Recruits() { |
| 1476 | |
| 1477 | // Loop each troop |
| 1478 | for (auto& Troop : mGame_Data.mSoldiers_Allocated) { |
| 1479 | |
| 1480 | // Does troop member have a recruit id? |
| 1481 | if (Troop.mRecruitID == -1) { |
| 1482 | |
| 1483 | if (mGame_Data.mRecruit_NextID >= 360) |
| 1484 | return; |
| 1485 | |
| 1486 | Troop.mRecruitID = mGame_Data.mRecruit_NextID; |
| 1487 | |
| 1488 | // All troops are equal during unit testing |
| 1489 | if (mParams->mUnitTesting) { |
| 1490 | Troop.mRank = 0; |
| 1491 | } else { |
| 1492 | // Demo sets static ranks |
| 1493 | if (mVersionCurrent->isDemo() && mCustom_Mode != eCustomMode_Set) { |
| 1494 | |
| 1495 | Troop.mRank = (mGame_Data.mMission_Number - 1) >> 1; |
| 1496 | |
| 1497 | // Jops |
| 1498 | if (Troop.mRecruitID == 1) |
| 1499 | Troop.mRank = 2; |
| 1500 | |
| 1501 | // Jools |
| 1502 | if (Troop.mRecruitID == 0) |
| 1503 | Troop.mRank = 4; |
| 1504 | |
| 1505 | } |
| 1506 | else { |
| 1507 | Troop.mRank = (mGame_Data.mMission_Number - 1) / 3; |
| 1508 | } |
| 1509 | } |
| 1510 | |
| 1511 | Troop.field_6 = 3; |
| 1512 | ++mGame_Data.mRecruit_NextID; |
| 1513 | |
| 1514 | return; |
| 1515 | } |
| 1516 | } |
| 1517 | } |
| 1518 | |
| 1519 | void cFodder::Phase_Soldiers_AttachToSprites() { |
| 1520 | |