From d8cf384ccc42525d0784b8c07c999d50a9f7d6c9 Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Mon, 16 Jan 2017 23:51:40 +0100 Subject: [PATCH] Fix llGetColor return value for invalid face. It returns <1,1,1>, not ZERO_VECTOR. --- lslopt/lslextrafuncs.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lslopt/lslextrafuncs.py b/lslopt/lslextrafuncs.py index cafe9f0..045896a 100644 --- a/lslopt/lslextrafuncs.py +++ b/lslopt/lslextrafuncs.py @@ -17,7 +17,7 @@ # Extra functions that have predictable return values for certain arguments. -from lslcommon import Key #, Vector, Quaternion +from lslcommon import Key, Vector #, Quaternion from lslbasefuncs import ELSLCantCompute, isinteger, iskey, islist, \ isvector, isstring, NULL_KEY, ZERO_VECTOR, ZERO_ROTATION, cond #isfloat, isrotation @@ -200,7 +200,8 @@ def llGetBoundingBox(id): def llGetColor(face): assert isinteger(face) if face > 8: - return ZERO_VECTOR + return Vector((1.,1.,1.)) + # Returns face 0 when negative (can't be computed) raise ELSLCantCompute def llGetDisplayName(id):