aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authorUbitUmarov2012-04-19 01:52:23 +0100
committerUbitUmarov2012-04-19 01:52:23 +0100
commit9b02e1cf4a32fc75c3ec04e1023e3739a0767355 (patch)
treea0b4b9c0d3232796b0fa21e8d6e4bd0407e0f4b5 /OpenSim/Region/Framework/Scenes/ScenePresence.cs
parentubitODE still retouching character pid (diff)
parentAllow setting a specific target velocity on TeleportWithMomentum (diff)
downloadopensim-SC-9b02e1cf4a32fc75c3ec04e1023e3739a0767355.zip
opensim-SC-9b02e1cf4a32fc75c3ec04e1023e3739a0767355.tar.gz
opensim-SC-9b02e1cf4a32fc75c3ec04e1023e3739a0767355.tar.bz2
opensim-SC-9b02e1cf4a32fc75c3ec04e1023e3739a0767355.tar.xz
Merge branch 'master' of ssh://3dhosting.de/var/git/careminster into ubitwork
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 8ac09e9..1211792 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1076,6 +1076,11 @@ namespace OpenSim.Region.Framework.Scenes
1076 1076
1077 public void TeleportWithMomentum(Vector3 pos) 1077 public void TeleportWithMomentum(Vector3 pos)
1078 { 1078 {
1079 TeleportWithMomentum(pos, null);
1080 }
1081
1082 public void TeleportWithMomentum(Vector3 pos, Vector3? v)
1083 {
1079 bool isFlying = Flying; 1084 bool isFlying = Flying;
1080 Vector3 vel = Velocity; 1085 Vector3 vel = Velocity;
1081 RemoveFromPhysicalScene(); 1086 RemoveFromPhysicalScene();
@@ -1083,7 +1088,12 @@ namespace OpenSim.Region.Framework.Scenes
1083 AbsolutePosition = pos; 1088 AbsolutePosition = pos;
1084 AddToPhysicalScene(isFlying); 1089 AddToPhysicalScene(isFlying);
1085 if (PhysicsActor != null) 1090 if (PhysicsActor != null)
1086 PhysicsActor.SetMomentum(vel); 1091 {
1092 if (v.HasValue)
1093 PhysicsActor.SetMomentum((Vector3)v);
1094 else
1095 PhysicsActor.SetMomentum(vel);
1096 }
1087 1097
1088 SendTerseUpdateToAllClients(); 1098 SendTerseUpdateToAllClients();
1089 } 1099 }