diff options
author | Melanie | 2012-04-29 01:33:40 +0200 |
---|---|---|
committer | Melanie | 2012-04-29 01:33:40 +0200 |
commit | 174fa4a70f2622c65ef8d9488765b71c1fad345e (patch) | |
tree | 42e4de081e8ab4f673235471a3b5daf626a8828b /OpenSim/Region/Framework/Scenes/ScenePresence.cs | |
parent | Merge branch 'master' into careminster (diff) | |
parent | remove repeated set of group rotation to physics (diff) | |
download | opensim-SC_OLD-174fa4a70f2622c65ef8d9488765b71c1fad345e.zip opensim-SC_OLD-174fa4a70f2622c65ef8d9488765b71c1fad345e.tar.gz opensim-SC_OLD-174fa4a70f2622c65ef8d9488765b71c1fad345e.tar.bz2 opensim-SC_OLD-174fa4a70f2622c65ef8d9488765b71c1fad345e.tar.xz |
Merge branch 'avination'
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 311ba6a..1e717d9 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1088,6 +1088,41 @@ namespace OpenSim.Region.Framework.Scenes | |||
1088 | SendTerseUpdateToAllClients(); | 1088 | SendTerseUpdateToAllClients(); |
1089 | } | 1089 | } |
1090 | 1090 | ||
1091 | public void avnLocalTeleport(Vector3 newpos, Vector3? newvel, bool rotateToVelXY) | ||
1092 | { | ||
1093 | CheckLandingPoint(ref newpos); | ||
1094 | AbsolutePosition = newpos; | ||
1095 | |||
1096 | if (newvel.HasValue) | ||
1097 | { | ||
1098 | if ((Vector3)newvel == Vector3.Zero) | ||
1099 | { | ||
1100 | if (PhysicsActor != null) | ||
1101 | PhysicsActor.SetMomentum(Vector3.Zero); | ||
1102 | m_velocity = Vector3.Zero; | ||
1103 | } | ||
1104 | else | ||
1105 | { | ||
1106 | if (PhysicsActor != null) | ||
1107 | PhysicsActor.SetMomentum((Vector3)newvel); | ||
1108 | m_velocity = (Vector3)newvel; | ||
1109 | |||
1110 | if (rotateToVelXY) | ||
1111 | { | ||
1112 | Vector3 lookAt = (Vector3)newvel; | ||
1113 | lookAt.Z = 0; | ||
1114 | lookAt.Normalize(); | ||
1115 | ControllingClient.SendLocalTeleport(newpos, lookAt, (uint)TeleportFlags.ViaLocation); | ||
1116 | return; | ||
1117 | } | ||
1118 | } | ||
1119 | } | ||
1120 | |||
1121 | SendTerseUpdateToAllClients(); | ||
1122 | } | ||
1123 | |||
1124 | |||
1125 | |||
1091 | public void StopFlying() | 1126 | public void StopFlying() |
1092 | { | 1127 | { |
1093 | ControllingClient.StopFlying(this); | 1128 | ControllingClient.StopFlying(this); |