mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 17:00:36 +02:00
saving changes
This commit is contained in:
parent
54236e5c59
commit
535fdf32cf
3 changed files with 36 additions and 12 deletions
|
@ -66,20 +66,24 @@ void SafeLanding::addTrackedEntity(const EntityItemID& entityID) {
|
|||
EntityItemPointer entity = _entityTree->findEntityByID(entityID);
|
||||
|
||||
if (entity && !entity->getCollisionless()) {
|
||||
static const std::set<ShapeType> downloadedCollisionTypes
|
||||
{ SHAPE_TYPE_COMPOUND, SHAPE_TYPE_SIMPLE_COMPOUND, SHAPE_TYPE_STATIC_MESH, SHAPE_TYPE_SIMPLE_HULL };
|
||||
bool hasAABox;
|
||||
entity->getAABox(hasAABox);
|
||||
if (hasAABox && downloadedCollisionTypes.count(entity->getShapeType()) != 0) {
|
||||
// Only track entities with downloaded collision bodies.
|
||||
_trackedEntities.emplace(entityID, entity);
|
||||
const auto& entityType = entity->getType();
|
||||
if (entityType == EntityTypes::Model) {
|
||||
ModelEntityItem * modelEntity = std::dynamic_pointer_cast<ModelEntityItem>(entity).get();
|
||||
static const std::set<ShapeType> downloadedCollisionTypes
|
||||
{ SHAPE_TYPE_COMPOUND, SHAPE_TYPE_SIMPLE_COMPOUND, SHAPE_TYPE_STATIC_MESH, SHAPE_TYPE_SIMPLE_HULL };
|
||||
bool hasAABox;
|
||||
entity->getAABox(hasAABox);
|
||||
if (hasAABox && downloadedCollisionTypes.count(modelEntity->getShapeType()) != 0) {
|
||||
// Only track entities with downloaded collision bodies.
|
||||
_trackedEntities.emplace(entityID, entity);
|
||||
|
||||
float trackedEntityCount = (float)_trackedEntities.size();
|
||||
float trackedEntityCount = (float)_trackedEntities.size();
|
||||
|
||||
if (trackedEntityCount > _maxTrackedEntityCount) {
|
||||
_maxTrackedEntityCount = trackedEntityCount;
|
||||
if (trackedEntityCount > _maxTrackedEntityCount) {
|
||||
_maxTrackedEntityCount = trackedEntityCount;
|
||||
}
|
||||
qCDebug(interfaceapp) << "Safe Landing: Tracking entity " << entity->getItemName();
|
||||
}
|
||||
qCDebug(interfaceapp) << "Safe Landing: Tracking entity " << entity->getItemName();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -155,7 +159,6 @@ bool SafeLanding::isEntityPhysicsComplete() {
|
|||
auto entity = entityMapIter->second;
|
||||
if (!entity->shouldBePhysical() || entity->isReadyToComputeShape()) {
|
||||
entityMapIter = _trackedEntities.erase(entityMapIter);
|
||||
qDebug() << "--> removing entity <--";
|
||||
if (entityMapIter == _trackedEntities.end()) {
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -103,6 +103,7 @@ void OverlayConductor::update(float dt) {
|
|||
|
||||
bool targetVisible = Menu::getInstance()->isOptionChecked(MenuOption::Overlays) && !_suppressedByHead;
|
||||
if (targetVisible != currentVisible) {
|
||||
qDebug() << "setting pinned: " << !targetVisible;
|
||||
offscreenUi->setPinned(!targetVisible);
|
||||
}
|
||||
if (shouldRecenter && !_suppressedByHead) {
|
||||
|
|
|
@ -207,6 +207,18 @@
|
|||
return ((1 - t) * a + t * b);
|
||||
}
|
||||
|
||||
function resetValues() {
|
||||
var properties = {
|
||||
localPosition: { x: 1.85, y: -0.935, z: 0.0 },
|
||||
dimensions: {
|
||||
x: 0.1,
|
||||
y: 2.8
|
||||
}
|
||||
};
|
||||
|
||||
Overlays.editOverlay(loadingBarProgress, properties);
|
||||
}
|
||||
|
||||
function startInterstitialPage() {
|
||||
if (timer === null) {
|
||||
updateOverlays(Window.isPhysicsEnabled());
|
||||
|
@ -323,6 +335,10 @@
|
|||
Overlays.editOverlay(loadingBarPlacard, properties);
|
||||
Overlays.editOverlay(loadingBarProgress, loadingBarProperties);
|
||||
|
||||
if (physicsEnabled) {
|
||||
resetValues();
|
||||
}
|
||||
|
||||
Camera.mode = "first person";
|
||||
}
|
||||
|
||||
|
@ -409,6 +425,10 @@
|
|||
if (DEBUG) {
|
||||
tablet.removeButton(button);
|
||||
}
|
||||
|
||||
renderViewTask.getConfig("LightingModel")["enableAmbientLight"] = true;
|
||||
renderViewTask.getConfig("LightingModel")["enableDirectionalLight"] = true;
|
||||
renderViewTask.getConfig("LightingModel")["enablePointLight"] = true;
|
||||
}
|
||||
|
||||
Script.scriptEnding.connect(cleanup);
|
||||
|
|
Loading…
Reference in a new issue