mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-23 23:04:05 +02:00
Merge branch 'bispinor' of github.com:AndrewMeadows/hifi into acceleration-and-owner-in-wire-protocol
This commit is contained in:
commit
e5db2380bf
2 changed files with 11 additions and 1 deletions
|
@ -299,7 +299,6 @@ bool RenderableModelEntityItem::isReadyToComputeShape() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// the model is still being downloaded.
|
// the model is still being downloaded.
|
||||||
std::cout << "adebug still being downloaded" << std::endl; // adebug
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -276,6 +276,16 @@ void ModelEntityItem::debugDump() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModelEntityItem::updateShapeType(ShapeType type) {
|
void ModelEntityItem::updateShapeType(ShapeType type) {
|
||||||
|
// BEGIN_TEMPORARY_WORKAROUND
|
||||||
|
// we have allowed inconsistent ShapeType's to be stored in SVO files in the past (this was a bug)
|
||||||
|
// but we are now enforcing the entity properties to be consistent. To make the possible we're
|
||||||
|
// introducing a temporary workaround: we will ignore ShapeType updates that conflict with the
|
||||||
|
// _collisionModelURL.
|
||||||
|
if (hasCollisionModel()) {
|
||||||
|
type = SHAPE_TYPE_COMPOUND;
|
||||||
|
}
|
||||||
|
// END_TEMPORARY_WORKAROUND
|
||||||
|
|
||||||
if (type != _shapeType) {
|
if (type != _shapeType) {
|
||||||
_shapeType = type;
|
_shapeType = type;
|
||||||
_dirtyFlags |= EntityItem::DIRTY_SHAPE | EntityItem::DIRTY_MASS;
|
_dirtyFlags |= EntityItem::DIRTY_SHAPE | EntityItem::DIRTY_MASS;
|
||||||
|
@ -296,6 +306,7 @@ void ModelEntityItem::setCollisionModelURL(const QString& url) {
|
||||||
if (_collisionModelURL != url) {
|
if (_collisionModelURL != url) {
|
||||||
_collisionModelURL = url;
|
_collisionModelURL = url;
|
||||||
_dirtyFlags |= EntityItem::DIRTY_SHAPE | EntityItem::DIRTY_MASS;
|
_dirtyFlags |= EntityItem::DIRTY_SHAPE | EntityItem::DIRTY_MASS;
|
||||||
|
_shapeType = _collisionModelURL.isEmpty() ? SHAPE_TYPE_NONE : SHAPE_TYPE_COMPOUND;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue