mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 02:04:26 +02:00
Merge pull request #1434 from birarda/master
notify for node kill on NodeList clear, remove double sound
This commit is contained in:
commit
f5433c8a44
2 changed files with 4 additions and 4 deletions
|
@ -127,12 +127,12 @@ void Hand::simulateToyBall(PalmData& palm, const glm::vec3& fingerTipPosition, f
|
||||||
//printf(">>>>>>> caught... handID:%d particle ID:%d _toyBallInHand[handID] = true\n", handID, closestParticle->getID());
|
//printf(">>>>>>> caught... handID:%d particle ID:%d _toyBallInHand[handID] = true\n", handID, closestParticle->getID());
|
||||||
_ballParticleEditHandles[handID] = caughtParticle;
|
_ballParticleEditHandles[handID] = caughtParticle;
|
||||||
caughtParticle = NULL;
|
caughtParticle = NULL;
|
||||||
// Play a catch sound!
|
|
||||||
|
// set the position of the catch sound to the new position of the ball
|
||||||
_catchInjector.setPosition(targetPosition);
|
_catchInjector.setPosition(targetPosition);
|
||||||
|
|
||||||
// inject the catch sound to the mixer and play it locally
|
// inject the catch sound to the mixer and play it locally
|
||||||
_catchInjector.injectViaThread(app->getAudio());
|
_catchInjector.injectViaThread(app->getAudio());
|
||||||
app->getAudio()->startDrumSound(1.0, 300, 0.75, 0.015);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -294,9 +294,9 @@ void NodeList::clear() {
|
||||||
Node* node = nodeBucket[i % NODES_PER_BUCKET];
|
Node* node = nodeBucket[i % NODES_PER_BUCKET];
|
||||||
|
|
||||||
node->lock();
|
node->lock();
|
||||||
delete node;
|
notifyHooksOfKilledNode(&*node);
|
||||||
|
|
||||||
node = NULL;
|
delete node;
|
||||||
}
|
}
|
||||||
|
|
||||||
_numNodes = 0;
|
_numNodes = 0;
|
||||||
|
|
Loading…
Reference in a new issue