Fix invocation of PythonType2LSL

Fixes #32. Thanks to @KrsityKu for the report and repro.
This commit is contained in:
Sei Lisa 2024-05-24 20:25:39 +02:00
parent c1c1b8c58d
commit a6cce58b5d
3 changed files with 16 additions and 1 deletions

View file

@ -463,7 +463,7 @@ class deadcode(object):
if value.nt == 'CONST': if value.nt == 'CONST':
value = value.value[fieldidx] value = value.value[fieldidx]
value = nr(nt='CONST', X=True, SEF=True, value = nr(nt='CONST', X=True, SEF=True,
t=self.PythonType2LSL[type(value)], value=value) t=lslfuncs.PythonType2LSL[type(value)], value=value)
value = self.Cast(value, 'float') value = self.Cast(value, 'float')
SEF = True SEF = True
else: # assumed VECTOR or ROTATION per OKtoRemoveSymbol else: # assumed VECTOR or ROTATION per OKtoRemoveSymbol

View file

@ -0,0 +1,8 @@
default
{
timer()
{
vector v = <1,2,3>;
llOwnerSay((string)v.x);
}
}

View file

@ -0,0 +1,7 @@
default
{
timer()
{
llOwnerSay("1.000000");
}
}