mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
Implement llFrand and llGenerateKey when in Calc mode.
This commit is contained in:
parent
1b7dbd9453
commit
ba9511e2ff
2 changed files with 32 additions and 6 deletions
|
@ -20,8 +20,8 @@
|
|||
import lslcommon
|
||||
from lslcommon import Key #, Vector, Quaternion
|
||||
from lslbasefuncs import ELSLCantCompute, isinteger, iskey, islist, \
|
||||
isvector, isstring, NULL_KEY, ZERO_VECTOR, ZERO_ROTATION, cond
|
||||
#isfloat, isrotation
|
||||
isfloat, isvector, isstring, NULL_KEY, ZERO_VECTOR, ZERO_ROTATION, cond
|
||||
#isrotation
|
||||
|
||||
TouchEvents = ('touch', 'touch_start', 'touch_end')
|
||||
DetectionEvents = ('touch', 'touch_start', 'touch_end',
|
||||
|
@ -147,6 +147,13 @@ def llEdgeOfWorld(v1, v2):
|
|||
return 1
|
||||
raise ELSLCantCompute
|
||||
|
||||
if not lslcommon.IsCalc:
|
||||
def llFrand(f):
|
||||
assert isfloat(f)
|
||||
if f == 0.:
|
||||
return 0.
|
||||
raise ELSLCantCompute
|
||||
|
||||
def llGetAgentInfo(id):
|
||||
assert iskey(id)
|
||||
if not cond(id):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue