Commit graph

15 commits

Author SHA1 Message Date
Sei Lisa
65d3f1130a Fix llDetectedName return value.
Astonishingly, llDetectedName returns NULL_KEY for invalid indices.
2017-01-17 00:20:38 +01:00
Sei Lisa
d8cf384ccc Fix llGetColor return value for invalid face.
It returns <1,1,1>, not ZERO_VECTOR.
2017-01-16 23:51:40 +01:00
Sei Lisa
68902c20f4 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.
2017-01-16 23:23:34 +01:00
Sei Lisa
9d63e7268d Fix reference to vector components in llEdgeOfWorld. 2017-01-16 19:34:04 +01:00
Sei Lisa
7ca81020a0 Fix llGetAgentList function name in lslextrafuncs.py.
For some reason, llGetListEntryType slipped in there. The prototype and behaviour were both correct, though.
2016-12-25 01:01:28 +01:00
Sei Lisa
159fae90bf Improve llFrand.
- Remove it from lslextrafuncs, and move all the code to lslbasefuncs.
- Make it behave like SL's more accurately. Denormals return 0 always in SL.
- Use int() for truncation rather then floor/ceil.
- Add test cases.
2016-12-22 01:05:21 +01:00
Sei Lisa
6879037735 Fix type conversion on calling LSL functions.
We had a big chaos with type conversion. That caused a bug where passing a key to a function that required a string, or vice versa, crashed the script.

Diminish the chaos by modifying the parameters just prior to invocation (in lslfoldconst). We also remove the, now unnecessary, calls to force floats, either alone or within vectors or quaternions.
2016-12-21 06:01:03 +01:00
Sei Lisa
ba9511e2ff Implement llFrand and llGenerateKey when in Calc mode. 2016-12-21 01:18:25 +01:00
Sei Lisa
1b7dbd9453 Fix llGetColor in lslextrafuncs.py
Too much copy-paste. The name of the parameter should have been 'face', not 'id'.
2016-12-21 00:41:08 +01:00
Sei Lisa
991e811f2d Fix Python gotcha with module globals, and missing 'cond' in lslextrafuncs.
The previous commit didn't work as expected. "from module import var" freezes the value at load time; changing it later has no effect. A reference to the module needs to be used.

Fix that and the similar problem with LSO. Also revert some "from lslcommon import *" introduced earlier.

That also revealed another bug about missing 'cond' in the import list of lslextrafuncs. This should fix all functions that return values on null key input.
2016-12-21 00:22:49 +01:00
Sei Lisa
0b0f10007b Update copyright year. 2016-12-15 04:37:33 +01:00
Sei Lisa
ae984169ad Add llGetEnv to the partially computable functions.
Includes all known settings up to 16.12.03.322072 so far. It will be updated as new settings are added.
2016-12-12 22:58:12 +01:00
Sei Lisa
c68a1f4ad6 Add copyright notices to all files, to prepare the program for release. 2015-03-05 23:18:41 +01:00
Sei Lisa
d2fb302684 Add more functions whose result is known for certain operands. 2015-02-12 07:49:32 +01:00
Sei Lisa
db862bb4a6 Multi-commit:
- Fix a bunch of bugs found during the debut of the LSL calculator.
- Add infrastructure for functions to be able to produce a result or not depending on arguments. Fixes the llBase64ToInteger/llXorBase64/llXorBase64StringsCorrect cases where they are not deterministic, and allows for the addition of some extra functions whose value can be determined in some cases (e.g. llDetectedType(-1) is always 0). Added several such functions in a new module.
- Add the constant folding option to the help and the default options.
2015-02-11 05:43:13 +01:00