From 36e336beee33caace5f9ac773288c278c3c94d41 Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Fri, 20 Oct 2017 09:58:49 +0200 Subject: [PATCH] Add llGetStatus to lslextrafuncs. --- lslopt/lslextrafuncs.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lslopt/lslextrafuncs.py b/lslopt/lslextrafuncs.py index cfa8fa0..61c2503 100644 --- a/lslopt/lslextrafuncs.py +++ b/lslopt/lslextrafuncs.py @@ -244,7 +244,7 @@ def llGetColor(face): face = fi(face) if face > 8: return Vector((1.,1.,1.)) - # Returns face 0 when negative (can't be computed) + # Returns the average colour when negative (can't be computed) raise ELSLCantCompute def llGetDisplayName(id): @@ -310,4 +310,10 @@ def llGetOwnerKey(id): return Key(NULL_KEY) raise ELSLCantCompute +def llGetStatus(mask): + # leave out STATUS_DIE_AT_EDGE and STATUS_CAST_SHADOWS + if (mask & 0b10101111111) == 0: + return 0 + raise ELSLCantCompute + # TODO: Add more predictable functions.