mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 11:28:03 +02:00
Merge pull request #5001 from howard-stearns/entity-collision-end
get end collision events in entity collision handler
This commit is contained in:
commit
64eba660ad
1 changed files with 11 additions and 10 deletions
|
@ -2489,20 +2489,21 @@ void Application::update(float deltaTime) {
|
||||||
_entitySimulation.unlock();
|
_entitySimulation.unlock();
|
||||||
|
|
||||||
avatarManager->handleOutgoingChanges(_physicsEngine.getOutgoingChanges());
|
avatarManager->handleOutgoingChanges(_physicsEngine.getOutgoingChanges());
|
||||||
avatarManager->handleCollisionEvents(_physicsEngine.getCollisionEvents());
|
auto collisionEvents = _physicsEngine.getCollisionEvents();
|
||||||
|
avatarManager->handleCollisionEvents(collisionEvents);
|
||||||
|
|
||||||
_physicsEngine.dumpStatsIfNecessary();
|
_physicsEngine.dumpStatsIfNecessary();
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!_aboutToQuit) {
|
if (!_aboutToQuit) {
|
||||||
PerformanceTimer perfTimer("entities");
|
PerformanceTimer perfTimer("entities");
|
||||||
// Collision events (and their scripts) must not be handled when we're locked, above. (That would risk deadlock.)
|
// Collision events (and their scripts) must not be handled when we're locked, above. (That would risk deadlock.)
|
||||||
_entitySimulation.handleCollisionEvents(_physicsEngine.getCollisionEvents());
|
_entitySimulation.handleCollisionEvents(collisionEvents);
|
||||||
// NOTE: the _entities.update() call below will wait for lock
|
// NOTE: the _entities.update() call below will wait for lock
|
||||||
// and will simulate entity motion (the EntityTree has been given an EntitySimulation).
|
// and will simulate entity motion (the EntityTree has been given an EntitySimulation).
|
||||||
_entities.update(); // update the models...
|
_entities.update(); // update the models...
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
PerformanceTimer perfTimer("overlays");
|
PerformanceTimer perfTimer("overlays");
|
||||||
|
|
Loading…
Reference in a new issue