mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 12:12:32 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi into loginInitiative2
This commit is contained in:
commit
67539bc87a
5 changed files with 31 additions and 11 deletions
|
@ -6162,7 +6162,9 @@ void Application::update(float deltaTime) {
|
||||||
{
|
{
|
||||||
PROFILE_RANGE_EX(app, "Overlays", 0xffff0000, (uint64_t)getActiveDisplayPlugin()->presentCount());
|
PROFILE_RANGE_EX(app, "Overlays", 0xffff0000, (uint64_t)getActiveDisplayPlugin()->presentCount());
|
||||||
PerformanceTimer perfTimer("overlays");
|
PerformanceTimer perfTimer("overlays");
|
||||||
_overlays.update(deltaTime);
|
if (qApp->shouldPaint()) {
|
||||||
|
_overlays.update(deltaTime);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update _viewFrustum with latest camera and view frustum data...
|
// Update _viewFrustum with latest camera and view frustum data...
|
||||||
|
@ -6247,8 +6249,10 @@ void Application::update(float deltaTime) {
|
||||||
PROFILE_RANGE_EX(app, "PostUpdateLambdas", 0xffff0000, (uint64_t)0);
|
PROFILE_RANGE_EX(app, "PostUpdateLambdas", 0xffff0000, (uint64_t)0);
|
||||||
PerformanceTimer perfTimer("postUpdateLambdas");
|
PerformanceTimer perfTimer("postUpdateLambdas");
|
||||||
std::unique_lock<std::mutex> guard(_postUpdateLambdasLock);
|
std::unique_lock<std::mutex> guard(_postUpdateLambdasLock);
|
||||||
for (auto& iter : _postUpdateLambdas) {
|
if (qApp->shouldPaint()) {
|
||||||
iter.second();
|
for (auto& iter : _postUpdateLambdas) {
|
||||||
|
iter.second();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
_postUpdateLambdas.clear();
|
_postUpdateLambdas.clear();
|
||||||
}
|
}
|
||||||
|
|
|
@ -261,7 +261,9 @@ void AvatarManager::updateOtherAvatars(float deltaTime) {
|
||||||
for (auto it = sortedAvatarVector.begin(); it != sortedAvatarVector.end(); ++it) {
|
for (auto it = sortedAvatarVector.begin(); it != sortedAvatarVector.end(); ++it) {
|
||||||
const SortableAvatar& sortData = *it;
|
const SortableAvatar& sortData = *it;
|
||||||
const auto avatar = std::static_pointer_cast<OtherAvatar>(sortData.getAvatar());
|
const auto avatar = std::static_pointer_cast<OtherAvatar>(sortData.getAvatar());
|
||||||
|
if (!avatar->_isClientAvatar) {
|
||||||
|
avatar->setIsClientAvatar(true);
|
||||||
|
}
|
||||||
// TODO: to help us scale to more avatars it would be nice to not have to poll this stuff every update
|
// TODO: to help us scale to more avatars it would be nice to not have to poll this stuff every update
|
||||||
if (avatar->getSkeletonModel()->isLoaded()) {
|
if (avatar->getSkeletonModel()->isLoaded()) {
|
||||||
// remove the orb if it is there
|
// remove the orb if it is there
|
||||||
|
|
|
@ -936,17 +936,27 @@ int AvatarData::parseDataFromBuffer(const QByteArray& buffer) {
|
||||||
}
|
}
|
||||||
|
|
||||||
_serverPosition = glm::vec3(data->globalPosition[0], data->globalPosition[1], data->globalPosition[2]) + offset;
|
_serverPosition = glm::vec3(data->globalPosition[0], data->globalPosition[1], data->globalPosition[2]) + offset;
|
||||||
auto oneStepDistance = glm::length(_globalPosition - _serverPosition);
|
if (_isClientAvatar) {
|
||||||
if (oneStepDistance <= AVATAR_TRANSIT_MIN_TRIGGER_DISTANCE || oneStepDistance >= AVATAR_TRANSIT_MAX_TRIGGER_DISTANCE) {
|
auto oneStepDistance = glm::length(_globalPosition - _serverPosition);
|
||||||
_globalPosition = _serverPosition;
|
if (oneStepDistance <= AVATAR_TRANSIT_MIN_TRIGGER_DISTANCE || oneStepDistance >= AVATAR_TRANSIT_MAX_TRIGGER_DISTANCE) {
|
||||||
// if we don't have a parent, make sure to also set our local position
|
_globalPosition = _serverPosition;
|
||||||
|
// if we don't have a parent, make sure to also set our local position
|
||||||
|
if (!hasParent()) {
|
||||||
|
setLocalPosition(_serverPosition);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (_globalPosition != _serverPosition) {
|
||||||
|
_globalPositionChanged = now;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (_globalPosition != _serverPosition) {
|
||||||
|
_globalPosition = _serverPosition;
|
||||||
|
_globalPositionChanged = now;
|
||||||
|
}
|
||||||
if (!hasParent()) {
|
if (!hasParent()) {
|
||||||
setLocalPosition(_serverPosition);
|
setLocalPosition(_serverPosition);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_globalPosition != _serverPosition) {
|
|
||||||
_globalPositionChanged = now;
|
|
||||||
}
|
|
||||||
sourceBuffer += sizeof(AvatarDataPacket::AvatarGlobalPosition);
|
sourceBuffer += sizeof(AvatarDataPacket::AvatarGlobalPosition);
|
||||||
int numBytesRead = sourceBuffer - startSection;
|
int numBytesRead = sourceBuffer - startSection;
|
||||||
_globalPositionRate.increment(numBytesRead);
|
_globalPositionRate.increment(numBytesRead);
|
||||||
|
|
|
@ -1221,6 +1221,7 @@ public:
|
||||||
|
|
||||||
void setIsNewAvatar(bool isNewAvatar) { _isNewAvatar = isNewAvatar; }
|
void setIsNewAvatar(bool isNewAvatar) { _isNewAvatar = isNewAvatar; }
|
||||||
bool getIsNewAvatar() { return _isNewAvatar; }
|
bool getIsNewAvatar() { return _isNewAvatar; }
|
||||||
|
void setIsClientAvatar(bool isClientAvatar) { _isClientAvatar = isClientAvatar; }
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
|
@ -1486,6 +1487,7 @@ protected:
|
||||||
float _density;
|
float _density;
|
||||||
int _replicaIndex { 0 };
|
int _replicaIndex { 0 };
|
||||||
bool _isNewAvatar { true };
|
bool _isNewAvatar { true };
|
||||||
|
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> _clientTraitsHandler;
|
||||||
|
|
|
@ -3207,6 +3207,8 @@ void EntityItemProperties::markAllChanged() {
|
||||||
|
|
||||||
_queryAACubeChanged = true;
|
_queryAACubeChanged = true;
|
||||||
|
|
||||||
|
_shapeChanged = true;
|
||||||
|
|
||||||
_flyingAllowedChanged = true;
|
_flyingAllowedChanged = true;
|
||||||
_ghostingAllowedChanged = true;
|
_ghostingAllowedChanged = true;
|
||||||
_filterURLChanged = true;
|
_filterURLChanged = true;
|
||||||
|
|
Loading…
Reference in a new issue