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

Method SerializeVehicles

engine/Poseidon/World/WorldImpl.cpp:1610–1629  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1608 MemoryCleanUp();
1609 LOG_DEBUG(World, "Total allocated after MemoryCleanUp: {} MB", Foundation::MemoryUsed() / (1024 * 1024));
1610 return ret;
1611}
1612
1613LSError World::SerializeVehicles(ParamArchive& ar)
1614{
1615 // Note: PARAM_CHECK(ar.Serialize("Cloudlets", _cloudlets, 1))
1616 PARAM_CHECK(ar.Serialize("FastVehicles", _fastVehicles, 1))
1617 PARAM_CHECK(ar.Serialize("Vehicles", _vehicles, 1))
1618 PARAM_CHECK(ar.Serialize("Animals", _animals, 1))
1619 PARAM_CHECK(ar.Serialize("Buildings", _buildings, 1))
1620 PARAM_CHECK(ar.Serialize("OutVehicles", _outVehicles, 1))
1621 if (ar.IsLoading())
1622 {
1623 for (int i = 0; i < _outVehicles.Size(); i++)
1624 {
1625 Entity* veh = _outVehicles[i];
1626 veh->SetMoveOutFlag();
1627 }
1628 }
1629 PARAM_CHECK(ar.Serialize("NearImportance", _nearImportanceDistributionTime, 1))
1630 PARAM_CHECK(ar.Serialize("FarImportance", _farImportanceDistributionTime, 1))
1631 return LSOK;
1632}

Callers

nothing calls this directly

Calls 4

SetMoveOutFlagMethod · 0.80
SerializeMethod · 0.45
IsLoadingMethod · 0.45
SizeMethod · 0.45

Tested by

no test coverage detected