mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 02:16:51 +02:00
add comments
This commit is contained in:
parent
de44cdaf25
commit
28f51f6204
2 changed files with 4 additions and 0 deletions
|
@ -43,6 +43,7 @@ void EntitySimulation::updateEntities() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntitySimulation::removeEntityFromInternalLists(EntityItemPointer entity) {
|
void EntitySimulation::removeEntityFromInternalLists(EntityItemPointer entity) {
|
||||||
|
// protected: _mutex lock is guaranteed
|
||||||
// remove from all internal lists except _deadEntitiesToRemoveFromTree
|
// remove from all internal lists except _deadEntitiesToRemoveFromTree
|
||||||
_entitiesToSort.remove(entity);
|
_entitiesToSort.remove(entity);
|
||||||
_simpleKinematicEntities.remove(entity);
|
_simpleKinematicEntities.remove(entity);
|
||||||
|
@ -144,6 +145,7 @@ void EntitySimulation::sortEntitiesThatMoved() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntitySimulation::addEntityToInternalLists(EntityItemPointer entity) {
|
void EntitySimulation::addEntityToInternalLists(EntityItemPointer entity) {
|
||||||
|
// protected: _mutex lock is guaranteed
|
||||||
if (entity->isMortal()) {
|
if (entity->isMortal()) {
|
||||||
_mortalEntities.insert(entity);
|
_mortalEntities.insert(entity);
|
||||||
uint64_t expiry = entity->getExpiry();
|
uint64_t expiry = entity->getExpiry();
|
||||||
|
|
|
@ -171,6 +171,8 @@ void PhysicalEntitySimulation::processChangedEntity(const EntityItemPointer& ent
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhysicalEntitySimulation::processDeadEntities() {
|
void PhysicalEntitySimulation::processDeadEntities() {
|
||||||
|
// Note: this override is a complete rewite of the base class's method because we cannot assume all entities
|
||||||
|
// are domain entities, and the consequence of trying to delete a domain-entity in this case is very different.
|
||||||
if (_deadEntitiesToRemoveFromTree.empty()) {
|
if (_deadEntitiesToRemoveFromTree.empty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue