diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs index b32fce6..25f654e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs | |||
@@ -138,7 +138,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
138 | c.Data = data; | 138 | c.Data = data; |
139 | vars[field.Name] = c; | 139 | vars[field.Name] = c; |
140 | } | 140 | } |
141 | else if(field.FieldType == typeof(LSL_Types.LSLInteger) || | 141 | else if (field.FieldType == typeof(LSL_Types.LSLInteger) || |
142 | field.FieldType == typeof(LSL_Types.LSLString) || | 142 | field.FieldType == typeof(LSL_Types.LSLString) || |
143 | field.FieldType == typeof(LSL_Types.LSLFloat) || | 143 | field.FieldType == typeof(LSL_Types.LSLFloat) || |
144 | field.FieldType == typeof(Int32) || | 144 | field.FieldType == typeof(Int32) || |
@@ -146,7 +146,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
146 | field.FieldType == typeof(Single) || | 146 | field.FieldType == typeof(Single) || |
147 | field.FieldType == typeof(String) || | 147 | field.FieldType == typeof(String) || |
148 | field.FieldType == typeof(Byte) || | 148 | field.FieldType == typeof(Byte) || |
149 | field.FieldType == typeof(Short)) | 149 | field.FieldType == typeof(short)) |
150 | { | 150 | { |
151 | vars[field.Name] = field.GetValue(this); | 151 | vars[field.Name] = field.GetValue(this); |
152 | } | 152 | } |
@@ -159,6 +159,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
159 | { | 159 | { |
160 | foreach (KeyValuePair<string, object> var in vars) | 160 | foreach (KeyValuePair<string, object> var in vars) |
161 | { | 161 | { |
162 | FieldInfo field = (FieldInfo)var.Value; | ||
162 | if (m_Fields.ContainsKey(var.Key)) | 163 | if (m_Fields.ContainsKey(var.Key)) |
163 | { | 164 | { |
164 | if (m_Fields[var.Key].FieldType == typeof(LSL_Types.list)) | 165 | if (m_Fields[var.Key].FieldType == typeof(LSL_Types.list)) |
@@ -177,7 +178,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
177 | field.FieldType == typeof(Single) || | 178 | field.FieldType == typeof(Single) || |
178 | field.FieldType == typeof(String) || | 179 | field.FieldType == typeof(String) || |
179 | field.FieldType == typeof(Byte) || | 180 | field.FieldType == typeof(Byte) || |
180 | field.FieldType == typeof(Short)) | 181 | field.FieldType == typeof(short)) |
181 | { | 182 | { |
182 | m_Fields[var.Key].SetValue(this, var.Value); | 183 | m_Fields[var.Key].SetValue(this, var.Value); |
183 | } | 184 | } |