Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Archive
Alchemy Viewer
Commits
56c4028e
Commit
56c4028e
authored
8 years ago
by
Kitty Barnett
Browse files
Options
Downloads
Patches
Plain Diff
[FIXED] Exclusion ranges for @recvim and @sendim are calculated wrong
--HG-- branch : RLVa
parent
38d10433
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/newview/rlvactions.cpp
+12
-4
12 additions, 4 deletions
indra/newview/rlvactions.cpp
indra/newview/rlvactions.h
+0
-1
0 additions, 1 deletion
indra/newview/rlvactions.h
with
12 additions
and
5 deletions
indra/newview/rlvactions.cpp
+
12
−
4
View file @
56c4028e
...
@@ -132,12 +132,20 @@ bool RlvActions::canChangeActiveGroup(const LLUUID& idRlvObject)
...
@@ -132,12 +132,20 @@ bool RlvActions::canChangeActiveGroup(const LLUUID& idRlvObject)
// Little helper function to check the IM exclusion range for @recvim, @sendim and @startim (returns: min_dist <= (pos user - pos target) <= max_dist)
// Little helper function to check the IM exclusion range for @recvim, @sendim and @startim (returns: min_dist <= (pos user - pos target) <= max_dist)
static
bool
rlvCheckAvatarIMDistance
(
const
LLUUID
&
idAvatar
,
ERlvBehaviourModifier
eModDistMin
,
ERlvBehaviourModifier
eModDistMax
)
static
bool
rlvCheckAvatarIMDistance
(
const
LLUUID
&
idAvatar
,
ERlvBehaviourModifier
eModDistMin
,
ERlvBehaviourModifier
eModDistMax
)
{
{
LLVector3d
posAgent
;
// | no limits | minimum set | min+max set | !fHasMin | !fHasMax = INF | fHasMax
// -------------------------------------------------------------- ------------------------------------
// dist <= min <= max | block | block | block | F | F | F
// min <= dist <= max | block | allow | allow | F | T | T
// min <= max <= dist | block | allow | block | F | ^ (see above) | F
// off-region | block | allow | block | F | ^ (see above) | F
const
RlvBehaviourModifier
*
pBhvrModDistMin
=
RlvBehaviourDictionary
::
instance
().
getModifier
(
eModDistMin
),
*
pBhvrModDistMax
=
RlvBehaviourDictionary
::
instance
().
getModifier
(
eModDistMax
);
const
RlvBehaviourModifier
*
pBhvrModDistMin
=
RlvBehaviourDictionary
::
instance
().
getModifier
(
eModDistMin
),
*
pBhvrModDistMax
=
RlvBehaviourDictionary
::
instance
().
getModifier
(
eModDistMax
);
if
(
((
pBhvrModDistMin
->
hasValue
())
||
(
pBhvrModDistMax
->
hasValue
()))
&&
(
LLWorld
::
getInstance
()
->
getAvatar
(
idAvatar
,
posAgent
))
)
if
(
pBhvrModDistMin
->
hasValue
())
{
{
float
nDist
=
llabs
(
dist_vec_squared
(
gAgent
.
getPositionGlobal
(),
posAgent
));
LLVector3d
posAgent
;
bool
fHasMax
=
pBhvrModDistMax
->
hasValue
();
return
(
nDist
>=
pBhvrModDistMin
->
getValue
<
float
>
())
&&
(
nDist
<=
pBhvrModDistMax
->
getValue
<
float
>
());
float
nMinDist
=
pBhvrModDistMin
->
getValue
<
float
>
(),
nMaxDist
=
(
fHasMax
)
?
pBhvrModDistMax
->
getValue
<
float
>
()
:
std
::
numeric_limits
<
float
>::
max
();
float
nDist
=
(
LLWorld
::
getInstance
()
->
getAvatar
(
idAvatar
,
posAgent
))
?
llabs
(
dist_vec_squared
(
gAgent
.
getPositionGlobal
(),
posAgent
))
:
std
::
numeric_limits
<
float
>::
max
();
return
(
nMinDist
<
nMaxDist
)
&&
(
nMinDist
<=
nDist
)
&&
(
nDist
<=
nMaxDist
);
}
}
return
false
;
return
false
;
}
}
...
...
This diff is collapsed.
Click to expand it.
indra/newview/rlvactions.h
+
0
−
1
View file @
56c4028e
...
@@ -87,7 +87,6 @@ public:
...
@@ -87,7 +87,6 @@ public:
*/
*/
static
bool
canChangeActiveGroup
(
const
LLUUID
&
idRlvObject
=
LLUUID
::
null
);
static
bool
canChangeActiveGroup
(
const
LLUUID
&
idRlvObject
=
LLUUID
::
null
);
/*
/*
* Returns true if the user is allowed to receive IMs from the specified sender (can be an avatar or a group)
* Returns true if the user is allowed to receive IMs from the specified sender (can be an avatar or a group)
*/
*/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment