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

Method CreateObjectList

engine/Poseidon/UI/Map/UIMapExt.cpp:381–402  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

379}
380
381void CStaticMapArcadeViewer::CreateObjectList()
382{
383 _objects.Clear();
384
385 const VehicleType* type = GWorld->Preloaded(VTypeStatic);
386 int i, n = GWorld->NBuildings();
387 for (i = 0; i < n; i++)
388 {
389 Vehicle* veh = GWorld->GetBuilding(i);
390 VehicleWithAI* vehai = dyn_cast<VehicleWithAI>(veh);
391 if (!vehai)
392 {
393 continue;
394 }
395 if (!vehai->GetType()->IsKindOf(type))
396 {
397 continue;
398 }
399
400 _objects.Add(vehai);
401 }
402}
403
404VehicleWithAI* CStaticMapArcadeViewer::FindObject(int id)
405{

Callers 1

OnChildDestroyedMethod · 0.80

Calls 7

NBuildingsMethod · 0.80
GetBuildingMethod · 0.80
IsKindOfMethod · 0.80
ClearMethod · 0.45
PreloadedMethod · 0.45
GetTypeMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected