aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorUbitUmarov2012-07-06 17:13:11 +0100
committerUbitUmarov2012-07-06 17:13:11 +0100
commitce7864632bf239a44321cc5806a95a78e0f259ed (patch)
tree6fb42b3d2fed041133ee5bdcc11ba92d65330f4a /OpenSim/Region/Framework/Scenes
parentChanged GetTexture error code RequestedRangeNotSatisfiable to NotFound, since... (diff)
downloadopensim-SC_OLD-ce7864632bf239a44321cc5806a95a78e0f259ed.zip
opensim-SC_OLD-ce7864632bf239a44321cc5806a95a78e0f259ed.tar.gz
opensim-SC_OLD-ce7864632bf239a44321cc5806a95a78e0f259ed.tar.bz2
opensim-SC_OLD-ce7864632bf239a44321cc5806a95a78e0f259ed.tar.xz
added llSetVelocity. will refuse to work on vehicles and on attachments ( this last may need fix) added also some code for llSetAngularVelocity but not working still
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs28
1 files changed, 28 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index a48605d..ed32adc 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1845,6 +1845,34 @@ namespace OpenSim.Region.Framework.Scenes
1845 } 1845 }
1846 } 1846 }
1847 1847
1848// SetVelocity for LSL llSetVelocity.. may need revision if having other uses in future
1849 public void SetVelocity(Vector3 pVel, bool localGlobalTF)
1850 {
1851 if (ParentGroup == null || ParentGroup.IsDeleted)
1852 return;
1853
1854 if (ParentGroup.IsAttachment)
1855 return; // don't work on attachments (for now ??)
1856
1857 SceneObjectPart root = ParentGroup.RootPart;
1858
1859 if (root.VehicleType != (int)Vehicle.TYPE_NONE) // don't mess with vehicles
1860 return;
1861
1862 PhysicsActor pa = root.PhysActor;
1863
1864 if (pa == null || !pa.IsPhysical)
1865 return;
1866
1867 if (localGlobalTF)
1868 {
1869 pVel = pVel * GetWorldRotation();
1870 }
1871
1872 ParentGroup.Velocity = pVel;
1873 }
1874
1875
1848 /// <summary> 1876 /// <summary>
1849 /// hook to the physics scene to apply angular impulse 1877 /// hook to the physics scene to apply angular impulse
1850 /// This is sent up to the group, which then finds the root prim 1878 /// This is sent up to the group, which then finds the root prim