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

Method CreateObject

engine/Poseidon/World/Simulation/Simul.cpp:1474–1491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1472}
1473
1474Entity* Entity::CreateObject(ParamArchive& ar)
1475{
1476 RString type, shape;
1477 if (ar.Serialize("type", type, 1) != LSOK)
1478 {
1479 return nullptr;
1480 }
1481 if (ar.Serialize("shape", shape, 1) != LSOK)
1482 {
1483 return nullptr;
1484 }
1485 Entity* veh = NewNonAIVehicle(type, shape, false);
1486 if (veh && veh->Object::GetType() == Primary)
1487 {
1488 veh->SetType(TypeVehicle);
1489 }
1490 return veh;
1491}
1492
1493NetworkId Entity::GetNetworkId() const
1494{

Callers

nothing calls this directly

Calls 15

NewNonAIVehicleFunction · 0.85
GameValueExtClass · 0.85
IsUpdateTransportFunction · 0.85
SetTypeMethod · 0.80
AddAnimalMethod · 0.80
AddBuildingMethod · 0.80
AddCloudletMethod · 0.80
AddFastVehicleMethod · 0.80
AddOutVehicleMethod · 0.80
SetMoveOutFlagMethod · 0.80
SerializeMethod · 0.45
GetIndicesMethod · 0.45

Tested by

no test coverage detected