mirror of
https://github.com/lubosz/overte.git
synced 2025-04-08 14:42:19 +02:00
addressing code review requests
This commit is contained in:
parent
e7d3844620
commit
4ab7308669
2 changed files with 4 additions and 2 deletions
|
@ -203,7 +203,7 @@ void EntityTreeRenderer::stopNonLocalEntityScripts() {
|
|||
if (_entitiesScriptEngine) {
|
||||
QList<EntityItemID> entitiesWithEntityScripts = _entitiesScriptEngine->getListOfEntityScriptIDs();
|
||||
|
||||
foreach (EntityItemID entityID, entitiesWithEntityScripts) {
|
||||
foreach (const EntityItemID& entityID, entitiesWithEntityScripts) {
|
||||
EntityItemPointer entityItem = getTree()->findEntityByEntityItemID(entityID);
|
||||
|
||||
if (entityItem) {
|
||||
|
@ -664,7 +664,7 @@ bool EntityTreeRenderer::checkEnterLeaveEntities() {
|
|||
void EntityTreeRenderer::leaveNonLocalEntities() {
|
||||
if (_tree && !_shuttingDown) {
|
||||
QVector<EntityItemID> currentLocalEntitiesInside;
|
||||
foreach (EntityItemID entityID, _currentEntitiesInside) {
|
||||
foreach (const EntityItemID& entityID, _currentEntitiesInside) {
|
||||
EntityItemPointer entityItem = getTree()->findEntityByEntityItemID(entityID);
|
||||
if (!entityItem->isLocalEntity()) {
|
||||
emit leaveEntity(entityID);
|
||||
|
|
|
@ -74,6 +74,8 @@ void EntityTree::eraseNonLocalEntities() {
|
|||
emit clearingEntities();
|
||||
|
||||
if (_simulation) {
|
||||
// This will clear all entities host types including local entities, because local entities
|
||||
// are not in the physics simulation
|
||||
_simulation->clearEntities();
|
||||
}
|
||||
_staleProxies.clear();
|
||||
|
|
Loading…
Reference in a new issue