mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 13:09:52 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi into loginInitiative2
This commit is contained in:
commit
1375e85f2c
10 changed files with 55 additions and 25 deletions
|
@ -656,6 +656,8 @@ void Agent::queryAvatars() {
|
||||||
ViewFrustum view;
|
ViewFrustum view;
|
||||||
view.setPosition(scriptedAvatar->getWorldPosition());
|
view.setPosition(scriptedAvatar->getWorldPosition());
|
||||||
view.setOrientation(scriptedAvatar->getHeadOrientation());
|
view.setOrientation(scriptedAvatar->getHeadOrientation());
|
||||||
|
view.setProjection(DEFAULT_FIELD_OF_VIEW_DEGREES, DEFAULT_ASPECT_RATIO,
|
||||||
|
DEFAULT_NEAR_CLIP, DEFAULT_FAR_CLIP);
|
||||||
view.calculate();
|
view.calculate();
|
||||||
ConicalViewFrustum conicalView { view };
|
ConicalViewFrustum conicalView { view };
|
||||||
|
|
||||||
|
@ -876,18 +878,30 @@ void Agent::aboutToFinish() {
|
||||||
DependencyManager::destroy<AudioInjectorManager>();
|
DependencyManager::destroy<AudioInjectorManager>();
|
||||||
|
|
||||||
// destroy all other created dependencies
|
// destroy all other created dependencies
|
||||||
DependencyManager::destroy<ScriptCache>();
|
|
||||||
|
|
||||||
DependencyManager::destroy<ResourceCacheSharedItems>();
|
|
||||||
DependencyManager::destroy<SoundCacheScriptingInterface>();
|
DependencyManager::destroy<SoundCacheScriptingInterface>();
|
||||||
DependencyManager::destroy<SoundCache>();
|
|
||||||
DependencyManager::destroy<AudioScriptingInterface>();
|
DependencyManager::destroy<AudioScriptingInterface>();
|
||||||
|
|
||||||
DependencyManager::destroy<RecordingScriptingInterface>();
|
DependencyManager::destroy<RecordingScriptingInterface>();
|
||||||
|
DependencyManager::destroy<AnimationCacheScriptingInterface>();
|
||||||
|
DependencyManager::destroy<EntityScriptingInterface>();
|
||||||
|
DependencyManager::destroy<ResourceScriptingInterface>();
|
||||||
|
DependencyManager::destroy<UserActivityLoggerScriptingInterface>();
|
||||||
|
|
||||||
|
DependencyManager::destroy<ScriptCache>();
|
||||||
|
DependencyManager::destroy<SoundCache>();
|
||||||
|
DependencyManager::destroy<AnimationCache>();
|
||||||
|
|
||||||
DependencyManager::destroy<recording::Deck>();
|
DependencyManager::destroy<recording::Deck>();
|
||||||
DependencyManager::destroy<recording::Recorder>();
|
DependencyManager::destroy<recording::Recorder>();
|
||||||
DependencyManager::destroy<recording::ClipCache>();
|
DependencyManager::destroy<recording::ClipCache>();
|
||||||
|
|
||||||
|
DependencyManager::destroy<AvatarHashMap>();
|
||||||
|
DependencyManager::destroy<AssignmentParentFinder>();
|
||||||
|
DependencyManager::destroy<MessagesClient>();
|
||||||
|
DependencyManager::destroy<ResourceManager>();
|
||||||
|
|
||||||
|
DependencyManager::destroy<ResourceCacheSharedItems>();
|
||||||
|
|
||||||
// drop our shared pointer to the script engine, then ask ScriptEngines to shutdown scripting
|
// drop our shared pointer to the script engine, then ask ScriptEngines to shutdown scripting
|
||||||
// this ensures that the ScriptEngine goes down before ScriptEngines
|
// this ensures that the ScriptEngine goes down before ScriptEngines
|
||||||
_scriptEngine.clear();
|
_scriptEngine.clear();
|
||||||
|
|
|
@ -129,17 +129,12 @@ void AssignmentClient::stopAssignmentClient() {
|
||||||
QThread* currentAssignmentThread = _currentAssignment->thread();
|
QThread* currentAssignmentThread = _currentAssignment->thread();
|
||||||
|
|
||||||
// ask the current assignment to stop
|
// ask the current assignment to stop
|
||||||
BLOCKING_INVOKE_METHOD(_currentAssignment, "stop");
|
QMetaObject::invokeMethod(_currentAssignment, "stop");
|
||||||
|
|
||||||
// ask the current assignment to delete itself on its thread
|
auto PROCESS_EVENTS_INTERVAL_MS = 100;
|
||||||
_currentAssignment->deleteLater();
|
while (!currentAssignmentThread->wait(PROCESS_EVENTS_INTERVAL_MS)) {
|
||||||
|
QCoreApplication::processEvents();
|
||||||
// when this thread is destroyed we don't need to run our assignment complete method
|
}
|
||||||
disconnect(currentAssignmentThread, &QThread::destroyed, this, &AssignmentClient::assignmentCompleted);
|
|
||||||
|
|
||||||
// wait on the thread from that assignment - it will be gone once the current assignment deletes
|
|
||||||
currentAssignmentThread->quit();
|
|
||||||
currentAssignmentThread->wait();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#include <GLMHelpers.h>
|
#include <GLMHelpers.h>
|
||||||
|
|
||||||
ScriptableAvatar::ScriptableAvatar() {
|
ScriptableAvatar::ScriptableAvatar() {
|
||||||
_clientTraitsHandler = std::unique_ptr<ClientTraitsHandler>(new ClientTraitsHandler(this));
|
_clientTraitsHandler.reset(new ClientTraitsHandler(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray ScriptableAvatar::toByteArrayStateful(AvatarDataDetail dataDetail, bool dropFaceTracking) {
|
QByteArray ScriptableAvatar::toByteArrayStateful(AvatarDataDetail dataDetail, bool dropFaceTracking) {
|
||||||
|
|
|
@ -583,15 +583,29 @@ void EntityScriptServer::handleOctreePacket(QSharedPointer<ReceivedMessage> mess
|
||||||
void EntityScriptServer::aboutToFinish() {
|
void EntityScriptServer::aboutToFinish() {
|
||||||
shutdownScriptEngine();
|
shutdownScriptEngine();
|
||||||
|
|
||||||
|
DependencyManager::get<EntityScriptingInterface>()->setEntityTree(nullptr);
|
||||||
|
DependencyManager::get<ResourceManager>()->cleanup();
|
||||||
|
|
||||||
|
DependencyManager::destroy<AudioScriptingInterface>();
|
||||||
|
DependencyManager::destroy<SoundCacheScriptingInterface>();
|
||||||
|
DependencyManager::destroy<ResourceScriptingInterface>();
|
||||||
|
DependencyManager::destroy<EntityScriptingInterface>();
|
||||||
|
|
||||||
|
DependencyManager::destroy<SoundCache>();
|
||||||
|
DependencyManager::destroy<ScriptCache>();
|
||||||
|
|
||||||
|
DependencyManager::destroy<ResourceManager>();
|
||||||
|
DependencyManager::destroy<ResourceCacheSharedItems>();
|
||||||
|
|
||||||
|
DependencyManager::destroy<MessagesClient>();
|
||||||
|
|
||||||
DependencyManager::destroy<AssignmentDynamicFactory>();
|
DependencyManager::destroy<AssignmentDynamicFactory>();
|
||||||
DependencyManager::destroy<AssignmentParentFinder>();
|
DependencyManager::destroy<AssignmentParentFinder>();
|
||||||
|
DependencyManager::destroy<AvatarHashMap>();
|
||||||
|
|
||||||
DependencyManager::get<ResourceManager>()->cleanup();
|
|
||||||
|
|
||||||
DependencyManager::destroy<PluginManager>();
|
DependencyManager::destroy<PluginManager>();
|
||||||
|
|
||||||
DependencyManager::destroy<ResourceScriptingInterface>();
|
|
||||||
DependencyManager::destroy<EntityScriptingInterface>();
|
|
||||||
|
|
||||||
// cleanup the AudioInjectorManager (and any still running injectors)
|
// cleanup the AudioInjectorManager (and any still running injectors)
|
||||||
DependencyManager::destroy<AudioInjectorManager>();
|
DependencyManager::destroy<AudioInjectorManager>();
|
||||||
|
|
|
@ -139,7 +139,7 @@ MyAvatar::MyAvatar(QThread* thread) :
|
||||||
_flyingHMDSetting(QStringList() << AVATAR_SETTINGS_GROUP_NAME << "flyingHMD", _flyingPrefHMD),
|
_flyingHMDSetting(QStringList() << AVATAR_SETTINGS_GROUP_NAME << "flyingHMD", _flyingPrefHMD),
|
||||||
_avatarEntityCountSetting(QStringList() << AVATAR_SETTINGS_GROUP_NAME << "avatarEntityData" << "size", 0)
|
_avatarEntityCountSetting(QStringList() << AVATAR_SETTINGS_GROUP_NAME << "avatarEntityData" << "size", 0)
|
||||||
{
|
{
|
||||||
_clientTraitsHandler = std::unique_ptr<ClientTraitsHandler>(new ClientTraitsHandler(this));
|
_clientTraitsHandler.reset(new ClientTraitsHandler(this));
|
||||||
|
|
||||||
// give the pointer to our head to inherited _headData variable from AvatarData
|
// give the pointer to our head to inherited _headData variable from AvatarData
|
||||||
_headData = new MyHead(this);
|
_headData = new MyHead(this);
|
||||||
|
|
|
@ -1490,7 +1490,7 @@ protected:
|
||||||
bool _isClientAvatar { false };
|
bool _isClientAvatar { false };
|
||||||
|
|
||||||
// null unless MyAvatar or ScriptableAvatar sending traits data to mixer
|
// null unless MyAvatar or ScriptableAvatar sending traits data to mixer
|
||||||
std::unique_ptr<ClientTraitsHandler> _clientTraitsHandler;
|
std::unique_ptr<ClientTraitsHandler, LaterDeleter> _clientTraitsHandler;
|
||||||
|
|
||||||
template <typename T, typename F>
|
template <typename T, typename F>
|
||||||
T readLockWithNamedJointIndex(const QString& name, const T& defaultValue, F f) const {
|
T readLockWithNamedJointIndex(const QString& name, const T& defaultValue, F f) const {
|
||||||
|
|
|
@ -22,7 +22,7 @@ ClientTraitsHandler::ClientTraitsHandler(AvatarData* owningAvatar) :
|
||||||
_owningAvatar(owningAvatar)
|
_owningAvatar(owningAvatar)
|
||||||
{
|
{
|
||||||
auto nodeList = DependencyManager::get<NodeList>();
|
auto nodeList = DependencyManager::get<NodeList>();
|
||||||
QObject::connect(nodeList.data(), &NodeList::nodeAdded, [this](SharedNodePointer addedNode){
|
QObject::connect(nodeList.data(), &NodeList::nodeAdded, this, [this](SharedNodePointer addedNode) {
|
||||||
if (addedNode->getType() == NodeType::AvatarMixer) {
|
if (addedNode->getType() == NodeType::AvatarMixer) {
|
||||||
resetForNewMixer();
|
resetForNewMixer();
|
||||||
}
|
}
|
||||||
|
|
|
@ -180,9 +180,7 @@ void Deck::processFrames() {
|
||||||
#ifdef WANT_RECORDING_DEBUG
|
#ifdef WANT_RECORDING_DEBUG
|
||||||
qCDebug(recordingLog) << "Setting timer for next processing " << nextInterval;
|
qCDebug(recordingLog) << "Setting timer for next processing " << nextInterval;
|
||||||
#endif
|
#endif
|
||||||
_timer.singleShot(nextInterval, [this] {
|
_timer.singleShot(nextInterval, this, &Deck::processFrames);
|
||||||
processFrames();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Deck::removeClip(const ClipConstPointer& clip) {
|
void Deck::removeClip(const ClipConstPointer& clip) {
|
||||||
|
|
|
@ -113,6 +113,13 @@ void doEvery(quint64& lastReportUsecs, quint64 secs, F lamdba) {
|
||||||
// Maximum accuracy in msecs
|
// Maximum accuracy in msecs
|
||||||
float secTimestampNow();
|
float secTimestampNow();
|
||||||
|
|
||||||
|
// Custom deleter for QObjects that calls deleteLater
|
||||||
|
struct LaterDeleter {
|
||||||
|
void operator()(QObject* ptr) {
|
||||||
|
ptr->deleteLater();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
float randFloat();
|
float randFloat();
|
||||||
int randIntInRange (int min, int max);
|
int randIntInRange (int min, int max);
|
||||||
float randFloatInRange (float min,float max);
|
float randFloatInRange (float min,float max);
|
||||||
|
|
|
@ -615,7 +615,9 @@ function notificationPollCallbackHistory(historyArray) {
|
||||||
ui.notificationDisplayBanner(message);
|
ui.notificationDisplayBanner(message);
|
||||||
} else {
|
} else {
|
||||||
for (var i = 0; i < notificationCount; i++) {
|
for (var i = 0; i < notificationCount; i++) {
|
||||||
message = '"' + (historyArray[i].message) + '" ' +
|
var historyMessage = historyArray[i].message;
|
||||||
|
var sanitizedHistoryMessage = historyMessage.replace(/<\/?[^>]+(>|$)/g, "");
|
||||||
|
message = '"' + sanitizedHistoryMessage + '" ' +
|
||||||
"Open INVENTORY to see all activity.";
|
"Open INVENTORY to see all activity.";
|
||||||
ui.notificationDisplayBanner(message);
|
ui.notificationDisplayBanner(message);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue