mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 14:58:03 +02:00
Minor clean-up
This commit is contained in:
parent
13cda8d212
commit
fede8d0525
2 changed files with 9 additions and 32 deletions
|
@ -145,9 +145,9 @@ int AvatarMixerClientData::parseData(ReceivedMessage& message, const SlaveShared
|
||||||
FindPriorityZone findPriorityZone { newPosition, false } ;
|
FindPriorityZone findPriorityZone { newPosition, false } ;
|
||||||
entityTree.recurseTreeWithOperation(&FindPriorityZone::operation, &findPriorityZone);
|
entityTree.recurseTreeWithOperation(&FindPriorityZone::operation, &findPriorityZone);
|
||||||
_avatar->setPriorityAvatar(findPriorityZone.isInPriorityZone);
|
_avatar->setPriorityAvatar(findPriorityZone.isInPriorityZone);
|
||||||
if (findPriorityZone.isInPriorityZone) {
|
//if (findPriorityZone.isInPriorityZone) {
|
||||||
qCWarning(avatars) << "Avatar" << _avatar->getSessionDisplayName() << "in hero zone";
|
// qCWarning(avatars) << "Avatar" << _avatar->getSessionDisplayName() << "in hero zone";
|
||||||
}
|
//}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -307,25 +307,6 @@ namespace {
|
||||||
|
|
||||||
} // Close anonymous namespace.
|
} // Close anonymous namespace.
|
||||||
|
|
||||||
//// Specialize computePriority() for avatars:
|
|
||||||
//namespace PrioritySortUtil {
|
|
||||||
//template<> float PriorityQueue<SortableAvatar>::computePriority(const SortableAvatar& thing) const {
|
|
||||||
// static constexpr float AVATAR_HERO_BONUS { 25.0f }; // Higher than any normal priority.
|
|
||||||
//
|
|
||||||
// float priority = std::numeric_limits<float>::min();
|
|
||||||
//
|
|
||||||
// for (const auto& view : _views) {
|
|
||||||
// priority = std::max(priority, computePriority(view, thing));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// if (thing.getAvatar()->getPriorityAvatar()) {
|
|
||||||
// priority += AVATAR_HERO_BONUS;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// return priority;
|
|
||||||
//}
|
|
||||||
//}
|
|
||||||
|
|
||||||
void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) {
|
void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) {
|
||||||
const float AVATAR_HERO_FRACTION { 0.4f };
|
const float AVATAR_HERO_FRACTION { 0.4f };
|
||||||
const Node* destinationNode = node.data();
|
const Node* destinationNode = node.data();
|
||||||
|
@ -392,18 +373,14 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node)
|
||||||
using AvatarPriorityQueue = PrioritySortUtil::PriorityQueue<SortableAvatar>;
|
using AvatarPriorityQueue = PrioritySortUtil::PriorityQueue<SortableAvatar>;
|
||||||
// Keep two independent queues, one for heroes and one for the riff-raff.
|
// Keep two independent queues, one for heroes and one for the riff-raff.
|
||||||
enum PriorityVariants { kHero, kNonhero };
|
enum PriorityVariants { kHero, kNonhero };
|
||||||
AvatarPriorityQueue avatarPriorityQueues[2] = { {cameraViews,
|
AvatarPriorityQueue avatarPriorityQueues[2] =
|
||||||
AvatarData::_avatarSortCoefficientSize, AvatarData::_avatarSortCoefficientCenter, AvatarData::_avatarSortCoefficientAge},
|
{
|
||||||
{cameraViews,
|
{cameraViews, AvatarData::_avatarSortCoefficientSize,
|
||||||
AvatarData::_avatarSortCoefficientSize, AvatarData::_avatarSortCoefficientCenter, AvatarData::_avatarSortCoefficientAge}
|
AvatarData::_avatarSortCoefficientCenter, AvatarData::_avatarSortCoefficientAge},
|
||||||
|
{cameraViews, AvatarData::_avatarSortCoefficientSize,
|
||||||
|
AvatarData::_avatarSortCoefficientCenter, AvatarData::_avatarSortCoefficientAge}
|
||||||
};
|
};
|
||||||
|
|
||||||
//PrioritySortUtil::PriorityQueue<SortableAvatar> sortedAvatars(cameraViews,
|
|
||||||
// AvatarData::_avatarSortCoefficientSize,
|
|
||||||
// AvatarData::_avatarSortCoefficientCenter,
|
|
||||||
// AvatarData::_avatarSortCoefficientAge);
|
|
||||||
//sortedAvatars.reserve(_end - _begin);
|
|
||||||
|
|
||||||
avatarPriorityQueues[kNonhero].reserve(_end - _begin);
|
avatarPriorityQueues[kNonhero].reserve(_end - _begin);
|
||||||
|
|
||||||
for (auto listedNode = _begin; listedNode != _end; ++listedNode) {
|
for (auto listedNode = _begin; listedNode != _end; ++listedNode) {
|
||||||
|
|
Loading…
Reference in a new issue