mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 02:03:11 +02:00
Merge pull request #15560 from roxanneskelly/bugz87
BUGZ-87 - loading/physics stuck when entering domain
This commit is contained in:
commit
112b92d905
1 changed files with 5 additions and 1 deletions
|
@ -49,11 +49,15 @@ const btCollisionShape* ShapeManager::getShape(const ShapeInfo& info) {
|
||||||
const btCollisionShape* shape = nullptr;
|
const btCollisionShape* shape = nullptr;
|
||||||
if (info.getType() == SHAPE_TYPE_STATIC_MESH) {
|
if (info.getType() == SHAPE_TYPE_STATIC_MESH) {
|
||||||
uint64_t hash = info.getHash();
|
uint64_t hash = info.getHash();
|
||||||
|
|
||||||
|
// bump the request count to the caller knows we're
|
||||||
|
// starting or waiting on a thread.
|
||||||
|
++_workRequestCount;
|
||||||
|
|
||||||
const auto itr = std::find(_pendingMeshShapes.begin(), _pendingMeshShapes.end(), hash);
|
const auto itr = std::find(_pendingMeshShapes.begin(), _pendingMeshShapes.end(), hash);
|
||||||
if (itr == _pendingMeshShapes.end()) {
|
if (itr == _pendingMeshShapes.end()) {
|
||||||
// start a worker
|
// start a worker
|
||||||
_pendingMeshShapes.push_back(hash);
|
_pendingMeshShapes.push_back(hash);
|
||||||
++_workRequestCount;
|
|
||||||
// try to recycle old deadWorker
|
// try to recycle old deadWorker
|
||||||
ShapeFactory::Worker* worker = _deadWorker;
|
ShapeFactory::Worker* worker = _deadWorker;
|
||||||
if (!worker) {
|
if (!worker) {
|
||||||
|
|
Loading…
Reference in a new issue