revert change on script execution release points. That will need a full recompile with script states reset, not justifiable by now; plus cosmetics

This commit is contained in:
UbitUmarov
2023-02-16 05:04:11 +00:00
parent f41ff1419c
commit be2192fd53
9 changed files with 275 additions and 305 deletions

View File

@@ -666,68 +666,65 @@ namespace OpenSim.Region.ScriptEngine.Yengine
XmlNodeList varL = part.ChildNodes;
foreach (XmlNode var in varL)
{
string varName;
object o = ReadXTypedValue(var, out varName);
Type otype = o.GetType();
if (otype == typeof(LSL_Integer))
object o = ReadXTypedValue(var, out string varName);
if (o is LSL_Integer lio)
{
if (intNames.TryGetValue(varName, out indx))
ints[indx] = ((LSL_Integer)o);
ints[indx] = lio;
continue;
}
if (otype == typeof(LSL_Float))
if (o is LSL_Float lfo)
{
if (doubleNames.TryGetValue(varName, out indx))
doubles[indx] = ((LSL_Float)o);
doubles[indx] = lfo;
continue;
}
if (otype == typeof(LSL_String))
if (o is LSL_String lso)
{
if (stringNames.TryGetValue(varName, out indx))
{
strings[indx] = ((LSL_String)o);
heapsz += ((LSL_String)o).Length;
strings[indx] = lso;
heapsz += lso.Length;
}
continue;
}
if (otype == typeof(LSL_Rotation))
if (o is LSL_Rotation lro)
{
if (rotationNames.TryGetValue(varName, out indx))
rotations[indx] = ((LSL_Rotation)o);
rotations[indx] = lro;
continue;
}
if (otype == typeof(LSL_Vector))
if (o is LSL_Vector lvo)
{
if (vectorNames.TryGetValue(varName, out indx))
vectors[indx] = ((LSL_Vector)o);
vectors[indx] = lvo;
continue;
}
if (otype == typeof(LSL_Key))
if (o is LSL_Key lko)
{
if (stringNames.TryGetValue(varName, out indx))
{
strings[indx] = ((LSL_Key)o);
heapsz += ((LSL_String)o).Length;
strings[indx] = lko;
heapsz += lko.Length;
}
continue;
}
if (otype == typeof(UUID))
if (o is UUID uo)
{
if (stringNames.TryGetValue(varName, out indx))
{
LSL_String id = ((UUID)o).ToString();
strings[indx] = (id);
LSL_String id = uo.ToString();
strings[indx] = id;
heapsz += id.Length;
}
continue;
}
if (otype == typeof(LSL_List))
if (o is LSL_List llo)
{
if (listNames.TryGetValue(varName, out indx))
{
LSL_List lo = (LSL_List)o;
lists[indx] = (lo);
heapsz += lo.Size;
lists[indx] = (llo);
heapsz += llo.Size;
}
continue;
}