From 8ea4553d39749c9e5a5f1f8d49b9fa192c250d47 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Tue, 28 Oct 2008 10:14:44 +0000 Subject: Mantis #2486 Thank you, nlin, for a patch that fixes serialization of vector and quaternion types for script state. --- OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs index 5836cc1..6e56231 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs @@ -146,7 +146,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase field.FieldType == typeof(Single) || field.FieldType == typeof(String) || field.FieldType == typeof(Byte) || - field.FieldType == typeof(short)) + field.FieldType == typeof(short) || + field.FieldType == typeof(LSL_Types.Vector3) || + field.FieldType == typeof(LSL_Types.Quaternion)) { vars[field.Name] = field.GetValue(this); } @@ -177,7 +179,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase m_Fields[var.Key].FieldType == typeof(Single) || m_Fields[var.Key].FieldType == typeof(String) || m_Fields[var.Key].FieldType == typeof(Byte) || - m_Fields[var.Key].FieldType == typeof(short)) + m_Fields[var.Key].FieldType == typeof(short) || + m_Fields[var.Key].FieldType == typeof(LSL_Types.Vector3) || + m_Fields[var.Key].FieldType == typeof(LSL_Types.Quaternion) + ) { m_Fields[var.Key].SetValue(this, var.Value); } -- cgit v1.1