mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00:00
Make llGetAgentList more specific.
Testing shows that AGENT_LIST_xxx values are not used as a bitfield, but as an enum. There are only three possible valid values. Check only those three.
This commit is contained in:
parent
1a06bf4eb9
commit
68902c20f4
1 changed files with 3 additions and 1 deletions
|
@ -161,7 +161,7 @@ def llGetAgentLanguage(id):
|
|||
def llGetAgentList(scope, options):
|
||||
assert isinteger(scope)
|
||||
assert islist(options)
|
||||
if scope == 0:
|
||||
if scope not in (1, 2, 4):
|
||||
return [u'INVALID_SCOPE']
|
||||
raise ELSLCantCompute
|
||||
|
||||
|
@ -175,6 +175,8 @@ def llGetAlpha(face):
|
|||
assert isinteger(face)
|
||||
if face > 8:
|
||||
return 1.0
|
||||
# Negative face numbers return (float)llGetNumberOfSides(), which isn't
|
||||
# computable.
|
||||
raise ELSLCantCompute
|
||||
|
||||
def llGetAnimation(id):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue