MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / SaveMission

Function SaveMission

engine/Poseidon/UI/OptionsUI.cpp:1528–1543  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1526
1527 int i = GetGCampaignHistory().battles.Size() - 1;
1528 if (i < 0)
1529 {
1530 return 0.0f;
1531 }
1532 BattleHistory& bh = GetGCampaignHistory().battles[i];
1533 i = bh.missions.Size() - 1;
1534 if (i < 0)
1535 {
1536 return 0.0f;
1537 }
1538 MissionHistory& mh = bh.missions[i];
1539
1540 for (int j = 0; j < mh.magazines.Size(); j++)
1541 {
1542 if (stricmp(mh.magazines[j].name, name) == 0)
1543 {
1544 return (float)mh.magazines[j].count;
1545 }
1546 }

Callers 5

StartCampaignFunction · 0.70
OnChildDestroyedMethod · 0.70
AddMissionFunction · 0.70
PlayAwardFunction · 0.70
NextMissionFunction · 0.70

Calls 3

SerializeMethod · 0.45
SaveMethod · 0.45
SaveBinMethod · 0.45

Tested by

no test coverage detected