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

Function StartRandomCutscene

engine/Poseidon/UI/OptionsUI.cpp:2105–2132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2103 snprintf(buffer, sizeof(buffer), "%scontinue.sqh", (const char *)GetSaveDirectory());
2104
2105 ContinueInfo header;
2106 Person *veh = GWorld->GetRealPlayer();
2107 AIUnit *unit = veh ? veh->Brain() : nullptr;
2108 if (unit)
2109 header.rank = unit->GetPerson()->GetRank();
2110 else
2111 header.rank = GStats._campaign._playerInfo.rank;
2112 header.time = Glob.clock.GetTimeInYear();
2113 header.island = Glob.header.worldname;
2114 if (CurrentTemplate.intel.briefingName.GetLength() > 0)
2115 header.mission = CurrentTemplate.intel.briefingName;
2116 else
2117 header.mission = Glob.header.filename;
2118
2119 ParamArchiveSave ar(1);
2120 header.Serialize(ar);
2121 ar.Save(buffer);
2122}
2123*/
2124
2125bool ContinueSaved = true;
2126
2127void StartRandomCutscene(RString world)
2128{
2129 if (world.GetLength() == 0)
2130 {
2131 world = GetMenuInitWorld();
2132 }
2133
2134 const ParamEntry& cls = Pars >> "CfgWorlds" >> world >> "cutscenes";
2135 int n = cls.GetSize();

Callers 6

StartIntroMethod · 0.85
OnChildDestroyedMethod · 0.85
OnChildDestroyedMethod · 0.85
OnChildDestroyedMethod · 0.85
OnChildDestroyedMethod · 0.85
TriStartRandomCutsceneFunction · 0.85

Calls 13

GetMenuInitWorldFunction · 0.85
SetMissionFunction · 0.85
SetBaseDirectoryFunction · 0.85
ParseIntroFunction · 0.85
GetWorldNameFunction · 0.85
SwitchLandscapeMethod · 0.80
ActivateAddonsMethod · 0.80
InitGeneralMethod · 0.80
InitVehiclesMethod · 0.80
GetLengthMethod · 0.45
GetSizeMethod · 0.45
RandomValueMethod · 0.45

Tested by 1

TriStartRandomCutsceneFunction · 0.68