diff options
Diffstat (limited to 'OpenSim/Region/Environment')
6 files changed, 23 insertions, 23 deletions
diff --git a/OpenSim/Region/Environment/Modules/ChatModule.cs b/OpenSim/Region/Environment/Modules/ChatModule.cs index c93804f..8af7b49 100644 --- a/OpenSim/Region/Environment/Modules/ChatModule.cs +++ b/OpenSim/Region/Environment/Modules/ChatModule.cs | |||
@@ -192,7 +192,7 @@ namespace OpenSim.Region.Environment.Modules | |||
192 | scene.RegionInfo.RegionLocY * 256, | 192 | scene.RegionInfo.RegionLocY * 256, |
193 | 0); | 193 | 0); |
194 | dis = | 194 | dis = |
195 | Math.Abs((int)avatarRegionPos.GetDistanceTo(fromRegionPos)); | 195 | Math.Abs((int) Util.GetDistanceTo(avatarRegionPos, fromRegionPos)); |
196 | 196 | ||
197 | switch (e.Type) | 197 | switch (e.Type) |
198 | { | 198 | { |
diff --git a/OpenSim/Region/Environment/Modules/WorldCommModule.cs b/OpenSim/Region/Environment/Modules/WorldCommModule.cs index a31b484..0dad998 100644 --- a/OpenSim/Region/Environment/Modules/WorldCommModule.cs +++ b/OpenSim/Region/Environment/Modules/WorldCommModule.cs | |||
@@ -135,7 +135,7 @@ namespace OpenSim.Region.Environment.Modules | |||
135 | { | 135 | { |
136 | m_listenerManager.Remove(handle); | 136 | m_listenerManager.Remove(handle); |
137 | } | 137 | } |
138 | 138 | ||
139 | // This method scans nearby objects and determines if they are listeners, | 139 | // This method scans nearby objects and determines if they are listeners, |
140 | // and if so if this message fits the filter. If it does, then | 140 | // and if so if this message fits the filter. If it does, then |
141 | // enqueue the message for delivery to the objects listen event handler. | 141 | // enqueue the message for delivery to the objects listen event handler. |
@@ -171,9 +171,9 @@ namespace OpenSim.Region.Environment.Modules | |||
171 | double dis = 0; | 171 | double dis = 0; |
172 | 172 | ||
173 | if (source != null) | 173 | if (source != null) |
174 | dis = sPart.AbsolutePosition.GetDistanceTo(source.AbsolutePosition); | 174 | dis = Util.GetDistanceTo(sPart.AbsolutePosition, source.AbsolutePosition); |
175 | else | 175 | else |
176 | dis = sPart.AbsolutePosition.GetDistanceTo(avatar.AbsolutePosition); | 176 | dis = Util.GetDistanceTo(sPart.AbsolutePosition, avatar.AbsolutePosition); |
177 | 177 | ||
178 | switch (type) | 178 | switch (type) |
179 | { | 179 | { |
@@ -490,4 +490,4 @@ namespace OpenSim.Region.Environment.Modules | |||
490 | return m_id; | 490 | return m_id; |
491 | } | 491 | } |
492 | } | 492 | } |
493 | } \ No newline at end of file | 493 | } |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 6c8b3bf..ac504e1 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -144,7 +144,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
144 | 144 | ||
145 | if (transactions != null) | 145 | if (transactions != null) |
146 | { | 146 | { |
147 | LLUUID assetID = transactionID.Combine(remoteClient.SecureSessionId); | 147 | LLUUID assetID = libsecondlife.LLUUID.Combine(transactionID, remoteClient.SecureSessionId); |
148 | AssetBase asset = AssetCache.GetAsset(assetID); | 148 | AssetBase asset = AssetCache.GetAsset(assetID); |
149 | 149 | ||
150 | if (asset == null) | 150 | if (asset == null) |
@@ -432,7 +432,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
432 | ((SceneObjectGroup) selectedEnt).GetPartName(selectedEnt.LocalId), | 432 | ((SceneObjectGroup) selectedEnt).GetPartName(selectedEnt.LocalId), |
433 | ((SceneObjectGroup) selectedEnt).GetPartDescription(selectedEnt.LocalId), | 433 | ((SceneObjectGroup) selectedEnt).GetPartDescription(selectedEnt.LocalId), |
434 | (sbyte) InventoryType.Object, | 434 | (sbyte) InventoryType.Object, |
435 | (sbyte) AssetType.Object, // TODO: after libSL r1357, this becomes AssetType.Primitive | 435 | (sbyte) AssetType.Primitive, |
436 | Helpers.StringToField(sceneObjectXml)); | 436 | Helpers.StringToField(sceneObjectXml)); |
437 | AssetCache.AddAsset(asset); | 437 | AssetCache.AddAsset(asset); |
438 | 438 | ||
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index bcee5c7..89e2f0d 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -675,7 +675,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
675 | /// </summary> | 675 | /// </summary> |
676 | public override void Update() | 676 | public override void Update() |
677 | { | 677 | { |
678 | if (lastPhysGroupPos.GetDistanceTo(AbsolutePosition) > 0.02) | 678 | if (Util.GetDistanceTo(lastPhysGroupPos, AbsolutePosition) > 0.02) |
679 | { | 679 | { |
680 | foreach (SceneObjectPart part in m_parts.Values) | 680 | foreach (SceneObjectPart part in m_parts.Values) |
681 | { | 681 | { |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index bf02e8d..05a59a2 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -749,7 +749,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
749 | 749 | ||
750 | LLVector3 distanceConvert1 = new LLVector3(iray.Origin.x, iray.Origin.y, iray.Origin.z); | 750 | LLVector3 distanceConvert1 = new LLVector3(iray.Origin.x, iray.Origin.y, iray.Origin.z); |
751 | LLVector3 distanceConvert2 = new LLVector3(ipoint.x, ipoint.y, ipoint.z); | 751 | LLVector3 distanceConvert2 = new LLVector3(ipoint.x, ipoint.y, ipoint.z); |
752 | float distance = (float)distanceConvert1.GetDistanceTo(distanceConvert2); | 752 | float distance = (float)Util.GetDistanceTo(distanceConvert1, distanceConvert2); |
753 | 753 | ||
754 | returnresult.distance = distance; | 754 | returnresult.distance = distance; |
755 | 755 | ||
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index b8a2555..66872fa 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -93,12 +93,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
93 | 93 | ||
94 | private enum Dir_ControlFlags | 94 | private enum Dir_ControlFlags |
95 | { | 95 | { |
96 | DIR_CONTROL_FLAG_FOWARD = MainAvatar.ControlFlags.AGENT_CONTROL_AT_POS, | 96 | DIR_CONTROL_FLAG_FOWARD = AgentManager.ControlFlags.AGENT_CONTROL_AT_POS, |
97 | DIR_CONTROL_FLAG_BACK = MainAvatar.ControlFlags.AGENT_CONTROL_AT_NEG, | 97 | DIR_CONTROL_FLAG_BACK = AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG, |
98 | DIR_CONTROL_FLAG_LEFT = MainAvatar.ControlFlags.AGENT_CONTROL_LEFT_POS, | 98 | DIR_CONTROL_FLAG_LEFT = AgentManager.ControlFlags.AGENT_CONTROL_LEFT_POS, |
99 | DIR_CONTROL_FLAG_RIGHT = MainAvatar.ControlFlags.AGENT_CONTROL_LEFT_NEG, | 99 | DIR_CONTROL_FLAG_RIGHT = AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG, |
100 | DIR_CONTROL_FLAG_UP = MainAvatar.ControlFlags.AGENT_CONTROL_UP_POS, | 100 | DIR_CONTROL_FLAG_UP = AgentManager.ControlFlags.AGENT_CONTROL_UP_POS, |
101 | DIR_CONTROL_FLAG_DOWN = MainAvatar.ControlFlags.AGENT_CONTROL_UP_NEG | 101 | DIR_CONTROL_FLAG_DOWN = AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG |
102 | } | 102 | } |
103 | 103 | ||
104 | /// <summary> | 104 | /// <summary> |
@@ -609,7 +609,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
609 | //MainLog.Instance.Verbose("CAMERA", "AtAxis:" + m_CameraAtAxis.ToString() + " Center:" + m_CameraCenter.ToString() + " LeftAxis:" + m_CameraLeftAxis.ToString() + " UpAxis:" + m_CameraUpAxis.ToString() + " Far:" + m_CameraFar); | 609 | //MainLog.Instance.Verbose("CAMERA", "AtAxis:" + m_CameraAtAxis.ToString() + " Center:" + m_CameraCenter.ToString() + " LeftAxis:" + m_CameraLeftAxis.ToString() + " UpAxis:" + m_CameraUpAxis.ToString() + " Far:" + m_CameraFar); |
610 | 610 | ||
611 | 611 | ||
612 | if ((flags & (uint) MainAvatar.ControlFlags.AGENT_CONTROL_STAND_UP) != 0) | 612 | if ((flags & (uint) AgentManager.ControlFlags.AGENT_CONTROL_STAND_UP) != 0) |
613 | { | 613 | { |
614 | StandUp(); | 614 | StandUp(); |
615 | } | 615 | } |
@@ -630,7 +630,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
630 | Quaternion q = new Quaternion(bodyRotation.W, bodyRotation.X, bodyRotation.Y, bodyRotation.Z); | 630 | Quaternion q = new Quaternion(bodyRotation.W, bodyRotation.X, bodyRotation.Y, bodyRotation.Z); |
631 | bool oldflying = PhysicsActor.Flying; | 631 | bool oldflying = PhysicsActor.Flying; |
632 | 632 | ||
633 | PhysicsActor.Flying = ((flags & (uint)MainAvatar.ControlFlags.AGENT_CONTROL_FLY) != 0); | 633 | PhysicsActor.Flying = ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0); |
634 | if (PhysicsActor.Flying != oldflying) | 634 | if (PhysicsActor.Flying != oldflying) |
635 | { | 635 | { |
636 | update_movementflag = true; | 636 | update_movementflag = true; |
@@ -796,7 +796,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
796 | } | 796 | } |
797 | else | 797 | else |
798 | { | 798 | { |
799 | if (((m_movementflag & (uint) MainAvatar.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) && | 799 | if (((m_movementflag & (uint) AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) && |
800 | PhysicsActor.IsColliding) | 800 | PhysicsActor.IsColliding) |
801 | { | 801 | { |
802 | SendAnimPack(Animations.AnimsLLUUID["CROUCHWALK"], 1); | 802 | SendAnimPack(Animations.AnimsLLUUID["CROUCHWALK"], 1); |
@@ -807,7 +807,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
807 | { | 807 | { |
808 | SendAnimPack(Animations.AnimsLLUUID["FALLDOWN"], 1); | 808 | SendAnimPack(Animations.AnimsLLUUID["FALLDOWN"], 1); |
809 | } | 809 | } |
810 | else if (!PhysicsActor.IsColliding && Velocity.Z > 0 && (m_movementflag & (uint) MainAvatar.ControlFlags.AGENT_CONTROL_UP_POS) != 0) | 810 | else if (!PhysicsActor.IsColliding && Velocity.Z > 0 && (m_movementflag & (uint) AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) != 0) |
811 | { | 811 | { |
812 | SendAnimPack(Animations.AnimsLLUUID["JUMP"], 1); | 812 | SendAnimPack(Animations.AnimsLLUUID["JUMP"], 1); |
813 | } | 813 | } |
@@ -839,7 +839,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
839 | } | 839 | } |
840 | else | 840 | else |
841 | { | 841 | { |
842 | if (((m_movementflag & (uint) MainAvatar.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) && | 842 | if (((m_movementflag & (uint) AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) && |
843 | PhysicsActor.IsColliding) | 843 | PhysicsActor.IsColliding) |
844 | { | 844 | { |
845 | SendAnimPack(Animations.AnimsLLUUID["CROUCH"], 1); | 845 | SendAnimPack(Animations.AnimsLLUUID["CROUCH"], 1); |
@@ -854,7 +854,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
854 | { | 854 | { |
855 | SendAnimPack(Animations.AnimsLLUUID["FALLDOWN"], 1); | 855 | SendAnimPack(Animations.AnimsLLUUID["FALLDOWN"], 1); |
856 | } | 856 | } |
857 | else if (!PhysicsActor.IsColliding && Velocity.Z > 0 && !m_physicsActor.Flying && (m_movementflag & (uint) MainAvatar.ControlFlags.AGENT_CONTROL_UP_POS) != 0) | 857 | else if (!PhysicsActor.IsColliding && Velocity.Z > 0 && !m_physicsActor.Flying && (m_movementflag & (uint) AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) != 0) |
858 | { | 858 | { |
859 | SendAnimPack(Animations.AnimsLLUUID["JUMP"], 1); | 859 | SendAnimPack(Animations.AnimsLLUUID["JUMP"], 1); |
860 | } | 860 | } |
@@ -955,7 +955,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
955 | m_updateCount = 0; | 955 | m_updateCount = 0; |
956 | } | 956 | } |
957 | } | 957 | } |
958 | else if (lastPhysPos.GetDistanceTo(AbsolutePosition) > 0.02) // physics-related movement | 958 | else if (Util.GetDistanceTo(lastPhysPos, AbsolutePosition) > 0.02) // physics-related movement |
959 | { | 959 | { |
960 | SendTerseUpdateToAllClients(); | 960 | SendTerseUpdateToAllClients(); |
961 | m_updateCount = 0; | 961 | m_updateCount = 0; |
@@ -1123,7 +1123,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1123 | 1123 | ||
1124 | protected void CheckForSignificantMovement() | 1124 | protected void CheckForSignificantMovement() |
1125 | { | 1125 | { |
1126 | if (AbsolutePosition.GetDistanceTo(posLastSignificantMove) > 0.02) | 1126 | if (Util.GetDistanceTo(AbsolutePosition, posLastSignificantMove) > 0.02) |
1127 | { | 1127 | { |
1128 | posLastSignificantMove = AbsolutePosition; | 1128 | posLastSignificantMove = AbsolutePosition; |
1129 | if (OnSignificantClientMovement != null) | 1129 | if (OnSignificantClientMovement != null) |