| 321 | } |
| 322 | |
| 323 | bool EntityStorageData::MarkComponentAsChanged(EntityHandle entity, ComponentTypeIndex component) |
| 324 | { |
| 325 | auto componentSlot = ComponentTypeToIndex.try_get(component); |
| 326 | if (componentSlot) { |
| 327 | auto storageIndex = InstanceToPageMap.try_get(entity); |
| 328 | if (storageIndex) { |
| 329 | auto& page = Components[storageIndex->PageIndex]->Components[*componentSlot]; |
| 330 | uint64_t entryMask = 1ull << (storageIndex->EntryIndex & 0x3f); |
| 331 | if (!(page.ModifiedEntities & entryMask)) { |
| 332 | page.ModifiedEntities |= entryMask; |
| 333 | |
| 334 | if (!ModifiedComponents[*componentSlot]) { |
| 335 | ModifiedComponents.AtomicSet(*componentSlot); |
| 336 | } |
| 337 | } |
| 338 | return true; |
| 339 | } |
| 340 | } |
| 341 | |
| 342 | return false; |
| 343 | } |
| 344 | |
| 345 | bool EntityStorageData::WasComponentChanged(EntityHandle entity, ComponentTypeIndex component) |
| 346 | { |
nothing calls this directly
no test coverage detected