mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 19:03:07 +02:00
Merge remote-tracking branch 'highfidelity/master' into 20901
This commit is contained in:
commit
e2f5d22c98
5 changed files with 55 additions and 5 deletions
|
@ -1376,6 +1376,10 @@ bool EntityTree::sendEntitiesOperation(OctreeElementPointer element, void* extra
|
||||||
item->globalizeProperties(properties, "Cannot find %3 parent of %2 %1", args->root);
|
item->globalizeProperties(properties, "Cannot find %3 parent of %2 %1", args->root);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// set creation time to "now" for imported entities
|
||||||
|
properties.setCreated(usecTimestampNow());
|
||||||
|
|
||||||
properties.markAllChanged(); // so the entire property set is considered new, since we're making a new entity
|
properties.markAllChanged(); // so the entire property set is considered new, since we're making a new entity
|
||||||
|
|
||||||
// queue the packet to send to the server
|
// queue the packet to send to the server
|
||||||
|
|
|
@ -256,7 +256,7 @@ QVariantList ScriptEngines::getRunning() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static const QString SETTINGS_KEY = "Settings";
|
static const QString SETTINGS_KEY = "RunningScripts";
|
||||||
|
|
||||||
void ScriptEngines::loadDefaultScripts() {
|
void ScriptEngines::loadDefaultScripts() {
|
||||||
QUrl defaultScriptsLoc = defaultScriptsLocation();
|
QUrl defaultScriptsLoc = defaultScriptsLocation();
|
||||||
|
@ -281,6 +281,43 @@ void ScriptEngines::loadScripts() {
|
||||||
|
|
||||||
// loads all saved scripts
|
// loads all saved scripts
|
||||||
Settings settings;
|
Settings settings;
|
||||||
|
|
||||||
|
|
||||||
|
// START of backward compatibility code
|
||||||
|
// This following if statement is only meant to update the settings file still using the old setting key.
|
||||||
|
// If you read that comment and it has been more than a couple months since it was merged,
|
||||||
|
// then by all means, feel free to remove it.
|
||||||
|
if (!settings.childGroups().contains(SETTINGS_KEY)) {
|
||||||
|
qWarning() << "Detected old script settings config, loading from previous location";
|
||||||
|
const QString oldKey = "Settings";
|
||||||
|
|
||||||
|
// Load old scripts array from settings
|
||||||
|
int size = settings.beginReadArray(oldKey);
|
||||||
|
for (int i = 0; i < size; ++i) {
|
||||||
|
settings.setArrayIndex(i);
|
||||||
|
QString string = settings.value("script").toString();
|
||||||
|
if (!string.isEmpty()) {
|
||||||
|
loadScript(string);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
settings.endArray();
|
||||||
|
|
||||||
|
// Cleanup old scripts array from settings
|
||||||
|
settings.beginWriteArray(oldKey);
|
||||||
|
for (int i = 0; i < size; ++i) {
|
||||||
|
settings.setArrayIndex(i);
|
||||||
|
settings.remove("");
|
||||||
|
}
|
||||||
|
settings.endArray();
|
||||||
|
settings.beginGroup(oldKey);
|
||||||
|
settings.remove("size");
|
||||||
|
settings.endGroup();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// END of backward compatibility code
|
||||||
|
|
||||||
|
|
||||||
int size = settings.beginReadArray(SETTINGS_KEY);
|
int size = settings.beginReadArray(SETTINGS_KEY);
|
||||||
for (int i = 0; i < size; ++i) {
|
for (int i = 0; i < size; ++i) {
|
||||||
settings.setArrayIndex(i);
|
settings.setArrayIndex(i);
|
||||||
|
|
|
@ -97,7 +97,7 @@ namespace Setting {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Interface::deinit() {
|
void Interface::deinit() {
|
||||||
if (privateInstance) {
|
if (_isInitialized && privateInstance) {
|
||||||
// Save value to disk
|
// Save value to disk
|
||||||
save();
|
save();
|
||||||
|
|
||||||
|
|
|
@ -316,7 +316,12 @@ Grabber.prototype.pressEvent = function(event) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.isLeftButton!==true ||event.isRightButton===true || event.isMiddleButton===true) {
|
if (event.isLeftButton !== true || event.isRightButton === true || event.isMiddleButton === true) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Overlays.getOverlayAtPoint(Reticle.position) > 0) {
|
||||||
|
// the mouse is pointing at an overlay; don't look for entities underneath the overlay.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -186,7 +186,9 @@ function updateSeeking() {
|
||||||
averageMouseVelocity = lastIntegration = 0;
|
averageMouseVelocity = lastIntegration = 0;
|
||||||
var lookAt2D = HMD.getHUDLookAtPosition2D();
|
var lookAt2D = HMD.getHUDLookAtPosition2D();
|
||||||
if (!lookAt2D) {
|
if (!lookAt2D) {
|
||||||
print('Cannot seek without lookAt position');
|
// FIXME - determine if this message is useful but make it so it doesn't spam the
|
||||||
|
// log in the case that it is happening
|
||||||
|
//print('Cannot seek without lookAt position');
|
||||||
return;
|
return;
|
||||||
} // E.g., if parallel to location in HUD
|
} // E.g., if parallel to location in HUD
|
||||||
var copy = Reticle.position;
|
var copy = Reticle.position;
|
||||||
|
@ -420,7 +422,9 @@ function update() {
|
||||||
|
|
||||||
var hudPoint3d = calculateRayUICollisionPoint(controllerPosition, controllerDirection);
|
var hudPoint3d = calculateRayUICollisionPoint(controllerPosition, controllerDirection);
|
||||||
if (!hudPoint3d) {
|
if (!hudPoint3d) {
|
||||||
print('Controller is parallel to HUD');
|
// FIXME - determine if this message is useful but make it so it doesn't spam the
|
||||||
|
// log in the case that it is happening
|
||||||
|
//print('Controller is parallel to HUD');
|
||||||
return turnOffVisualization();
|
return turnOffVisualization();
|
||||||
}
|
}
|
||||||
var hudPoint2d = overlayFromWorldPoint(hudPoint3d);
|
var hudPoint2d = overlayFromWorldPoint(hudPoint3d);
|
||||||
|
|
Loading…
Reference in a new issue