mirror of
https://github.com/lubosz/overte.git
synced 2025-04-13 05:19:27 +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 } ;
|
||||
entityTree.recurseTreeWithOperation(&FindPriorityZone::operation, &findPriorityZone);
|
||||
_avatar->setPriorityAvatar(findPriorityZone.isInPriorityZone);
|
||||
if (findPriorityZone.isInPriorityZone) {
|
||||
qCWarning(avatars) << "Avatar" << _avatar->getSessionDisplayName() << "in hero zone";
|
||||
}
|
||||
//if (findPriorityZone.isInPriorityZone) {
|
||||
// qCWarning(avatars) << "Avatar" << _avatar->getSessionDisplayName() << "in hero zone";
|
||||
//}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -307,25 +307,6 @@ 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) {
|
||||
const float AVATAR_HERO_FRACTION { 0.4f };
|
||||
const Node* destinationNode = node.data();
|
||||
|
@ -392,18 +373,14 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node)
|
|||
using AvatarPriorityQueue = PrioritySortUtil::PriorityQueue<SortableAvatar>;
|
||||
// Keep two independent queues, one for heroes and one for the riff-raff.
|
||||
enum PriorityVariants { kHero, kNonhero };
|
||||
AvatarPriorityQueue avatarPriorityQueues[2] = { {cameraViews,
|
||||
AvatarData::_avatarSortCoefficientSize, AvatarData::_avatarSortCoefficientCenter, AvatarData::_avatarSortCoefficientAge},
|
||||
{cameraViews,
|
||||
AvatarData::_avatarSortCoefficientSize, AvatarData::_avatarSortCoefficientCenter, AvatarData::_avatarSortCoefficientAge}
|
||||
AvatarPriorityQueue avatarPriorityQueues[2] =
|
||||
{
|
||||
{cameraViews, AvatarData::_avatarSortCoefficientSize,
|
||||
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);
|
||||
|
||||
for (auto listedNode = _begin; listedNode != _end; ++listedNode) {
|
||||
|
|
Loading…
Reference in a new issue