aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs
diff options
context:
space:
mode:
authorUbitUmarov2015-10-20 19:00:26 +0100
committerUbitUmarov2015-10-20 19:00:26 +0100
commit0045398324debd035c6b3c362a82497852585807 (patch)
tree2fef86b777913a9cc0c1803cadb35b1e01663941 /OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs
parent add axis locks to sop serializer. Now they are also saved to inventory (diff)
downloadopensim-SC-0045398324debd035c6b3c362a82497852585807.zip
opensim-SC-0045398324debd035c6b3c362a82497852585807.tar.gz
opensim-SC-0045398324debd035c6b3c362a82497852585807.tar.bz2
opensim-SC-0045398324debd035c6b3c362a82497852585807.tar.xz
move ugly convertion of axis locks 3 bit flags to a wasted vector3 down to PhysicsActor. Let engines use LockAngularMotion with either Vector3 argument or byte
Diffstat (limited to 'OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs')
-rw-r--r--OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs15
1 files changed, 14 insertions, 1 deletions
diff --git a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs
index a5c2c0e..83f8af8 100644
--- a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs
+++ b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs
@@ -230,7 +230,20 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
230 230
231 public abstract void delink(); 231 public abstract void delink();
232 232
233 public abstract void LockAngularMotion(Vector3 axis); 233 public virtual void LockAngularMotion(Vector3 axis) { }
234
235 public virtual void LockAngularMotion(byte axislocks)
236 {
237 Vector3 lrRotationAxis = Vector3.One;
238 if((axislocks & 0x02) != 0 )
239 lrRotationAxis.X = 0f;
240 if((axislocks & 0x04) != 0 )
241 lrRotationAxis.Y = 0f;
242 if((axislocks & 0x08) != 0 )
243 lrRotationAxis.Z = 0f;
244
245 LockAngularMotion(lrRotationAxis);
246 }
234 247
235 public virtual void RequestPhysicsterseUpdate() 248 public virtual void RequestPhysicsterseUpdate()
236 { 249 {