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
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
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 Viewer
Alchemy Viewer
Commits
27fd7fde
Commit
27fd7fde
authored
9 years ago
by
Ansariel
Browse files
Options
Downloads
Patches
Plain Diff
More elegant solution to keep fix for MAINT-2879
parent
79e09fa9
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/llagent.cpp
+2
-42
2 additions, 42 deletions
indra/newview/llagent.cpp
indra/newview/llscriptruntimeperms.h
+4
-0
4 additions, 0 deletions
indra/newview/llscriptruntimeperms.h
with
6 additions
and
42 deletions
indra/newview/llagent.cpp
+
2
−
42
View file @
27fd7fde
...
@@ -63,6 +63,7 @@
...
@@ -63,6 +63,7 @@
#include
"llpaneltopinfobar.h"
#include
"llpaneltopinfobar.h"
#include
"llparcel.h"
#include
"llparcel.h"
#include
"llrendersphere.h"
#include
"llrendersphere.h"
#include
"llscriptruntimeperms.h"
#include
"llsdmessage.h"
#include
"llsdmessage.h"
#include
"llsdutil.h"
#include
"llsdutil.h"
#include
"llsky.h"
#include
"llsky.h"
...
@@ -4173,48 +4174,7 @@ void LLAgent::stopCurrentAnimations()
...
@@ -4173,48 +4174,7 @@ void LLAgent::stopCurrentAnimations()
if
(
mRegionp
&&
if
(
mRegionp
&&
gSavedSettings
.
getBOOL
(
"RevokePermsOnStopAnimation"
))
gSavedSettings
.
getBOOL
(
"RevokePermsOnStopAnimation"
))
{
{
typedef
enum
e_lscript_runtime_permissions
U32
permissions
=
SCRIPT_PERMISSIONS
[
SCRIPT_PERMISSION_TRIGGER_ANIMATION
].
permbit
|
SCRIPT_PERMISSIONS
[
SCRIPT_PERMISSION_OVERRIDE_ANIMATIONS
].
permbit
;
{
SCRIPT_PERMISSION_DEBIT
,
SCRIPT_PERMISSION_TAKE_CONTROLS
,
SCRIPT_PERMISSION_REMAP_CONTROLS
,
SCRIPT_PERMISSION_TRIGGER_ANIMATION
,
SCRIPT_PERMISSION_ATTACH
,
SCRIPT_PERMISSION_RELEASE_OWNERSHIP
,
SCRIPT_PERMISSION_CHANGE_LINKS
,
SCRIPT_PERMISSION_CHANGE_JOINTS
,
SCRIPT_PERMISSION_CHANGE_PERMISSIONS
,
SCRIPT_PERMISSION_TRACK_CAMERA
,
SCRIPT_PERMISSION_CONTROL_CAMERA
,
SCRIPT_PERMISSION_TELEPORT
,
SCRIPT_PERMISSION_EXPERIENCE
,
SCRIPT_PERMISSION_SILENT_ESTATE_MANAGEMENT
,
SCRIPT_PERMISSION_OVERRIDE_ANIMATIONS
,
SCRIPT_PERMISSION_RETURN_OBJECTS
,
SCRIPT_PERMISSION_EOF
}
LSCRIPTRunTimePermissions
;
const
U32
LSCRIPTRunTimePermissionBits
[
SCRIPT_PERMISSION_EOF
]
=
{
(
0x1
<<
1
),
// SCRIPT_PERMISSION_DEBIT,
(
0x1
<<
2
),
// SCRIPT_PERMISSION_TAKE_CONTROLS,
(
0x1
<<
3
),
// SCRIPT_PERMISSION_REMAP_CONTROLS,
(
0x1
<<
4
),
// SCRIPT_PERMISSION_TRIGGER_ANIMATION,
(
0x1
<<
5
),
// SCRIPT_PERMISSION_ATTACH,
(
0x1
<<
6
),
// SCRIPT_PERMISSION_RELEASE_OWNERSHIP,
(
0x1
<<
7
),
// SCRIPT_PERMISSION_CHANGE_LINKS,
(
0x1
<<
8
),
// SCRIPT_PERMISSION_CHANGE_JOINTS,
(
0x1
<<
9
),
// SCRIPT_PERMISSION_CHANGE_PERMISSIONS
(
0x1
<<
10
),
// SCRIPT_PERMISSION_TRACK_CAMERA
(
0x1
<<
11
),
// SCRIPT_PERMISSION_CONTROL_CAMERA
(
0x1
<<
12
),
// SCRIPT_PERMISSION_TELEPORT
(
0x1
<<
13
),
// SCRIPT_PERMISSION_EXPERIENCE
(
0x1
<<
14
),
// SCRIPT_PERMISSION_SILENT_ESTATE_MANAGEMENT
(
0x1
<<
15
),
// SCRIPT_PERMISSION_OVERRIDE_ANIMATIONS
(
0x1
<<
16
),
// SCRIPT_PERMISSION_RETURN_OBJECTS
};
U32
permissions
=
LSCRIPTRunTimePermissionBits
[
SCRIPT_PERMISSION_TRIGGER_ANIMATION
]
|
LSCRIPTRunTimePermissionBits
[
SCRIPT_PERMISSION_OVERRIDE_ANIMATIONS
];
sendRevokePermissions
(
mRegionp
->
getRegionID
(),
permissions
);
sendRevokePermissions
(
mRegionp
->
getRegionID
(),
permissions
);
if
(
gAgentAvatarp
->
isSitting
())
if
(
gAgentAvatarp
->
isSitting
())
{
// Also stand up, since auto-granted sit animation permission has been revoked
{
// Also stand up, since auto-granted sit animation permission has been revoked
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llscriptruntimeperms.h
+
4
−
0
View file @
27fd7fde
...
@@ -27,6 +27,8 @@
...
@@ -27,6 +27,8 @@
#ifndef LL_LLSCRIPTRUNTIME_PERMS_H
#ifndef LL_LLSCRIPTRUNTIME_PERMS_H
#define LL_LLSCRIPTRUNTIME_PERMS_H
#define LL_LLSCRIPTRUNTIME_PERMS_H
#include
<boost/array.hpp>
typedef
struct
_script_perm
{
typedef
struct
_script_perm
{
std
::
string
question
;
std
::
string
question
;
U32
permbit
;
U32
permbit
;
...
@@ -37,6 +39,8 @@ typedef struct _script_perm {
...
@@ -37,6 +39,8 @@ typedef struct _script_perm {
const
U32
NUM_SCRIPT_PERMISSIONS
=
16
;
const
U32
NUM_SCRIPT_PERMISSIONS
=
16
;
const
S32
SCRIPT_PERMISSION_DEBIT
=
0
;
const
S32
SCRIPT_PERMISSION_DEBIT
=
0
;
const
S32
SCRIPT_PERMISSION_TRIGGER_ANIMATION
=
3
;
const
S32
SCRIPT_PERMISSION_OVERRIDE_ANIMATIONS
=
14
;
static
const
boost
::
array
<
script_perm_t
,
NUM_SCRIPT_PERMISSIONS
>
SCRIPT_PERMISSIONS
=
{{
static
const
boost
::
array
<
script_perm_t
,
NUM_SCRIPT_PERMISSIONS
>
SCRIPT_PERMISSIONS
=
{{
_script_perm
(
"ScriptTakeMoney"
,
(
0x1
<<
1
),
true
),
_script_perm
(
"ScriptTakeMoney"
,
(
0x1
<<
1
),
true
),
...
...
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