Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xenny Heartsong
Alchemy Viewer
Commits
6974c61f
Commit
6974c61f
authored
Mar 05, 2020
by
Rye Mutt
🍞
Browse files
Make LLWorld::getAvatar behavior consistent between all variants. Yes it's slower.
parent
eb4c0edf
Changes
1
Hide whitespace changes
Inline
Side-by-side
indra/newview/llworld.cpp
View file @
6974c61f
...
...
@@ -1381,11 +1381,11 @@ void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector<LLVector3d>* positi
{
if
(
positions
!=
nullptr
)
{
positions
->
emplace_back
(
pos_global
);
positions
->
emplace_back
(
std
::
move
(
pos_global
)
)
;
}
if
(
avatar_ids
!=
nullptr
)
{
avatar_ids
->
emplace_back
(
uuid
);
avatar_ids
->
emplace_back
(
std
::
move
(
uuid
)
)
;
}
}
}
...
...
@@ -1407,9 +1407,9 @@ void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector<LLVector3d>* positi
{
if
(
positions
!=
nullptr
)
{
positions
->
emplace_back
(
pos_global
);
positions
->
emplace_back
(
std
::
move
(
pos_global
)
)
;
}
avatar_ids
->
emplace_back
(
uuid
);
avatar_ids
->
emplace_back
(
std
::
move
(
uuid
)
)
;
}
}
}
...
...
@@ -1439,7 +1439,7 @@ void LLWorld::getAvatars(pos_map_t* umap, const LLVector3d& relative_to, F32 rad
if
(
!
uuid
.
isNull
()
&&
dist_vec_squared
(
pos_global
,
relative_to
)
<=
radius_squared
)
{
umap
->
emplace
(
uuid
,
pos_global
);
umap
->
emplace
(
std
::
move
(
uuid
)
,
std
::
move
(
pos_global
)
)
;
}
}
}
...
...
@@ -1454,9 +1454,9 @@ void LLWorld::getAvatars(pos_map_t* umap, const LLVector3d& relative_to, F32 rad
if
(
uuid
.
isNull
())
continue
;
LLVector3d
pos_global
=
unpackLocalToGlobalPosition
(
regionp
->
mMapAvatars
[
i
],
origin_global
,
regionp
->
getWidthScaleFactor
());
if
(
dist_vec_squared
(
pos_global
,
relative_to
)
<=
radius_squared
)
if
(
dist_vec_squared
(
pos_global
,
relative_to
)
<=
radius_squared
&&
umap
->
find
(
uuid
)
==
umap
->
end
()
)
{
umap
->
emplace
(
uuid
,
pos_global
);
umap
->
emplace
(
std
::
move
(
uuid
)
,
std
::
move
(
pos_global
)
)
;
}
}
}
...
...
@@ -1486,7 +1486,7 @@ void LLWorld::getAvatars(region_gpos_map_t* umap, const LLVector3d& relative_to,
if
(
uuid
.
notNull
()
&&
region
&&
dist_vec_squared
(
pos_global
,
relative_to
)
<=
radius_squared
)
{
umap
->
emplace
(
uuid
,
regionp_gpos
_pair
_t
(
region
,
pos_global
));
umap
->
emplace
(
std
::
move
(
uuid
)
,
std
::
make
_pair
(
region
,
std
::
move
(
pos_global
))
)
;
}
}
}
...
...
@@ -1501,9 +1501,9 @@ void LLWorld::getAvatars(region_gpos_map_t* umap, const LLVector3d& relative_to,
if
(
uuid
.
isNull
())
continue
;
LLVector3d
pos_global
=
unpackLocalToGlobalPosition
(
regionp
->
mMapAvatars
[
i
],
origin_global
,
regionp
->
getWidthScaleFactor
());
if
(
dist_vec_squared
(
pos_global
,
relative_to
)
<=
radius_squared
)
if
(
dist_vec_squared
(
pos_global
,
relative_to
)
<=
radius_squared
&&
umap
->
find
(
uuid
)
==
umap
->
end
()
)
{
umap
->
emplace
(
uuid
,
regionp_gpos
_pair
_t
(
regionp
,
pos_global
));
umap
->
emplace
(
std
::
move
(
uuid
)
,
std
::
make
_pair
(
regionp
,
std
::
move
(
pos_global
))
)
;
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment