Thank you, nlin, for a patch that fixes serialization of vector and
quaternion types for script state.
0.6.0-stable
Melanie Thielker 2008-10-28 10:14:44 +00:00
parent ae5d92a167
commit 8ea4553d39
1 changed files with 7 additions and 2 deletions

View File

@ -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);
}