MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / FillCollideableItemList

Function FillCollideableItemList

TombEngine/Game/camera.cpp:1435–1457  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1433}
1434
1435static std::vector<int> FillCollideableItemList()
1436{
1437 auto itemList = std::vector<int>{};
1438 auto& roomList = g_Level.Rooms[Camera.pos.RoomNumber].NeighborRoomNumbers;
1439
1440 for (short i = 0; i < g_Level.NumItems; i++)
1441 {
1442 const auto& item = g_Level.Items[i];
1443
1444 if (!TEN::Utils::Contains(roomList, (int)item.RoomNumber))
1445 continue;
1446
1447 if (!g_Level.Rooms[item.RoomNumber].Active())
1448 continue;
1449
1450 if (!CheckItemCollideCamera(&g_Level.Items[i]))
1451 continue;
1452
1453 itemList.push_back(i);
1454 }
1455
1456 return itemList;
1457}
1458
1459bool CheckStaticCollideCamera(StaticMesh* mesh)
1460{

Callers 1

ItemsCollideCameraFunction · 0.85

Calls 4

ContainsFunction · 0.85
CheckItemCollideCameraFunction · 0.85
ActiveMethod · 0.80
push_backMethod · 0.45

Tested by

no test coverage detected