mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 13:28:09 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi into blue
This commit is contained in:
commit
e77b920592
10 changed files with 42 additions and 17 deletions
|
@ -58,9 +58,9 @@ In a new Terminal window, run:
|
||||||
|
|
||||||
Any target can be terminated with Ctrl-C (SIGINT) in the associated Terminal window.
|
Any target can be terminated with Ctrl-C (SIGINT) in the associated Terminal window.
|
||||||
|
|
||||||
This assignment-client will grab one assignment from the domain-server. You can tell the assignment-client what type you want it to be with the `-t` option. You can also run an assignment-client that forks off *n* assignment-clients with the `-n` option.
|
This assignment-client will grab one assignment from the domain-server. You can tell the assignment-client what type you want it to be with the `-t` option. You can also run an assignment-client that forks off *n* assignment-clients with the `-n` option. The `-min` and `-max` options allow you to set a range of required assignment-clients, this allows you to have flexibility in the number of assignment-clients that are running. See `--help` for more options.
|
||||||
|
|
||||||
./assignment-client -n 4
|
./assignment-client --min 6 --max 20
|
||||||
|
|
||||||
To test things out you'll want to run the Interface client.
|
To test things out you'll want to run the Interface client.
|
||||||
|
|
||||||
|
|
|
@ -593,10 +593,15 @@ void AvatarMixer::handleAvatarIdentityPacket(QSharedPointer<ReceivedMessage> mes
|
||||||
// parse the identity packet and update the change timestamp if appropriate
|
// parse the identity packet and update the change timestamp if appropriate
|
||||||
AvatarData::Identity identity;
|
AvatarData::Identity identity;
|
||||||
AvatarData::parseAvatarIdentityPacket(message->getMessage(), identity);
|
AvatarData::parseAvatarIdentityPacket(message->getMessage(), identity);
|
||||||
if (avatar.processAvatarIdentity(identity)) {
|
bool identityChanged = false;
|
||||||
|
bool displayNameChanged = false;
|
||||||
|
avatar.processAvatarIdentity(identity, identityChanged, displayNameChanged);
|
||||||
|
if (identityChanged) {
|
||||||
QMutexLocker nodeDataLocker(&nodeData->getMutex());
|
QMutexLocker nodeDataLocker(&nodeData->getMutex());
|
||||||
nodeData->flagIdentityChange();
|
nodeData->flagIdentityChange();
|
||||||
nodeData->setAvatarSessionDisplayNameMustChange(true);
|
if (displayNameChanged) {
|
||||||
|
nodeData->setAvatarSessionDisplayNameMustChange(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ Item {
|
||||||
|
|
||||||
SoundEffect {
|
SoundEffect {
|
||||||
id: buttonClickSound
|
id: buttonClickSound
|
||||||
|
volume: 0.1
|
||||||
source: "../../../sounds/Gamemaster-Audio-button-click.wav"
|
source: "../../../sounds/Gamemaster-Audio-button-click.wav"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -900,7 +900,7 @@ glm::quat Avatar::getAbsoluteJointRotationInObjectFrame(int index) const {
|
||||||
_skeletonModel->getAbsoluteJointRotationInRigFrame(headJointIndex, rotation);
|
_skeletonModel->getAbsoluteJointRotationInRigFrame(headJointIndex, rotation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return rotation;
|
return Quaternions::Y_180 * rotation * Quaternions::Y_180;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
glm::quat rotation;
|
glm::quat rotation;
|
||||||
|
@ -936,7 +936,7 @@ glm::vec3 Avatar::getAbsoluteJointTranslationInObjectFrame(int index) const {
|
||||||
_skeletonModel->getAbsoluteJointTranslationInRigFrame(headJointIndex, translation);
|
_skeletonModel->getAbsoluteJointTranslationInRigFrame(headJointIndex, translation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return translation;
|
return Quaternions::Y_180 * translation * Quaternions::Y_180;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
glm::vec3 translation;
|
glm::vec3 translation;
|
||||||
|
|
|
@ -1336,24 +1336,27 @@ const QUrl& AvatarData::cannonicalSkeletonModelURL(const QUrl& emptyURL) {
|
||||||
return _skeletonModelURL.scheme() == "file" ? emptyURL : _skeletonModelURL;
|
return _skeletonModelURL.scheme() == "file" ? emptyURL : _skeletonModelURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AvatarData::processAvatarIdentity(const Identity& identity) {
|
void AvatarData::processAvatarIdentity(const Identity& identity, bool& identityChanged, bool& displayNameChanged) {
|
||||||
bool hasIdentityChanged = false;
|
|
||||||
|
|
||||||
if (_firstSkeletonCheck || (identity.skeletonModelURL != cannonicalSkeletonModelURL(emptyURL))) {
|
if (_firstSkeletonCheck || (identity.skeletonModelURL != cannonicalSkeletonModelURL(emptyURL))) {
|
||||||
setSkeletonModelURL(identity.skeletonModelURL);
|
setSkeletonModelURL(identity.skeletonModelURL);
|
||||||
hasIdentityChanged = true;
|
identityChanged = true;
|
||||||
|
if (_firstSkeletonCheck) {
|
||||||
|
displayNameChanged = true;
|
||||||
|
}
|
||||||
_firstSkeletonCheck = false;
|
_firstSkeletonCheck = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (identity.displayName != _displayName) {
|
if (identity.displayName != _displayName) {
|
||||||
_displayName = identity.displayName;
|
_displayName = identity.displayName;
|
||||||
hasIdentityChanged = true;
|
identityChanged = true;
|
||||||
|
displayNameChanged = true;
|
||||||
}
|
}
|
||||||
maybeUpdateSessionDisplayNameFromTransport(identity.sessionDisplayName);
|
maybeUpdateSessionDisplayNameFromTransport(identity.sessionDisplayName);
|
||||||
|
|
||||||
if (identity.attachmentData != _attachmentData) {
|
if (identity.attachmentData != _attachmentData) {
|
||||||
setAttachmentData(identity.attachmentData);
|
setAttachmentData(identity.attachmentData);
|
||||||
hasIdentityChanged = true;
|
identityChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool avatarEntityDataChanged = false;
|
bool avatarEntityDataChanged = false;
|
||||||
|
@ -1362,10 +1365,8 @@ bool AvatarData::processAvatarIdentity(const Identity& identity) {
|
||||||
});
|
});
|
||||||
if (avatarEntityDataChanged) {
|
if (avatarEntityDataChanged) {
|
||||||
setAvatarEntityData(identity.avatarEntityData);
|
setAvatarEntityData(identity.avatarEntityData);
|
||||||
hasIdentityChanged = true;
|
identityChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return hasIdentityChanged;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray AvatarData::identityByteArray() {
|
QByteArray AvatarData::identityByteArray() {
|
||||||
|
|
|
@ -471,8 +471,9 @@ public:
|
||||||
|
|
||||||
static void parseAvatarIdentityPacket(const QByteArray& data, Identity& identityOut);
|
static void parseAvatarIdentityPacket(const QByteArray& data, Identity& identityOut);
|
||||||
|
|
||||||
// returns true if identity has changed, false otherwise.
|
// identityChanged returns true if identity has changed, false otherwise.
|
||||||
bool processAvatarIdentity(const Identity& identity);
|
// displayNameChanged returns true if displayName has changed, false otherwise.
|
||||||
|
void processAvatarIdentity(const Identity& identity, bool& identityChanged, bool& displayNameChanged);
|
||||||
|
|
||||||
QByteArray identityByteArray();
|
QByteArray identityByteArray();
|
||||||
|
|
||||||
|
|
|
@ -148,7 +148,9 @@ void AvatarHashMap::processAvatarIdentityPacket(QSharedPointer<ReceivedMessage>
|
||||||
if (!nodeList->isIgnoringNode(identity.uuid) || nodeList->getRequestsDomainListData()) {
|
if (!nodeList->isIgnoringNode(identity.uuid) || nodeList->getRequestsDomainListData()) {
|
||||||
// mesh URL for a UUID, find avatar in our list
|
// mesh URL for a UUID, find avatar in our list
|
||||||
auto avatar = newOrExistingAvatar(identity.uuid, sendingNode);
|
auto avatar = newOrExistingAvatar(identity.uuid, sendingNode);
|
||||||
avatar->processAvatarIdentity(identity);
|
bool identityChanged = false;
|
||||||
|
bool displayNameChanged = false;
|
||||||
|
avatar->processAvatarIdentity(identity, identityChanged, displayNameChanged);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,10 +23,19 @@ void SoundEffect::setSource(QUrl url) {
|
||||||
_sound = DependencyManager::get<SoundCache>()->getSound(_url);
|
_sound = DependencyManager::get<SoundCache>()->getSound(_url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float SoundEffect::getVolume() const {
|
||||||
|
return _volume;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SoundEffect::setVolume(float volume) {
|
||||||
|
_volume = volume;
|
||||||
|
}
|
||||||
|
|
||||||
void SoundEffect::play(QVariant position) {
|
void SoundEffect::play(QVariant position) {
|
||||||
AudioInjectorOptions options;
|
AudioInjectorOptions options;
|
||||||
options.position = vec3FromVariant(position);
|
options.position = vec3FromVariant(position);
|
||||||
options.localOnly = true;
|
options.localOnly = true;
|
||||||
|
options.volume = _volume;
|
||||||
if (_injector) {
|
if (_injector) {
|
||||||
_injector->setOptions(options);
|
_injector->setOptions(options);
|
||||||
_injector->restart();
|
_injector->restart();
|
||||||
|
|
|
@ -22,6 +22,7 @@ class AudioInjector;
|
||||||
class SoundEffect : public QQuickItem {
|
class SoundEffect : public QQuickItem {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(QUrl source READ getSource WRITE setSource)
|
Q_PROPERTY(QUrl source READ getSource WRITE setSource)
|
||||||
|
Q_PROPERTY(float volume READ getVolume WRITE setVolume)
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual ~SoundEffect();
|
virtual ~SoundEffect();
|
||||||
|
@ -29,9 +30,13 @@ public:
|
||||||
QUrl getSource() const;
|
QUrl getSource() const;
|
||||||
void setSource(QUrl url);
|
void setSource(QUrl url);
|
||||||
|
|
||||||
|
float getVolume() const;
|
||||||
|
void setVolume(float volume);
|
||||||
|
|
||||||
Q_INVOKABLE void play(QVariant position);
|
Q_INVOKABLE void play(QVariant position);
|
||||||
protected:
|
protected:
|
||||||
QUrl _url;
|
QUrl _url;
|
||||||
|
float _volume { 1.0f };
|
||||||
SharedSoundPointer _sound;
|
SharedSoundPointer _sound;
|
||||||
AudioInjector* _injector { nullptr };
|
AudioInjector* _injector { nullptr };
|
||||||
};
|
};
|
||||||
|
|
|
@ -520,6 +520,7 @@ function onClicked() {
|
||||||
Controller.mouseMoveEvent.connect(handleMouseMoveEvent);
|
Controller.mouseMoveEvent.connect(handleMouseMoveEvent);
|
||||||
triggerMapping.enable();
|
triggerMapping.enable();
|
||||||
triggerPressMapping.enable();
|
triggerPressMapping.enable();
|
||||||
|
createAudioInterval();
|
||||||
} else {
|
} else {
|
||||||
off();
|
off();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue