| 677 | } |
| 678 | |
| 679 | EntityStorageData* EntityStorageContainer::GetEntityStorage(EntityHandle entityHandle) const |
| 680 | { |
| 681 | if (entityHandle.GetThreadIndex() >= Salts.Buckets.size()) { |
| 682 | return nullptr; |
| 683 | } |
| 684 | |
| 685 | auto& componentSalts = Salts.Buckets[entityHandle.GetThreadIndex()]; |
| 686 | if (entityHandle.GetIndex() < componentSalts.size()) { |
| 687 | auto const& salt = componentSalts[entityHandle.GetIndex()]; |
| 688 | if (salt.Salt == entityHandle.GetSalt()) { |
| 689 | return Entities[salt.EntityClassIndex]; |
| 690 | } |
| 691 | } |
| 692 | |
| 693 | return nullptr; |
| 694 | } |
| 695 | |
| 696 | EntityStorageData* EntityWorld::GetEntityStorage(EntityHandle entityHandle) const |
| 697 | { |
nothing calls this directly
no test coverage detected