aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSMaterials.cs
diff options
context:
space:
mode:
authorMelanie2013-03-31 20:27:46 +0200
committerMelanie2013-03-31 20:27:46 +0200
commitf142e1f3941165f29f390132f53fc5e88b40c883 (patch)
tree1f1ddd276fd940f86aa88b61692ecd68a0d2084a /OpenSim/Region/Physics/BulletSPlugin/BSMaterials.cs
parentExport permission, part two. Setting export perms for textures and clothing w... (diff)
parentMerge branch 'master' into careminster (diff)
downloadopensim-SC-f142e1f3941165f29f390132f53fc5e88b40c883.zip
opensim-SC-f142e1f3941165f29f390132f53fc5e88b40c883.tar.gz
opensim-SC-f142e1f3941165f29f390132f53fc5e88b40c883.tar.bz2
opensim-SC-f142e1f3941165f29f390132f53fc5e88b40c883.tar.xz
Merge branch 'master' of ssh://3dhosting.de/var/git/careminster
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSMaterials.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSMaterials.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSMaterials.cs b/OpenSim/Region/Physics/BulletSPlugin/BSMaterials.cs
index 92d62ff..ee77d6e 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSMaterials.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSMaterials.cs
@@ -180,11 +180,14 @@ public static class BSMaterials
180 // Use reflection to set the value in the attribute structure. 180 // Use reflection to set the value in the attribute structure.
181 private static void SetAttributeValue(int matType, string attribName, float val) 181 private static void SetAttributeValue(int matType, string attribName, float val)
182 { 182 {
183 // Get the current attribute values for this material
183 MaterialAttributes thisAttrib = Attributes[matType]; 184 MaterialAttributes thisAttrib = Attributes[matType];
185 // Find the field for the passed attribute name (eg, find field named 'friction')
184 FieldInfo fieldInfo = thisAttrib.GetType().GetField(attribName.ToLower()); 186 FieldInfo fieldInfo = thisAttrib.GetType().GetField(attribName.ToLower());
185 if (fieldInfo != null) 187 if (fieldInfo != null)
186 { 188 {
187 fieldInfo.SetValue(thisAttrib, val); 189 fieldInfo.SetValue(thisAttrib, val);
190 // Copy new attributes back to array -- since MaterialAttributes is 'struct', passed by value, not reference.
188 Attributes[matType] = thisAttrib; 191 Attributes[matType] = thisAttrib;
189 } 192 }
190 } 193 }