aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-09-06 07:52:41 +0000
committerTeravus Ovares2008-09-06 07:52:41 +0000
commit7d89e122930be39e84a6d174548fa2d12ac0484a (patch)
treee5aa5752f988a9aba2a969f49e5e208985eda80c /OpenSim/Region/Environment/Scenes/ScenePresence.cs
parent* minor: speculatively try a change to bamboo.build to see if this generates ... (diff)
downloadopensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.zip
opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.gz
opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.bz2
opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.xz
* This is the fabled LibOMV update with all of the libOMV types from JHurliman
* This is a HUGE OMG update and will definitely have unknown side effects.. so this is really only for the strong hearted at this point. Regular people should let the dust settle. * This has been tested to work with most basic functions. However.. make sure you back up 'everything' before using this. It's that big! * Essentially we're back at square 1 in the testing phase.. so lets identify things that broke.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs398
1 files changed, 193 insertions, 205 deletions
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 1694613..e51f1be 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -30,9 +30,8 @@ using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using System.Runtime.Serialization; 31using System.Runtime.Serialization;
32using System.Security.Permissions; 32using System.Security.Permissions;
33using Axiom.Math; 33using OpenMetaverse;
34using libsecondlife; 34using OpenMetaverse.Packets;
35using libsecondlife.Packets;
36using log4net; 35using log4net;
37using OpenSim.Framework; 36using OpenSim.Framework;
38using OpenSim.Framework.Communications.Cache; 37using OpenSim.Framework.Communications.Cache;
@@ -60,7 +59,7 @@ namespace OpenSim.Region.Environment.Scenes
60 59
61 struct ScriptControllers 60 struct ScriptControllers
62 { 61 {
63 public LLUUID itemID; 62 public UUID itemID;
64 public uint objID; 63 public uint objID;
65 public ScriptControlled ignoreControls; 64 public ScriptControlled ignoreControls;
66 public ScriptControlled eventControls; 65 public ScriptControlled eventControls;
@@ -78,9 +77,9 @@ namespace OpenSim.Region.Environment.Scenes
78 77
79 public static byte[] DefaultTexture; 78 public static byte[] DefaultTexture;
80 79
81 public LLUUID currentParcelUUID = LLUUID.Zero; 80 public UUID currentParcelUUID = UUID.Zero;
82 private AnimationSet m_animations = new AnimationSet(); 81 private AnimationSet m_animations = new AnimationSet();
83 private Dictionary<LLUUID, ScriptControllers> scriptedcontrols = new Dictionary<LLUUID, ScriptControllers>(); 82 private Dictionary<UUID, ScriptControllers> scriptedcontrols = new Dictionary<UUID, ScriptControllers>();
84 private ScriptControlled IgnoredControls = ScriptControlled.CONTROL_ZERO; 83 private ScriptControlled IgnoredControls = ScriptControlled.CONTROL_ZERO;
85 private ScriptControlled LastCommands = ScriptControlled.CONTROL_ZERO; 84 private ScriptControlled LastCommands = ScriptControlled.CONTROL_ZERO;
86 private SceneObjectGroup proxyObjectGroup = null; 85 private SceneObjectGroup proxyObjectGroup = null;
@@ -94,11 +93,11 @@ namespace OpenSim.Region.Environment.Scenes
94 private readonly List<NewForce> m_forcesList = new List<NewForce>(); 93 private readonly List<NewForce> m_forcesList = new List<NewForce>();
95 private short m_updateCount = 0; 94 private short m_updateCount = 0;
96 private uint m_requestedSitTargetID = 0; 95 private uint m_requestedSitTargetID = 0;
97 private LLUUID m_requestedSitTargetUUID = LLUUID.Zero; 96 private UUID m_requestedSitTargetUUID = UUID.Zero;
98 97
99 private LLVector3 m_requestedSitOffset = new LLVector3(); 98 private Vector3 m_requestedSitOffset = new Vector3();
100 99
101 private LLVector3 m_LastFinitePos = new LLVector3(); 100 private Vector3 m_LastFinitePos = new Vector3();
102 101
103 private float m_sitAvatarHeight = 2.0f; 102 private float m_sitAvatarHeight = 2.0f;
104 103
@@ -108,14 +107,14 @@ namespace OpenSim.Region.Environment.Scenes
108 // with varying parameters for sit target location, prim size, prim 107 // with varying parameters for sit target location, prim size, prim
109 // rotation, prim cut, prim twist, prim taper, and prim shear. See mantis 108 // rotation, prim cut, prim twist, prim taper, and prim shear. See mantis
110 // issue #1716 109 // issue #1716
111 private static readonly LLVector3 m_sitTargetCorrectionOffset = new LLVector3(0.1f, 0.0f, 0.3f); 110 private static readonly Vector3 m_sitTargetCorrectionOffset = new Vector3(0.1f, 0.0f, 0.3f);
112 private float m_godlevel = 0; 111 private float m_godlevel = 0;
113 112
114 private bool m_attachmentsTransported = false; 113 private bool m_attachmentsTransported = false;
115 114
116 private bool m_invulnerable = true; 115 private bool m_invulnerable = true;
117 116
118 private LLVector3 m_LastChildAgentUpdatePosition = new LLVector3(); 117 private Vector3 m_LastChildAgentUpdatePosition = new Vector3();
119 118
120 private int m_perfMonMS = 0; 119 private int m_perfMonMS = 0;
121 120
@@ -132,7 +131,7 @@ namespace OpenSim.Region.Environment.Scenes
132 private bool m_newCoarseLocations = true; 131 private bool m_newCoarseLocations = true;
133 private float m_health = 100f; 132 private float m_health = 100f;
134 133
135 private LLVector3 m_lastVelocity = LLVector3.Zero; 134 private Vector3 m_lastVelocity = Vector3.Zero;
136 135
137 // Default AV Height 136 // Default AV Height
138 private float m_avHeight = 127.0f; 137 private float m_avHeight = 127.0f;
@@ -141,25 +140,25 @@ namespace OpenSim.Region.Environment.Scenes
141 protected ulong crossingFromRegion = 0; 140 protected ulong crossingFromRegion = 0;
142 141
143 private readonly Vector3[] Dir_Vectors = new Vector3[6]; 142 private readonly Vector3[] Dir_Vectors = new Vector3[6];
144 private LLVector3 lastPhysPos = new LLVector3(); 143 private Vector3 lastPhysPos = Vector3.Zero;
145 144
146 // Position of agent's camera in world (region cordinates) 145 // Position of agent's camera in world (region cordinates)
147 protected Vector3 m_CameraCenter = new Vector3(0, 0, 0); 146 protected Vector3 m_CameraCenter = Vector3.Zero;
148 147
149 // Use these three vectors to figure out what the agent is looking at 148 // Use these three vectors to figure out what the agent is looking at
150 // Convert it to a Matrix and/or Quaternion 149 // Convert it to a Matrix and/or Quaternion
151 protected Vector3 m_CameraAtAxis = new Vector3(0, 0, 0); 150 protected Vector3 m_CameraAtAxis = Vector3.Zero;
152 protected Vector3 m_CameraLeftAxis = new Vector3(0, 0, 0); 151 protected Vector3 m_CameraLeftAxis = Vector3.Zero;
153 protected Vector3 m_CameraUpAxis = new Vector3(0, 0, 0); 152 protected Vector3 m_CameraUpAxis = Vector3.Zero;
154 private uint m_AgentControlFlags = (uint) 0; 153 private uint m_AgentControlFlags = 0;
155 private LLQuaternion m_headrotation = new LLQuaternion(); 154 private Quaternion m_headrotation = Quaternion.Identity;
156 private byte m_state = (byte) 0; 155 private byte m_state = 0;
157 156
158 //Reuse the LLVector3 instead of creating a new one on the UpdateMovement method 157 //Reuse the Vector3 instead of creating a new one on the UpdateMovement method
159 private LLVector3 movementvector = new LLVector3(); 158 private Vector3 movementvector = Vector3.Zero;
160 159
161 private bool m_autopilotMoving = false; 160 private bool m_autopilotMoving = false;
162 private LLVector3 m_autoPilotTarget = LLVector3.Zero; 161 private Vector3 m_autoPilotTarget = Vector3.Zero;
163 private bool m_sitAtAutoTarget = false; 162 private bool m_sitAtAutoTarget = false;
164 163
165 // Agent's Draw distance. 164 // Agent's Draw distance.
@@ -189,12 +188,12 @@ namespace OpenSim.Region.Environment.Scenes
189 /// <summary> 188 /// <summary>
190 /// Position at which a significant movement was made 189 /// Position at which a significant movement was made
191 /// </summary> 190 /// </summary>
192 private LLVector3 posLastSignificantMove = new LLVector3(); 191 private Vector3 posLastSignificantMove = new Vector3();
193 192
194 private UpdateQueue m_partsUpdateQueue = new UpdateQueue(); 193 private UpdateQueue m_partsUpdateQueue = new UpdateQueue();
195 private Queue<SceneObjectGroup> m_pendingObjects = null; 194 private Queue<SceneObjectGroup> m_pendingObjects = null;
196 195
197 private Dictionary<LLUUID, ScenePartUpdate> m_updateTimes = new Dictionary<LLUUID, ScenePartUpdate>(); 196 private Dictionary<UUID, ScenePartUpdate> m_updateTimes = new Dictionary<UUID, ScenePartUpdate>();
198 197
199 #region Properties 198 #region Properties
200 199
@@ -282,12 +281,12 @@ namespace OpenSim.Region.Environment.Scenes
282 set { m_controllingClient = value; } 281 set { m_controllingClient = value; }
283 } 282 }
284 283
285 protected LLVector3 m_parentPosition = new LLVector3(); 284 protected Vector3 m_parentPosition = new Vector3();
286 285
287 /// <summary> 286 /// <summary>
288 /// Absolute position of this avatar in 'region cordinates' 287 /// Absolute position of this avatar in 'region cordinates'
289 /// </summary> 288 /// </summary>
290 public override LLVector3 AbsolutePosition 289 public override Vector3 AbsolutePosition
291 { 290 {
292 get 291 get
293 { 292 {
@@ -318,14 +317,14 @@ namespace OpenSim.Region.Environment.Scenes
318 } 317 }
319 318
320 m_pos = value; 319 m_pos = value;
321 m_parentPosition=new LLVector3(0, 0, 0); 320 m_parentPosition=new Vector3(0, 0, 0);
322 } 321 }
323 } 322 }
324 323
325 /// <summary> 324 /// <summary>
326 /// Current Velocity of the avatar. 325 /// Current Velocity of the avatar.
327 /// </summary> 326 /// </summary>
328 public override LLVector3 Velocity 327 public override Vector3 Velocity
329 { 328 {
330 get 329 get
331 { 330 {
@@ -486,7 +485,7 @@ namespace OpenSim.Region.Environment.Scenes
486 // } 485 // }
487 } 486 }
488 487
489 public uint GenerateClientFlags(LLUUID ObjectID) 488 public uint GenerateClientFlags(UUID ObjectID)
490 { 489 {
491 return m_scene.ExternalChecks.ExternalChecksGenerateClientFlags(m_uuid, ObjectID); 490 return m_scene.ExternalChecks.ExternalChecksGenerateClientFlags(m_uuid, ObjectID);
492 } 491 }
@@ -609,7 +608,7 @@ namespace OpenSim.Region.Environment.Scenes
609 /// This is called when an agent teleports into a region, or if an 608 /// This is called when an agent teleports into a region, or if an
610 /// agent crosses into this region from a neighbor over the border 609 /// agent crosses into this region from a neighbor over the border
611 /// </summary> 610 /// </summary>
612 public void MakeRootAgent(LLVector3 pos, bool isFlying) 611 public void MakeRootAgent(Vector3 pos, bool isFlying)
613 { 612 {
614 m_scene.SetRootAgentScene(m_uuid); 613 m_scene.SetRootAgentScene(m_uuid);
615 614
@@ -625,7 +624,7 @@ namespace OpenSim.Region.Environment.Scenes
625 624
626 if (pos.X < 0 || pos.X > Constants.RegionSize || pos.Y < 0 || pos.Y > Constants.RegionSize || pos.Z < 0) 625 if (pos.X < 0 || pos.X > Constants.RegionSize || pos.Y < 0 || pos.Y > Constants.RegionSize || pos.Z < 0)
627 { 626 {
628 LLVector3 emergencyPos = new LLVector3(128, 128, 128); 627 Vector3 emergencyPos = new Vector3(128, 128, 128);
629 628
630 m_log.WarnFormat( 629 m_log.WarnFormat(
631 "[SCENE PRESENCE]: MakeRootAgent() was given an illegal position of {0} for avatar {1}, {2}. Substituting {3}", 630 "[SCENE PRESENCE]: MakeRootAgent() was given an illegal position of {0} for avatar {1}, {2}. Substituting {3}",
@@ -681,12 +680,12 @@ namespace OpenSim.Region.Environment.Scenes
681// "[SCENEPRESENCE]: Downgrading root agent {0}, {1} to a child agent in {2}", 680// "[SCENEPRESENCE]: Downgrading root agent {0}, {1} to a child agent in {2}",
682// Name, UUID, m_scene.RegionInfo.RegionName); 681// Name, UUID, m_scene.RegionInfo.RegionName);
683 682
684 Velocity = new LLVector3(0, 0, 0); 683 Velocity = new Vector3(0, 0, 0);
685 m_isChildAgent = true; 684 m_isChildAgent = true;
686 m_scene.SwapRootAgentCount(true); 685 m_scene.SwapRootAgentCount(true);
687 RemoveFromPhysicalScene(); 686 RemoveFromPhysicalScene();
688 m_scene.EventManager.TriggerOnMakeChildAgent(this); 687 m_scene.EventManager.TriggerOnMakeChildAgent(this);
689 //this.Pos = new LLVector3(128, 128, 70); 688 //this.Pos = new Vector3(128, 128, 70);
690 } 689 }
691 690
692 /// <summary> 691 /// <summary>
@@ -708,10 +707,10 @@ namespace OpenSim.Region.Environment.Scenes
708 /// 707 ///
709 /// </summary> 708 /// </summary>
710 /// <param name="pos"></param> 709 /// <param name="pos"></param>
711 public void Teleport(LLVector3 pos) 710 public void Teleport(Vector3 pos)
712 { 711 {
713 RemoveFromPhysicalScene(); 712 RemoveFromPhysicalScene();
714 Velocity = new LLVector3(0, 0, 0); 713 Velocity = new Vector3(0, 0, 0);
715 AbsolutePosition = pos; 714 AbsolutePosition = pos;
716 AddToPhysicalScene(); 715 AddToPhysicalScene();
717 SendTerseUpdateToAllClients(); 716 SendTerseUpdateToAllClients();
@@ -735,11 +734,11 @@ namespace OpenSim.Region.Environment.Scenes
735 734
736 if (m_avHeight != 127.0f) 735 if (m_avHeight != 127.0f)
737 { 736 {
738 AbsolutePosition = AbsolutePosition + new LLVector3(0, 0, (m_avHeight / 6)); 737 AbsolutePosition = AbsolutePosition + new Vector3(0, 0, (m_avHeight / 6f));
739 } 738 }
740 else 739 else
741 { 740 {
742 AbsolutePosition = AbsolutePosition + new LLVector3(0, 0, (1.56f / 6)); 741 AbsolutePosition = AbsolutePosition + new Vector3(0, 0, (1.56f / 6f));
743 } 742 }
744 TrySetMovementAnimation("LAND"); 743 TrySetMovementAnimation("LAND");
745 SendFullUpdateToAllClients(); 744 SendFullUpdateToAllClients();
@@ -788,10 +787,10 @@ namespace OpenSim.Region.Environment.Scenes
788 /// </summary> 787 /// </summary>
789 public void CompleteMovement() 788 public void CompleteMovement()
790 { 789 {
791 LLVector3 look = Velocity; 790 Vector3 look = Velocity;
792 if ((look.X == 0) && (look.Y == 0) && (look.Z == 0)) 791 if ((look.X == 0) && (look.Y == 0) && (look.Z == 0))
793 { 792 {
794 look = new LLVector3(0.99f, 0.042f, 0); 793 look = new Vector3(0.99f, 0.042f, 0);
795 } 794 }
796 795
797 m_controllingClient.MoveAgentIntoRegion(m_regionInfo, AbsolutePosition, look); 796 m_controllingClient.MoveAgentIntoRegion(m_regionInfo, AbsolutePosition, look);
@@ -846,7 +845,7 @@ namespace OpenSim.Region.Environment.Scenes
846 //ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y); 845 //ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y);
847 //if (land != null) 846 //if (land != null)
848 //{ 847 //{
849 //if (land.landData.landingType == (byte)1 && land.landData.userLocation != LLVector3.Zero) 848 //if (land.landData.landingType == (byte)1 && land.landData.userLocation != Vector3.Zero)
850 //{ 849 //{
851 // agent.startpos = land.landData.userLocation; 850 // agent.startpos = land.landData.userLocation;
852 //} 851 //}
@@ -855,27 +854,17 @@ namespace OpenSim.Region.Environment.Scenes
855 m_perfMonMS = System.Environment.TickCount; 854 m_perfMonMS = System.Environment.TickCount;
856 855
857 uint flags = agentData.ControlFlags; 856 uint flags = agentData.ControlFlags;
858 LLQuaternion bodyRotation = agentData.BodyRotation; 857 Quaternion bodyRotation = agentData.BodyRotation;
859 858
860 // Camera location in world. We'll need to raytrace 859 // Camera location in world. We'll need to raytrace
861 // from this location from time to time. 860 // from this location from time to time.
862 m_CameraCenter.x = agentData.CameraCenter.X; 861 m_CameraCenter = agentData.CameraCenter;
863 m_CameraCenter.y = agentData.CameraCenter.Y;
864 m_CameraCenter.z = agentData.CameraCenter.Z;
865 862
866 // Use these three vectors to figure out what the agent is looking at 863 // Use these three vectors to figure out what the agent is looking at
867 // Convert it to a Matrix and/or Quaternion 864 // Convert it to a Matrix and/or Quaternion
868 m_CameraAtAxis.x = agentData.CameraAtAxis.X; 865 m_CameraAtAxis = agentData.CameraAtAxis;
869 m_CameraAtAxis.y = agentData.CameraAtAxis.Y; 866 m_CameraLeftAxis = agentData.CameraLeftAxis;
870 m_CameraAtAxis.z = agentData.CameraAtAxis.Z; 867 m_CameraUpAxis = agentData.CameraUpAxis;
871
872 m_CameraLeftAxis.x = agentData.CameraLeftAxis.X;
873 m_CameraLeftAxis.y = agentData.CameraLeftAxis.Y;
874 m_CameraLeftAxis.z = agentData.CameraLeftAxis.Z;
875
876 m_CameraUpAxis.x = agentData.CameraUpAxis.X;
877 m_CameraUpAxis.y = agentData.CameraUpAxis.Y;
878 m_CameraUpAxis.z = agentData.CameraUpAxis.Z;
879 868
880 // The Agent's Draw distance setting 869 // The Agent's Draw distance setting
881 m_DrawDistance = agentData.Far; 870 m_DrawDistance = agentData.Far;
@@ -923,7 +912,7 @@ namespace OpenSim.Region.Environment.Scenes
923 bool update_rotation = false; 912 bool update_rotation = false;
924 bool DCFlagKeyPressed = false; 913 bool DCFlagKeyPressed = false;
925 Vector3 agent_control_v3 = new Vector3(0, 0, 0); 914 Vector3 agent_control_v3 = new Vector3(0, 0, 0);
926 Quaternion q = new Quaternion(bodyRotation.W, bodyRotation.X, bodyRotation.Y, bodyRotation.Z); 915 Quaternion q = bodyRotation;
927 if (PhysicsActor != null) 916 if (PhysicsActor != null)
928 { 917 {
929 bool oldflying = PhysicsActor.Flying; 918 bool oldflying = PhysicsActor.Flying;
@@ -1005,7 +994,7 @@ namespace OpenSim.Region.Environment.Scenes
1005 m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS); 994 m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS);
1006 } 995 }
1007 996
1008 public void DoAutoPilot(uint not_used, LLVector3 Pos, IClientAPI remote_client) 997 public void DoAutoPilot(uint not_used, Vector3 Pos, IClientAPI remote_client)
1009 { 998 {
1010 m_autopilotMoving = true; 999 m_autopilotMoving = true;
1011 m_autoPilotTarget = Pos; 1000 m_autoPilotTarget = Pos;
@@ -1014,17 +1003,17 @@ namespace OpenSim.Region.Environment.Scenes
1014 //proxy.PCode = (byte)PCode.ParticleSystem; 1003 //proxy.PCode = (byte)PCode.ParticleSystem;
1015 uint nextUUID = m_scene.NextLocalId; 1004 uint nextUUID = m_scene.NextLocalId;
1016 1005
1017 proxyObjectGroup = new SceneObjectGroup(m_scene, m_scene.RegionInfo.RegionHandle, UUID, nextUUID, Pos, new LLQuaternion(Rotation.x, Rotation.y, Rotation.z, Rotation.w), proxy); 1006 proxyObjectGroup = new SceneObjectGroup(m_scene, m_scene.RegionInfo.RegionHandle, UUID, nextUUID, Pos, Rotation, proxy);
1018 if (proxyObjectGroup != null) 1007 if (proxyObjectGroup != null)
1019 { 1008 {
1020 proxyObjectGroup.SendGroupFullUpdate(); 1009 proxyObjectGroup.SendGroupFullUpdate();
1021 remote_client.SendSitResponse(proxyObjectGroup.UUID, LLVector3.Zero, LLQuaternion.Identity, true, LLVector3.Zero, LLVector3.Zero, false); 1010 remote_client.SendSitResponse(proxyObjectGroup.UUID, Vector3.Zero, Quaternion.Identity, true, Vector3.Zero, Vector3.Zero, false);
1022 m_scene.DeleteSceneObject(proxyObjectGroup); 1011 m_scene.DeleteSceneObject(proxyObjectGroup);
1023 } 1012 }
1024 else 1013 else
1025 { 1014 {
1026 m_autopilotMoving = false; 1015 m_autopilotMoving = false;
1027 m_autoPilotTarget = LLVector3.Zero; 1016 m_autoPilotTarget = Vector3.Zero;
1028 ControllingClient.SendAlertMessage("Autopilot cancelled"); 1017 ControllingClient.SendAlertMessage("Autopilot cancelled");
1029 } 1018 }
1030 1019
@@ -1041,13 +1030,13 @@ namespace OpenSim.Region.Environment.Scenes
1041 if (part != null) 1030 if (part != null)
1042 { 1031 {
1043 AbsolutePosition = part.AbsolutePosition; 1032 AbsolutePosition = part.AbsolutePosition;
1044 Velocity = new LLVector3(0, 0, 0); 1033 Velocity = new Vector3(0, 0, 0);
1045 SendFullUpdateToAllClients(); 1034 SendFullUpdateToAllClients();
1046 1035
1047 //HandleAgentSit(ControllingClient, m_requestedSitTargetUUID); 1036 //HandleAgentSit(ControllingClient, m_requestedSitTargetUUID);
1048 } 1037 }
1049 //ControllingClient.SendSitResponse(m_requestedSitTargetID, m_requestedSitOffset, LLQuaternion.Identity, false, LLVector3.Zero, LLVector3.Zero, false); 1038 //ControllingClient.SendSitResponse(m_requestedSitTargetID, m_requestedSitOffset, Quaternion.Identity, false, Vector3.Zero, Vector3.Zero, false);
1050 m_requestedSitTargetUUID = LLUUID.Zero; 1039 m_requestedSitTargetUUID = UUID.Zero;
1051 } 1040 }
1052 else 1041 else
1053 { 1042 {
@@ -1057,15 +1046,15 @@ namespace OpenSim.Region.Environment.Scenes
1057 //proxy.PCode = (byte)PCode.ParticleSystem; 1046 //proxy.PCode = (byte)PCode.ParticleSystem;
1058 ////uint nextUUID = m_scene.NextLocalId; 1047 ////uint nextUUID = m_scene.NextLocalId;
1059 1048
1060 //proxyObjectGroup = new SceneObjectGroup(m_scene, m_scene.RegionInfo.RegionHandle, UUID, nextUUID, m_autoPilotTarget, LLQuaternion.Identity, proxy); 1049 //proxyObjectGroup = new SceneObjectGroup(m_scene, m_scene.RegionInfo.RegionHandle, UUID, nextUUID, m_autoPilotTarget, Quaternion.Identity, proxy);
1061 //if (proxyObjectGroup != null) 1050 //if (proxyObjectGroup != null)
1062 //{ 1051 //{
1063 //proxyObjectGroup.SendGroupFullUpdate(); 1052 //proxyObjectGroup.SendGroupFullUpdate();
1064 //ControllingClient.SendSitResponse(LLUUID.Zero, m_autoPilotTarget, LLQuaternion.Identity, true, LLVector3.Zero, LLVector3.Zero, false); 1053 //ControllingClient.SendSitResponse(UUID.Zero, m_autoPilotTarget, Quaternion.Identity, true, Vector3.Zero, Vector3.Zero, false);
1065 //m_scene.DeleteSceneObject(proxyObjectGroup); 1054 //m_scene.DeleteSceneObject(proxyObjectGroup);
1066 //} 1055 //}
1067 } 1056 }
1068 m_autoPilotTarget = LLVector3.Zero; 1057 m_autoPilotTarget = Vector3.Zero;
1069 m_autopilotMoving = false; 1058 m_autopilotMoving = false;
1070 } 1059 }
1071 } 1060 }
@@ -1082,7 +1071,7 @@ namespace OpenSim.Region.Environment.Scenes
1082 { 1071 {
1083 // Reset sit target. 1072 // Reset sit target.
1084 if (part.GetAvatarOnSitTarget() == UUID) 1073 if (part.GetAvatarOnSitTarget() == UUID)
1085 part.SetAvatarOnSitTarget(LLUUID.Zero); 1074 part.SetAvatarOnSitTarget(UUID.Zero);
1086 1075
1087 m_parentPosition = part.GetWorldPosition(); 1076 m_parentPosition = part.GetWorldPosition();
1088 } 1077 }
@@ -1092,8 +1081,8 @@ namespace OpenSim.Region.Environment.Scenes
1092 AddToPhysicalScene(); 1081 AddToPhysicalScene();
1093 } 1082 }
1094 1083
1095 m_pos += m_parentPosition + new LLVector3(0.0f, 0.0f, 2.0f*m_sitAvatarHeight); 1084 m_pos += m_parentPosition + new Vector3(0.0f, 0.0f, 2.0f*m_sitAvatarHeight);
1096 m_parentPosition = new LLVector3(); 1085 m_parentPosition = new Vector3();
1097 1086
1098 m_parentID = 0; 1087 m_parentID = 0;
1099 SendFullUpdateToAllClients(); 1088 SendFullUpdateToAllClients();
@@ -1107,7 +1096,7 @@ namespace OpenSim.Region.Environment.Scenes
1107 TrySetMovementAnimation("STAND"); 1096 TrySetMovementAnimation("STAND");
1108 } 1097 }
1109 1098
1110 private SceneObjectPart FindNextAvailableSitTarget(LLUUID targetID) 1099 private SceneObjectPart FindNextAvailableSitTarget(UUID targetID)
1111 { 1100 {
1112 SceneObjectPart targetPart = m_scene.GetSceneObjectPart(targetID); 1101 SceneObjectPart targetPart = m_scene.GetSceneObjectPart(targetID);
1113 if (targetPart == null) 1102 if (targetPart == null)
@@ -1133,12 +1122,12 @@ namespace OpenSim.Region.Environment.Scenes
1133 // Is a sit target available? 1122 // Is a sit target available?
1134 Vector3 avSitOffSet = part.SitTargetPosition; 1123 Vector3 avSitOffSet = part.SitTargetPosition;
1135 Quaternion avSitOrientation = part.SitTargetOrientation; 1124 Quaternion avSitOrientation = part.SitTargetOrientation;
1136 LLUUID avOnTargetAlready = part.GetAvatarOnSitTarget(); 1125 UUID avOnTargetAlready = part.GetAvatarOnSitTarget();
1137 1126
1138 bool SitTargetUnOccupied = (!(avOnTargetAlready != LLUUID.Zero)); 1127 bool SitTargetUnOccupied = (!(avOnTargetAlready != UUID.Zero));
1139 bool SitTargetisSet = 1128 bool SitTargetisSet =
1140 (!(avSitOffSet.x == 0 && avSitOffSet.y == 0 && avSitOffSet.z == 0 && avSitOrientation.w == 0 && 1129 (!(avSitOffSet.X == 0f && avSitOffSet.Y == 0f && avSitOffSet.Z == 0f && avSitOrientation.W == 0f &&
1141 avSitOrientation.x == 0 && avSitOrientation.y == 0 && avSitOrientation.z == 1)); 1130 avSitOrientation.X == 0f && avSitOrientation.Y == 0f && avSitOrientation.Z == 1f));
1142 1131
1143 if (SitTargetisSet && SitTargetUnOccupied) 1132 if (SitTargetisSet && SitTargetUnOccupied)
1144 { 1133 {
@@ -1151,13 +1140,13 @@ namespace OpenSim.Region.Environment.Scenes
1151 return targetPart; 1140 return targetPart;
1152 } 1141 }
1153 1142
1154 private void SendSitResponse(IClientAPI remoteClient, LLUUID targetID, LLVector3 offset) 1143 private void SendSitResponse(IClientAPI remoteClient, UUID targetID, Vector3 offset)
1155 { 1144 {
1156 bool autopilot = true; 1145 bool autopilot = true;
1157 LLVector3 pos = new LLVector3(); 1146 Vector3 pos = new Vector3();
1158 LLQuaternion sitOrientation = new LLQuaternion(0, 0, 0, 1); 1147 Quaternion sitOrientation = Quaternion.Identity;
1159 LLVector3 cameraEyeOffset = LLVector3.Zero; 1148 Vector3 cameraEyeOffset = Vector3.Zero;
1160 LLVector3 cameraAtOffset = LLVector3.Zero; 1149 Vector3 cameraAtOffset = Vector3.Zero;
1161 bool forceMouselook = false; 1150 bool forceMouselook = false;
1162 1151
1163 //SceneObjectPart part = m_scene.GetSceneObjectPart(targetID); 1152 //SceneObjectPart part = m_scene.GetSceneObjectPart(targetID);
@@ -1170,19 +1159,18 @@ namespace OpenSim.Region.Environment.Scenes
1170 // Is a sit target available? 1159 // Is a sit target available?
1171 Vector3 avSitOffSet = part.SitTargetPosition; 1160 Vector3 avSitOffSet = part.SitTargetPosition;
1172 Quaternion avSitOrientation = part.SitTargetOrientation; 1161 Quaternion avSitOrientation = part.SitTargetOrientation;
1173 LLUUID avOnTargetAlready = part.GetAvatarOnSitTarget(); 1162 UUID avOnTargetAlready = part.GetAvatarOnSitTarget();
1174 1163
1175 bool SitTargetUnOccupied = (!(avOnTargetAlready != LLUUID.Zero)); 1164 bool SitTargetUnOccupied = (!(avOnTargetAlready != UUID.Zero));
1176 bool SitTargetisSet = 1165 bool SitTargetisSet =
1177 (!(avSitOffSet.x == 0 && avSitOffSet.y == 0 && avSitOffSet.z == 0 && avSitOrientation.w == 0 && 1166 (!(avSitOffSet.X == 0f && avSitOffSet.Y == 0f && avSitOffSet.Z == 0f && avSitOrientation.W == 0f &&
1178 avSitOrientation.x == 0 && avSitOrientation.y == 0 && avSitOrientation.z == 1)); 1167 avSitOrientation.X == 0f && avSitOrientation.Y == 0f && avSitOrientation.Z == 1f));
1179 1168
1180 if (SitTargetisSet && SitTargetUnOccupied) 1169 if (SitTargetisSet && SitTargetUnOccupied)
1181 { 1170 {
1182 part.SetAvatarOnSitTarget(UUID); 1171 part.SetAvatarOnSitTarget(UUID);
1183 offset = new LLVector3(avSitOffSet.x, avSitOffSet.y, avSitOffSet.z); 1172 offset = new Vector3(avSitOffSet.X, avSitOffSet.Y, avSitOffSet.Z);
1184 sitOrientation = 1173 sitOrientation = avSitOrientation;
1185 new LLQuaternion(avSitOrientation.x, avSitOrientation.y, avSitOrientation.z, avSitOrientation.w);
1186 autopilot = false; 1174 autopilot = false;
1187 } 1175 }
1188 1176
@@ -1205,7 +1193,7 @@ namespace OpenSim.Region.Environment.Scenes
1205 autopilot = false; 1193 autopilot = false;
1206 1194
1207 RemoveFromPhysicalScene(); 1195 RemoveFromPhysicalScene();
1208 AbsolutePosition = pos + new LLVector3(0.0f, 0.0f, m_sitAvatarHeight); 1196 AbsolutePosition = pos + new Vector3(0.0f, 0.0f, m_sitAvatarHeight);
1209 } 1197 }
1210 } 1198 }
1211 else 1199 else
@@ -1232,7 +1220,7 @@ namespace OpenSim.Region.Environment.Scenes
1232 HandleAgentSit(remoteClient, UUID); 1220 HandleAgentSit(remoteClient, UUID);
1233 } 1221 }
1234 1222
1235 public void HandleAgentRequestSit(IClientAPI remoteClient, LLUUID agentID, LLUUID targetID, LLVector3 offset) 1223 public void HandleAgentRequestSit(IClientAPI remoteClient, UUID agentID, UUID targetID, Vector3 offset)
1236 { 1224 {
1237 if (m_parentID != 0) 1225 if (m_parentID != 0)
1238 { 1226 {
@@ -1254,7 +1242,7 @@ namespace OpenSim.Region.Environment.Scenes
1254 SendSitResponse(remoteClient, targetID, offset); 1242 SendSitResponse(remoteClient, targetID, offset);
1255 } 1243 }
1256 1244
1257 public void HandleAgentSit(IClientAPI remoteClient, LLUUID agentID) 1245 public void HandleAgentSit(IClientAPI remoteClient, UUID agentID)
1258 { 1246 {
1259 SceneObjectPart part = m_scene.GetSceneObjectPart(m_requestedSitTargetID); 1247 SceneObjectPart part = m_scene.GetSceneObjectPart(m_requestedSitTargetID);
1260 1248
@@ -1267,12 +1255,12 @@ namespace OpenSim.Region.Environment.Scenes
1267 Vector3 sitTargetPos = part.SitTargetPosition; 1255 Vector3 sitTargetPos = part.SitTargetPosition;
1268 Quaternion sitTargetOrient = part.SitTargetOrientation; 1256 Quaternion sitTargetOrient = part.SitTargetOrientation;
1269 1257
1270 //Quaternion vq = new Quaternion(sitTargetPos.x, sitTargetPos.y+0.2f, sitTargetPos.z+0.2f, 0); 1258 //Quaternion vq = new Quaternion(sitTargetPos.X, sitTargetPos.Y+0.2f, sitTargetPos.Z+0.2f, 0);
1271 //Quaternion nq = new Quaternion(sitTargetOrient.w, -sitTargetOrient.x, -sitTargetOrient.y, -sitTargetOrient.z); 1259 //Quaternion nq = new Quaternion(-sitTargetOrient.X, -sitTargetOrient.Y, -sitTargetOrient.Z, sitTargetOrient.w);
1272 1260
1273 //Quaternion result = (sitTargetOrient * vq) * nq; 1261 //Quaternion result = (sitTargetOrient * vq) * nq;
1274 1262
1275 m_pos = new LLVector3(sitTargetPos.x, sitTargetPos.y, sitTargetPos.z); 1263 m_pos = new Vector3(sitTargetPos.X, sitTargetPos.Y, sitTargetPos.Z);
1276 m_pos += m_sitTargetCorrectionOffset; 1264 m_pos += m_sitTargetCorrectionOffset;
1277 m_bodyRot = sitTargetOrient; 1265 m_bodyRot = sitTargetOrient;
1278 //Rotation = sitTargetOrient; 1266 //Rotation = sitTargetOrient;
@@ -1293,7 +1281,7 @@ namespace OpenSim.Region.Environment.Scenes
1293 } 1281 }
1294 m_parentID = m_requestedSitTargetID; 1282 m_parentID = m_requestedSitTargetID;
1295 1283
1296 Velocity = new LLVector3(0, 0, 0); 1284 Velocity = new Vector3(0, 0, 0);
1297 RemoveFromPhysicalScene(); 1285 RemoveFromPhysicalScene();
1298 1286
1299 TrySetMovementAnimation("SIT"); 1287 TrySetMovementAnimation("SIT");
@@ -1317,7 +1305,7 @@ namespace OpenSim.Region.Environment.Scenes
1317 } 1305 }
1318 } 1306 }
1319 1307
1320 public void AddAnimation(LLUUID animID) 1308 public void AddAnimation(UUID animID)
1321 { 1309 {
1322 if (m_isChildAgent) 1310 if (m_isChildAgent)
1323 return; 1311 return;
@@ -1333,14 +1321,14 @@ namespace OpenSim.Region.Environment.Scenes
1333 if (m_isChildAgent) 1321 if (m_isChildAgent)
1334 return; 1322 return;
1335 1323
1336 LLUUID animID = m_controllingClient.GetDefaultAnimation(name); 1324 UUID animID = m_controllingClient.GetDefaultAnimation(name);
1337 if (animID == LLUUID.Zero) 1325 if (animID == UUID.Zero)
1338 return; 1326 return;
1339 1327
1340 AddAnimation(animID); 1328 AddAnimation(animID);
1341 } 1329 }
1342 1330
1343 public void RemoveAnimation(LLUUID animID) 1331 public void RemoveAnimation(UUID animID)
1344 { 1332 {
1345 if (m_isChildAgent) 1333 if (m_isChildAgent)
1346 return; 1334 return;
@@ -1356,27 +1344,27 @@ namespace OpenSim.Region.Environment.Scenes
1356 if (m_isChildAgent) 1344 if (m_isChildAgent)
1357 return; 1345 return;
1358 1346
1359 LLUUID animID = m_controllingClient.GetDefaultAnimation(name); 1347 UUID animID = m_controllingClient.GetDefaultAnimation(name);
1360 if (animID == LLUUID.Zero) 1348 if (animID == UUID.Zero)
1361 return; 1349 return;
1362 1350
1363 RemoveAnimation(animID); 1351 RemoveAnimation(animID);
1364 } 1352 }
1365 1353
1366 public LLUUID[] GetAnimationArray() 1354 public UUID[] GetAnimationArray()
1367 { 1355 {
1368 LLUUID[] animIDs; 1356 UUID[] animIDs;
1369 int[] sequenceNums; 1357 int[] sequenceNums;
1370 m_animations.GetArrays( out animIDs, out sequenceNums ); 1358 m_animations.GetArrays( out animIDs, out sequenceNums );
1371 return animIDs; 1359 return animIDs;
1372 } 1360 }
1373 1361
1374 public void HandleStartAnim(IClientAPI remoteClient, LLUUID animID) 1362 public void HandleStartAnim(IClientAPI remoteClient, UUID animID)
1375 { 1363 {
1376 AddAnimation(animID); 1364 AddAnimation(animID);
1377 } 1365 }
1378 1366
1379 public void HandleStopAnim(IClientAPI remoteClient, LLUUID animID) 1367 public void HandleStopAnim(IClientAPI remoteClient, UUID animID)
1380 { 1368 {
1381 RemoveAnimation(animID); 1369 RemoveAnimation(animID);
1382 } 1370 }
@@ -1385,7 +1373,7 @@ namespace OpenSim.Region.Environment.Scenes
1385 /// The movement animation is reserved for "main" animations 1373 /// The movement animation is reserved for "main" animations
1386 /// that are mutually exclusive, e.g. flying and sitting. 1374 /// that are mutually exclusive, e.g. flying and sitting.
1387 /// </summary> 1375 /// </summary>
1388 protected void SetMovementAnimation(LLUUID animID) 1376 protected void SetMovementAnimation(UUID animID)
1389 { 1377 {
1390 if (m_animations.SetDefaultAnimation(animID, m_controllingClient.NextAnimationSequenceNumber)) 1378 if (m_animations.SetDefaultAnimation(animID, m_controllingClient.NextAnimationSequenceNumber))
1391 { 1379 {
@@ -1494,10 +1482,10 @@ namespace OpenSim.Region.Environment.Scenes
1494 1482
1495 m_rotation = rotation; 1483 m_rotation = rotation;
1496 NewForce newVelocity = new NewForce(); 1484 NewForce newVelocity = new NewForce();
1497 Vector3 direc = rotation*vec; 1485 Vector3 direc = vec * rotation;
1498 direc.Normalize(); 1486 direc.Normalize();
1499 1487
1500 direc *= 0.03f*128f; 1488 direc *= 0.03f * 128f;
1501 if (m_physicsActor.Flying) 1489 if (m_physicsActor.Flying)
1502 { 1490 {
1503 direc *= 4; 1491 direc *= 4;
@@ -1517,9 +1505,9 @@ namespace OpenSim.Region.Environment.Scenes
1517 { 1505 {
1518 if (!m_physicsActor.Flying && m_physicsActor.IsColliding) 1506 if (!m_physicsActor.Flying && m_physicsActor.IsColliding)
1519 { 1507 {
1520 if (direc.z > 2.0f) 1508 if (direc.Z > 2.0f)
1521 { 1509 {
1522 direc.z *= 3; 1510 direc.Z *= 3;
1523 1511
1524 // TODO: PreJump and jump happen too quickly. Many times prejump gets ignored. 1512 // TODO: PreJump and jump happen too quickly. Many times prejump gets ignored.
1525 TrySetMovementAnimation("PREJUMP"); 1513 TrySetMovementAnimation("PREJUMP");
@@ -1528,9 +1516,9 @@ namespace OpenSim.Region.Environment.Scenes
1528 } 1516 }
1529 } 1517 }
1530 1518
1531 newVelocity.X = direc.x; 1519 newVelocity.X = direc.X;
1532 newVelocity.Y = direc.y; 1520 newVelocity.Y = direc.Y;
1533 newVelocity.Z = direc.z; 1521 newVelocity.Z = direc.Z;
1534 m_forcesList.Add(newVelocity); 1522 m_forcesList.Add(newVelocity);
1535 1523
1536 m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS); 1524 m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS);
@@ -1595,11 +1583,11 @@ namespace OpenSim.Region.Environment.Scenes
1595 { 1583 {
1596 m_perfMonMS = System.Environment.TickCount; 1584 m_perfMonMS = System.Environment.TickCount;
1597 1585
1598 LLVector3 pos = m_pos; 1586 Vector3 pos = m_pos;
1599 LLVector3 vel = Velocity; 1587 Vector3 vel = Velocity;
1600 LLQuaternion rot = new LLQuaternion(m_bodyRot.x, m_bodyRot.y, m_bodyRot.z, m_bodyRot.w); 1588 Quaternion rot = m_bodyRot;
1601 remoteClient.SendAvatarTerseUpdate(m_regionHandle, (ushort)(m_scene.TimeDilation * (float)ushort.MaxValue), LocalId, new LLVector3(pos.X, pos.Y, pos.Z), 1589 remoteClient.SendAvatarTerseUpdate(m_regionHandle, (ushort)(m_scene.TimeDilation * (float)ushort.MaxValue), LocalId, new Vector3(pos.X, pos.Y, pos.Z),
1602 new LLVector3(vel.X, vel.Y, vel.Z), rot); 1590 new Vector3(vel.X, vel.Y, vel.Z), rot);
1603 1591
1604 m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS); 1592 m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS);
1605 m_scene.AddAgentUpdates(1); 1593 m_scene.AddAgentUpdates(1);
@@ -1625,7 +1613,7 @@ namespace OpenSim.Region.Environment.Scenes
1625 { 1613 {
1626 m_perfMonMS = System.Environment.TickCount; 1614 m_perfMonMS = System.Environment.TickCount;
1627 1615
1628 List<LLVector3> CoarseLocations = new List<LLVector3>(); 1616 List<Vector3> CoarseLocations = new List<Vector3>();
1629 List<ScenePresence> avatars = m_scene.GetAvatars(); 1617 List<ScenePresence> avatars = m_scene.GetAvatars();
1630 for (int i = 0; i < avatars.Count; i++) 1618 for (int i = 0; i < avatars.Count; i++)
1631 { 1619 {
@@ -1660,8 +1648,8 @@ namespace OpenSim.Region.Environment.Scenes
1660 if (m_appearance.Texture == null) 1648 if (m_appearance.Texture == null)
1661 return; 1649 return;
1662 1650
1663 // Note: because LLQuaternion is a struct, it can't be null 1651 // Note: because Quaternion is a struct, it can't be null
1664 LLQuaternion rot = new LLQuaternion(m_bodyRot.x, m_bodyRot.y, m_bodyRot.z, m_bodyRot.w); 1652 Quaternion rot = m_bodyRot;
1665 1653
1666 remoteAvatar.m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid, 1654 remoteAvatar.m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid,
1667 LocalId, m_pos, m_appearance.Texture.ToBytes(), 1655 LocalId, m_pos, m_appearance.Texture.ToBytes(),
@@ -1723,8 +1711,8 @@ namespace OpenSim.Region.Environment.Scenes
1723 // Needed for standalone 1711 // Needed for standalone
1724 m_scene.GetAvatarAppearance(m_controllingClient, out m_appearance); 1712 m_scene.GetAvatarAppearance(m_controllingClient, out m_appearance);
1725 1713
1726 // Note: because LLQuaternion is a struct, it can't be null 1714 // Note: because Quaternion is a struct, it can't be null
1727 LLQuaternion rot = new LLQuaternion(m_bodyRot.x, m_bodyRot.y, m_bodyRot.z, m_bodyRot.w); 1715 Quaternion rot = m_bodyRot;
1728 1716
1729 m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid, LocalId, 1717 m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid, LocalId,
1730 m_pos, m_appearance.Texture.ToBytes(), m_parentID, rot); 1718 m_pos, m_appearance.Texture.ToBytes(), m_parentID, rot);
@@ -1813,7 +1801,7 @@ namespace OpenSim.Region.Environment.Scenes
1813 /// </summary> 1801 /// </summary>
1814 /// <param name="animations"></param> 1802 /// <param name="animations"></param>
1815 /// <param name="seqs"></param> 1803 /// <param name="seqs"></param>
1816 public void SendAnimPack(LLUUID[] animations, int[] seqs) 1804 public void SendAnimPack(UUID[] animations, int[] seqs)
1817 { 1805 {
1818 if (m_isChildAgent) 1806 if (m_isChildAgent)
1819 return; 1807 return;
@@ -1826,7 +1814,7 @@ namespace OpenSim.Region.Environment.Scenes
1826 { 1814 {
1827 if (m_isChildAgent) 1815 if (m_isChildAgent)
1828 return; 1816 return;
1829 LLUUID[] animIDs; 1817 UUID[] animIDs;
1830 int[] sequenceNums; 1818 int[] sequenceNums;
1831 1819
1832 m_animations.GetArrays(out animIDs, out sequenceNums); 1820 m_animations.GetArrays(out animIDs, out sequenceNums);
@@ -1842,7 +1830,7 @@ namespace OpenSim.Region.Environment.Scenes
1842 if (m_isChildAgent) 1830 if (m_isChildAgent)
1843 return; 1831 return;
1844 1832
1845 LLUUID[] animIDs; 1833 UUID[] animIDs;
1846 int[] sequenceNums; 1834 int[] sequenceNums;
1847 1835
1848 m_animations.GetArrays(out animIDs, out sequenceNums); 1836 m_animations.GetArrays(out animIDs, out sequenceNums);
@@ -1870,16 +1858,16 @@ namespace OpenSim.Region.Environment.Scenes
1870 if (Util.GetDistanceTo(AbsolutePosition,m_LastChildAgentUpdatePosition) > 32) 1858 if (Util.GetDistanceTo(AbsolutePosition,m_LastChildAgentUpdatePosition) > 32)
1871 { 1859 {
1872 ChildAgentDataUpdate cadu = new ChildAgentDataUpdate(); 1860 ChildAgentDataUpdate cadu = new ChildAgentDataUpdate();
1873 cadu.ActiveGroupID=LLUUID.Zero.UUID; 1861 cadu.ActiveGroupID = UUID.Zero.Guid;
1874 cadu.AgentID = UUID.UUID; 1862 cadu.AgentID = UUID.Guid;
1875 cadu.alwaysrun = m_setAlwaysRun; 1863 cadu.alwaysrun = m_setAlwaysRun;
1876 cadu.AVHeight = m_avHeight; 1864 cadu.AVHeight = m_avHeight;
1877 LLVector3 tempCameraCenter = new LLVector3(m_CameraCenter.x, m_CameraCenter.y, m_CameraCenter.z); 1865 Vector3 tempCameraCenter = new Vector3(m_CameraCenter.X, m_CameraCenter.Y, m_CameraCenter.Z);
1878 cadu.cameraPosition = new sLLVector3(tempCameraCenter); 1866 cadu.cameraPosition = tempCameraCenter;
1879 cadu.drawdistance = m_DrawDistance; 1867 cadu.drawdistance = m_DrawDistance;
1880 cadu.godlevel = m_godlevel; 1868 cadu.godlevel = m_godlevel;
1881 cadu.GroupAccess = 0; 1869 cadu.GroupAccess = 0;
1882 cadu.Position = new sLLVector3(AbsolutePosition); 1870 cadu.Position = AbsolutePosition;
1883 cadu.regionHandle = m_scene.RegionInfo.RegionHandle; 1871 cadu.regionHandle = m_scene.RegionInfo.RegionHandle;
1884 float multiplier = 1; 1872 float multiplier = 1;
1885 int innacurateNeighbors = m_scene.GetInaccurateNeighborCount(); 1873 int innacurateNeighbors = m_scene.GetInaccurateNeighborCount();
@@ -1899,7 +1887,7 @@ namespace OpenSim.Region.Environment.Scenes
1899 1887
1900 1888
1901 1889
1902 cadu.Velocity = new sLLVector3(Velocity); 1890 cadu.Velocity = Velocity;
1903 m_scene.SendOutChildAgentUpdates(cadu,this); 1891 m_scene.SendOutChildAgentUpdates(cadu,this);
1904 m_LastChildAgentUpdatePosition.X = AbsolutePosition.X; 1892 m_LastChildAgentUpdatePosition.X = AbsolutePosition.X;
1905 m_LastChildAgentUpdatePosition.Y = AbsolutePosition.Y; 1893 m_LastChildAgentUpdatePosition.Y = AbsolutePosition.Y;
@@ -1919,8 +1907,8 @@ namespace OpenSim.Region.Environment.Scenes
1919 if (IsChildAgent) 1907 if (IsChildAgent)
1920 return; 1908 return;
1921 1909
1922 LLVector3 pos2 = AbsolutePosition; 1910 Vector3 pos2 = AbsolutePosition;
1923 LLVector3 vel = Velocity; 1911 Vector3 vel = Velocity;
1924 1912
1925 float timeStep = 0.1f; 1913 float timeStep = 0.1f;
1926 pos2.X = pos2.X + (vel.X*timeStep); 1914 pos2.X = pos2.X + (vel.X*timeStep);
@@ -1946,8 +1934,8 @@ namespace OpenSim.Region.Environment.Scenes
1946 /// </summary> 1934 /// </summary>
1947 protected void CrossToNewRegion() 1935 protected void CrossToNewRegion()
1948 { 1936 {
1949 LLVector3 pos = AbsolutePosition; 1937 Vector3 pos = AbsolutePosition;
1950 LLVector3 newpos = new LLVector3(pos.X, pos.Y, pos.Z); 1938 Vector3 newpos = new Vector3(pos.X, pos.Y, pos.Z);
1951 uint neighbourx = m_regionInfo.RegionLocX; 1939 uint neighbourx = m_regionInfo.RegionLocX;
1952 uint neighboury = m_regionInfo.RegionLocY; 1940 uint neighboury = m_regionInfo.RegionLocY;
1953 1941
@@ -1979,7 +1967,7 @@ namespace OpenSim.Region.Environment.Scenes
1979 newpos.Y = enterDistance; 1967 newpos.Y = enterDistance;
1980 } 1968 }
1981 1969
1982 LLVector3 vel = m_velocity; 1970 Vector3 vel = m_velocity;
1983 ulong neighbourHandle = Helpers.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize)); 1971 ulong neighbourHandle = Helpers.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize));
1984 SimpleRegionInfo neighbourRegion = m_scene.RequestNeighbouringRegionInfo(neighbourHandle); 1972 SimpleRegionInfo neighbourRegion = m_scene.RequestNeighbouringRegionInfo(neighbourHandle);
1985 if (neighbourRegion != null && ValidateAttachments()) 1973 if (neighbourRegion != null && ValidateAttachments())
@@ -2023,7 +2011,7 @@ namespace OpenSim.Region.Environment.Scenes
2023 2011
2024 CrossAttachmentsIntoNewRegion(neighbourHandle); 2012 CrossAttachmentsIntoNewRegion(neighbourHandle);
2025 2013
2026 m_scene.SendKillObject(m_localId); 2014 m_scene.SendKiPrimitive(m_localId);
2027 2015
2028 m_scene.NotifyMyCoarseLocationChange(); 2016 m_scene.NotifyMyCoarseLocationChange();
2029 // the user may change their profile information in other region, 2017 // the user may change their profile information in other region,
@@ -2047,7 +2035,7 @@ namespace OpenSim.Region.Environment.Scenes
2047 /// This allows the Sim owner the abiility to kick users from their sim currently. 2035 /// This allows the Sim owner the abiility to kick users from their sim currently.
2048 /// It tells the client that the agent has permission to do so. 2036 /// It tells the client that the agent has permission to do so.
2049 /// </summary> 2037 /// </summary>
2050 public void GrantGodlikePowers(LLUUID agentID, LLUUID sessionID, LLUUID token, bool godStatus) 2038 public void GrantGodlikePowers(UUID agentID, UUID sessionID, UUID token, bool godStatus)
2051 { 2039 {
2052 if (godStatus) 2040 if (godStatus)
2053 { 2041 {
@@ -2082,11 +2070,11 @@ namespace OpenSim.Region.Environment.Scenes
2082 int shifty = ((int)rRegionY - (int)tRegionY) * (int)Constants.RegionSize; 2070 int shifty = ((int)rRegionY - (int)tRegionY) * (int)Constants.RegionSize;
2083 2071
2084 m_DrawDistance = cAgentData.drawdistance; 2072 m_DrawDistance = cAgentData.drawdistance;
2085 m_pos = new LLVector3(cAgentData.Position.x + shiftx, cAgentData.Position.y + shifty, cAgentData.Position.z); 2073 m_pos = new Vector3(cAgentData.Position.X + shiftx, cAgentData.Position.Y + shifty, cAgentData.Position.Z);
2086 2074
2087 // It's hard to say here.. We can't really tell where the camera position is unless it's in world cordinates from the sending region 2075 // It's hard to say here.. We can't really tell where the camera position is unless it's in world cordinates from the sending region
2088 m_CameraCenter = 2076 m_CameraCenter =
2089 new Vector3(cAgentData.cameraPosition.x, cAgentData.cameraPosition.y, cAgentData.cameraPosition.z); 2077 new Vector3(cAgentData.cameraPosition.X, cAgentData.cameraPosition.Y, cAgentData.cameraPosition.Z);
2090 2078
2091 2079
2092 m_godlevel = cAgentData.godlevel; 2080 m_godlevel = cAgentData.godlevel;
@@ -2147,7 +2135,7 @@ namespace OpenSim.Region.Environment.Scenes
2147 static ScenePresence() 2135 static ScenePresence()
2148 { 2136 {
2149 2137
2150 LLObject.TextureEntry textu = AvatarAppearance.GetDefaultTexture(); 2138 Primitive.TextureEntry textu = AvatarAppearance.GetDefaultTexture();
2151 DefaultTexture = textu.ToBytes(); 2139 DefaultTexture = textu.ToBytes();
2152 } 2140 }
2153 2141
@@ -2166,13 +2154,13 @@ namespace OpenSim.Region.Environment.Scenes
2166 [Serializable] 2154 [Serializable]
2167 public class ScenePartUpdate : ISerializable 2155 public class ScenePartUpdate : ISerializable
2168 { 2156 {
2169 public LLUUID FullID; 2157 public UUID FullID;
2170 public uint LastFullUpdateTime; 2158 public uint LastFullUpdateTime;
2171 public uint LastTerseUpdateTime; 2159 public uint LastTerseUpdateTime;
2172 2160
2173 public ScenePartUpdate() 2161 public ScenePartUpdate()
2174 { 2162 {
2175 FullID = LLUUID.Zero; 2163 FullID = UUID.Zero;
2176 LastFullUpdateTime = 0; 2164 LastFullUpdateTime = 0;
2177 LastTerseUpdateTime = 0; 2165 LastTerseUpdateTime = 0;
2178 } 2166 }
@@ -2186,7 +2174,7 @@ namespace OpenSim.Region.Environment.Scenes
2186 throw new ArgumentNullException("info"); 2174 throw new ArgumentNullException("info");
2187 } 2175 }
2188 2176
2189 FullID = new LLUUID((Guid)info.GetValue("FullID", typeof(Guid))); 2177 FullID = new UUID((Guid)info.GetValue("FullID", typeof(Guid)));
2190 LastFullUpdateTime = (uint)info.GetValue("LastFullUpdateTime", typeof(uint)); 2178 LastFullUpdateTime = (uint)info.GetValue("LastFullUpdateTime", typeof(uint));
2191 LastTerseUpdateTime = (uint)info.GetValue("LastTerseUpdateTime", typeof(uint)); 2179 LastTerseUpdateTime = (uint)info.GetValue("LastTerseUpdateTime", typeof(uint));
2192 2180
@@ -2203,7 +2191,7 @@ namespace OpenSim.Region.Environment.Scenes
2203 throw new ArgumentNullException("info"); 2191 throw new ArgumentNullException("info");
2204 } 2192 }
2205 2193
2206 info.AddValue("FullID", FullID.UUID); 2194 info.AddValue("FullID", FullID.Guid);
2207 info.AddValue("LastFullUpdateTime", LastFullUpdateTime); 2195 info.AddValue("LastFullUpdateTime", LastFullUpdateTime);
2208 info.AddValue("LastTerseUpdateTime", LastTerseUpdateTime); 2196 info.AddValue("LastTerseUpdateTime", LastTerseUpdateTime);
2209 } 2197 }
@@ -2333,7 +2321,7 @@ namespace OpenSim.Region.Environment.Scenes
2333*/ 2321*/
2334 if (DefaultTexture == null) 2322 if (DefaultTexture == null)
2335 { 2323 {
2336 LLObject.TextureEntry textu = AvatarAppearance.GetDefaultTexture(); 2324 Primitive.TextureEntry textu = AvatarAppearance.GetDefaultTexture();
2337 DefaultTexture = textu.ToBytes(); 2325 DefaultTexture = textu.ToBytes();
2338 } 2326 }
2339 } 2327 }
@@ -2421,8 +2409,8 @@ namespace OpenSim.Region.Environment.Scenes
2421 Animations = new AvatarAnimations(); 2409 Animations = new AvatarAnimations();
2422 Animations.LoadAnims(); 2410 Animations.LoadAnims();
2423 2411
2424 m_animations = new List<LLUUID>(); 2412 m_animations = new List<UUID>();
2425 m_animations.Add(Animations.AnimsLLUUID["STAND"]); 2413 m_animations.Add(Animations.AnimsUUID["STAND"]);
2426 m_animationSeqs.Add(m_controllingClient.NextAnimationSequenceNumber); 2414 m_animationSeqs.Add(m_controllingClient.NextAnimationSequenceNumber);
2427 2415
2428 SetDirectionVectors(); 2416 SetDirectionVectors();
@@ -2447,7 +2435,7 @@ namespace OpenSim.Region.Environment.Scenes
2447*/ 2435*/
2448 if (DefaultTexture == null) 2436 if (DefaultTexture == null)
2449 { 2437 {
2450 LLObject.TextureEntry textu = AvatarAppearance.GetDefaultTexture(); 2438 Primitive.TextureEntry textu = AvatarAppearance.GetDefaultTexture();
2451 DefaultTexture = textu.ToBytes(); 2439 DefaultTexture = textu.ToBytes();
2452 } 2440 }
2453 2441
@@ -2459,7 +2447,7 @@ namespace OpenSim.Region.Environment.Scenes
2459 m_requestedSitTargetID = (uint)info.GetValue("m_requestedSitTargetID", typeof(uint)); 2447 m_requestedSitTargetID = (uint)info.GetValue("m_requestedSitTargetID", typeof(uint));
2460 2448
2461 m_requestedSitOffset 2449 m_requestedSitOffset
2462 = new LLVector3( 2450 = new Vector3(
2463 (float)info.GetValue("m_requestedSitOffset.X", typeof(float)), 2451 (float)info.GetValue("m_requestedSitOffset.X", typeof(float)),
2464 (float)info.GetValue("m_requestedSitOffset.Y", typeof(float)), 2452 (float)info.GetValue("m_requestedSitOffset.Y", typeof(float)),
2465 (float)info.GetValue("m_requestedSitOffset.Z", typeof(float))); 2453 (float)info.GetValue("m_requestedSitOffset.Z", typeof(float)));
@@ -2470,10 +2458,10 @@ namespace OpenSim.Region.Environment.Scenes
2470 2458
2471 m_bodyRot 2459 m_bodyRot
2472 = new Quaternion( 2460 = new Quaternion(
2473 (float)info.GetValue("m_bodyRot.w", typeof(float)), 2461 (float)info.GetValue("m_bodyRot.X", typeof(float)),
2474 (float)info.GetValue("m_bodyRot.x", typeof(float)), 2462 (float)info.GetValue("m_bodyRot.Y", typeof(float)),
2475 (float)info.GetValue("m_bodyRot.y", typeof(float)), 2463 (float)info.GetValue("m_bodyRot.Z", typeof(float)),
2476 (float)info.GetValue("m_bodyRot.z", typeof(float))); 2464 (float)info.GetValue("m_bodyRot.W", typeof(float)));
2477 2465
2478 IsRestrictedToRegion = (bool)info.GetValue("IsRestrictedToRegion", typeof(bool)); 2466 IsRestrictedToRegion = (bool)info.GetValue("IsRestrictedToRegion", typeof(bool));
2479 m_newForce = (bool)info.GetValue("m_newForce", typeof(bool)); 2467 m_newForce = (bool)info.GetValue("m_newForce", typeof(bool));
@@ -2493,7 +2481,7 @@ namespace OpenSim.Region.Environment.Scenes
2493 Dir_Vectors = Dir_Vectors_work2.ToArray(); 2481 Dir_Vectors = Dir_Vectors_work2.ToArray();
2494 2482
2495 lastPhysPos 2483 lastPhysPos
2496 = new LLVector3( 2484 = new Vector3(
2497 (float)info.GetValue("lastPhysPos.X", typeof(float)), 2485 (float)info.GetValue("lastPhysPos.X", typeof(float)),
2498 (float)info.GetValue("lastPhysPos.Y", typeof(float)), 2486 (float)info.GetValue("lastPhysPos.Y", typeof(float)),
2499 (float)info.GetValue("lastPhysPos.Z", typeof(float))); 2487 (float)info.GetValue("lastPhysPos.Z", typeof(float)));
@@ -2527,7 +2515,7 @@ namespace OpenSim.Region.Environment.Scenes
2527 m_knownChildRegions = (List<ulong>)info.GetValue("m_knownChildRegions", typeof(List<ulong>)); 2515 m_knownChildRegions = (List<ulong>)info.GetValue("m_knownChildRegions", typeof(List<ulong>));
2528 2516
2529 posLastSignificantMove 2517 posLastSignificantMove
2530 = new LLVector3( 2518 = new Vector3(
2531 (float)info.GetValue("posLastSignificantMove.X", typeof(float)), 2519 (float)info.GetValue("posLastSignificantMove.X", typeof(float)),
2532 (float)info.GetValue("posLastSignificantMove.Y", typeof(float)), 2520 (float)info.GetValue("posLastSignificantMove.Y", typeof(float)),
2533 (float)info.GetValue("posLastSignificantMove.Z", typeof(float))); 2521 (float)info.GetValue("posLastSignificantMove.Z", typeof(float)));
@@ -2540,14 +2528,14 @@ namespace OpenSim.Region.Environment.Scenes
2540 2528
2541 foreach (Guid id in updateTimes_work.Keys) 2529 foreach (Guid id in updateTimes_work.Keys)
2542 { 2530 {
2543 m_updateTimes.Add(new LLUUID(id), updateTimes_work[id]); 2531 m_updateTimes.Add(new UUID(id), updateTimes_work[id]);
2544 } 2532 }
2545 */ 2533 */
2546 m_regionHandle = (ulong)info.GetValue("m_regionHandle", typeof(ulong)); 2534 m_regionHandle = (ulong)info.GetValue("m_regionHandle", typeof(ulong));
2547 m_firstname = (string)info.GetValue("m_firstname", typeof(string)); 2535 m_firstname = (string)info.GetValue("m_firstname", typeof(string));
2548 m_lastname = (string)info.GetValue("m_lastname", typeof(string)); 2536 m_lastname = (string)info.GetValue("m_lastname", typeof(string));
2549 m_allowMovement = (bool)info.GetValue("m_allowMovement", typeof(bool)); 2537 m_allowMovement = (bool)info.GetValue("m_allowMovement", typeof(bool));
2550 m_parentPosition = new LLVector3((float)info.GetValue("m_parentPosition.X", typeof(float)), 2538 m_parentPosition = new Vector3((float)info.GetValue("m_parentPosition.X", typeof(float)),
2551 (float)info.GetValue("m_parentPosition.Y", typeof(float)), 2539 (float)info.GetValue("m_parentPosition.Y", typeof(float)),
2552 (float)info.GetValue("m_parentPosition.Z", typeof(float))); 2540 (float)info.GetValue("m_parentPosition.Z", typeof(float)));
2553 2541
@@ -2555,7 +2543,7 @@ namespace OpenSim.Region.Environment.Scenes
2555 m_parentID = (uint)info.GetValue("m_parentID", typeof(uint)); 2543 m_parentID = (uint)info.GetValue("m_parentID", typeof(uint));
2556 2544
2557// for OpenSim_v0.5 2545// for OpenSim_v0.5
2558 currentParcelUUID = new LLUUID((Guid)info.GetValue("currentParcelUUID", typeof(Guid))); 2546 currentParcelUUID = new UUID((Guid)info.GetValue("currentParcelUUID", typeof(Guid)));
2559 2547
2560 lastKnownAllowedPosition 2548 lastKnownAllowedPosition
2561 = new Vector3( 2549 = new Vector3(
@@ -2566,7 +2554,7 @@ namespace OpenSim.Region.Environment.Scenes
2566 sentMessageAboutRestrictedParcelFlyingDown = (bool)info.GetValue("sentMessageAboutRestrictedParcelFlyingDown", typeof(bool)); 2554 sentMessageAboutRestrictedParcelFlyingDown = (bool)info.GetValue("sentMessageAboutRestrictedParcelFlyingDown", typeof(bool));
2567 2555
2568 m_LastChildAgentUpdatePosition 2556 m_LastChildAgentUpdatePosition
2569 = new LLVector3( 2557 = new Vector3(
2570 (float)info.GetValue("m_LastChildAgentUpdatePosition.X", typeof(float)), 2558 (float)info.GetValue("m_LastChildAgentUpdatePosition.X", typeof(float)),
2571 (float)info.GetValue("m_LastChildAgentUpdatePosition.Y", typeof(float)), 2559 (float)info.GetValue("m_LastChildAgentUpdatePosition.Y", typeof(float)),
2572 (float)info.GetValue("m_LastChildAgentUpdatePosition.Z", typeof(float))); 2560 (float)info.GetValue("m_LastChildAgentUpdatePosition.Z", typeof(float)));
@@ -2575,11 +2563,11 @@ namespace OpenSim.Region.Environment.Scenes
2575 m_AgentControlFlags = (uint)info.GetValue("m_AgentControlFlags", typeof(uint)); 2563 m_AgentControlFlags = (uint)info.GetValue("m_AgentControlFlags", typeof(uint));
2576 2564
2577 m_headrotation 2565 m_headrotation
2578 = new LLQuaternion( 2566 = new Quaternion(
2579 (float)info.GetValue("m_headrotation.W", typeof(float)),
2580 (float)info.GetValue("m_headrotation.X", typeof(float)), 2567 (float)info.GetValue("m_headrotation.X", typeof(float)),
2581 (float)info.GetValue("m_headrotation.Y", typeof(float)), 2568 (float)info.GetValue("m_headrotation.Y", typeof(float)),
2582 (float)info.GetValue("m_headrotation.Z", typeof(float))); 2569 (float)info.GetValue("m_headrotation.Z", typeof(float)),
2570 (float)info.GetValue("m_headrotation.W", typeof(float)));
2583 2571
2584 m_state = (byte)info.GetValue("m_state", typeof(byte)); 2572 m_state = (byte)info.GetValue("m_state", typeof(byte));
2585 2573
@@ -2605,7 +2593,7 @@ namespace OpenSim.Region.Environment.Scenes
2605 info.AddValue("m_updateCount", m_updateCount); 2593 info.AddValue("m_updateCount", m_updateCount);
2606 info.AddValue("m_requestedSitTargetID", m_requestedSitTargetID); 2594 info.AddValue("m_requestedSitTargetID", m_requestedSitTargetID);
2607 2595
2608 // LLVector3 2596 // Vector3
2609 info.AddValue("m_requestedSitOffset.X", m_requestedSitOffset.X); 2597 info.AddValue("m_requestedSitOffset.X", m_requestedSitOffset.X);
2610 info.AddValue("m_requestedSitOffset.Y", m_requestedSitOffset.Y); 2598 info.AddValue("m_requestedSitOffset.Y", m_requestedSitOffset.Y);
2611 info.AddValue("m_requestedSitOffset.Z", m_requestedSitOffset.Z); 2599 info.AddValue("m_requestedSitOffset.Z", m_requestedSitOffset.Z);
@@ -2615,16 +2603,16 @@ namespace OpenSim.Region.Environment.Scenes
2615 info.AddValue("m_setAlwaysRun", m_setAlwaysRun); 2603 info.AddValue("m_setAlwaysRun", m_setAlwaysRun);
2616 2604
2617 // Quaternion 2605 // Quaternion
2618 info.AddValue("m_bodyRot.w", m_bodyRot.w); 2606 info.AddValue("m_bodyRot.X", m_bodyRot.X);
2619 info.AddValue("m_bodyRot.x", m_bodyRot.x); 2607 info.AddValue("m_bodyRot.Y", m_bodyRot.Y);
2620 info.AddValue("m_bodyRot.y", m_bodyRot.y); 2608 info.AddValue("m_bodyRot.Z", m_bodyRot.Z);
2621 info.AddValue("m_bodyRot.z", m_bodyRot.z); 2609 info.AddValue("m_bodyRot.W", m_bodyRot.W);
2622 2610
2623 info.AddValue("IsRestrictedToRegion", IsRestrictedToRegion); 2611 info.AddValue("IsRestrictedToRegion", IsRestrictedToRegion);
2624 info.AddValue("m_newForce", m_newForce); 2612 info.AddValue("m_newForce", m_newForce);
2625 //info.AddValue("m_newAvatar", m_newAvatar); 2613 //info.AddValue("m_newAvatar", m_newAvatar);
2626 info.AddValue("m_newCoarseLocations", m_newCoarseLocations); 2614 info.AddValue("m_newCoarseLocations", m_newCoarseLocations);
2627 info.AddValue("m_gotAllObjectsInScene", false); 2615 info.AddValue("m_gotAPrimitivesInScene", false);
2628 info.AddValue("m_avHeight", m_avHeight); 2616 info.AddValue("m_avHeight", m_avHeight);
2629 2617
2630 // info.AddValue("m_regionInfo", m_regionInfo); 2618 // info.AddValue("m_regionInfo", m_regionInfo);
@@ -2635,41 +2623,41 @@ namespace OpenSim.Region.Environment.Scenes
2635 2623
2636 foreach (Vector3 v3 in Dir_Vectors) 2624 foreach (Vector3 v3 in Dir_Vectors)
2637 { 2625 {
2638 Dir_Vectors_work.Add(new float[] { v3.x, v3.y, v3.z }); 2626 Dir_Vectors_work.Add(new float[] { v3.X, v3.Y, v3.Z });
2639 } 2627 }
2640 2628
2641 info.AddValue("Dir_Vectors", Dir_Vectors_work); 2629 info.AddValue("Dir_Vectors", Dir_Vectors_work);
2642 2630
2643 // LLVector3 2631 // Vector3
2644 info.AddValue("lastPhysPos.X", lastPhysPos.X); 2632 info.AddValue("lastPhysPos.X", lastPhysPos.X);
2645 info.AddValue("lastPhysPos.Y", lastPhysPos.Y); 2633 info.AddValue("lastPhysPos.Y", lastPhysPos.Y);
2646 info.AddValue("lastPhysPos.Z", lastPhysPos.Z); 2634 info.AddValue("lastPhysPos.Z", lastPhysPos.Z);
2647 2635
2648 // Vector3 2636 // Vector3
2649 info.AddValue("m_CameraCenter.X", m_CameraCenter.x); 2637 info.AddValue("m_CameraCenter.X", m_CameraCenter.X);
2650 info.AddValue("m_CameraCenter.Y", m_CameraCenter.y); 2638 info.AddValue("m_CameraCenter.Y", m_CameraCenter.Y);
2651 info.AddValue("m_CameraCenter.Z", m_CameraCenter.z); 2639 info.AddValue("m_CameraCenter.Z", m_CameraCenter.Z);
2652 2640
2653 // Vector3 2641 // Vector3
2654 info.AddValue("m_CameraAtAxis.X", m_CameraAtAxis.x); 2642 info.AddValue("m_CameraAtAxis.X", m_CameraAtAxis.X);
2655 info.AddValue("m_CameraAtAxis.Y", m_CameraAtAxis.y); 2643 info.AddValue("m_CameraAtAxis.Y", m_CameraAtAxis.Y);
2656 info.AddValue("m_CameraAtAxis.Z", m_CameraAtAxis.z); 2644 info.AddValue("m_CameraAtAxis.Z", m_CameraAtAxis.Z);
2657 2645
2658 // Vector3 2646 // Vector3
2659 info.AddValue("m_CameraLeftAxis.X", m_CameraLeftAxis.x); 2647 info.AddValue("m_CameraLeftAxis.X", m_CameraLeftAxis.X);
2660 info.AddValue("m_CameraLeftAxis.Y", m_CameraLeftAxis.y); 2648 info.AddValue("m_CameraLeftAxis.Y", m_CameraLeftAxis.Y);
2661 info.AddValue("m_CameraLeftAxis.Z", m_CameraLeftAxis.z); 2649 info.AddValue("m_CameraLeftAxis.Z", m_CameraLeftAxis.Z);
2662 2650
2663 // Vector3 2651 // Vector3
2664 info.AddValue("m_CameraUpAxis.X", m_CameraUpAxis.x); 2652 info.AddValue("m_CameraUpAxis.X", m_CameraUpAxis.X);
2665 info.AddValue("m_CameraUpAxis.Y", m_CameraUpAxis.y); 2653 info.AddValue("m_CameraUpAxis.Y", m_CameraUpAxis.Y);
2666 info.AddValue("m_CameraUpAxis.Z", m_CameraUpAxis.z); 2654 info.AddValue("m_CameraUpAxis.Z", m_CameraUpAxis.Z);
2667 2655
2668 info.AddValue("m_DrawDistance", m_DrawDistance); 2656 info.AddValue("m_DrawDistance", m_DrawDistance);
2669 info.AddValue("m_appearance", m_appearance); 2657 info.AddValue("m_appearance", m_appearance);
2670 info.AddValue("m_knownChildRegions", m_knownChildRegions); 2658 info.AddValue("m_knownChildRegions", m_knownChildRegions);
2671 2659
2672 // LLVector3 2660 // Vector3
2673 info.AddValue("posLastSignificantMove.X", posLastSignificantMove.X); 2661 info.AddValue("posLastSignificantMove.X", posLastSignificantMove.X);
2674 info.AddValue("posLastSignificantMove.Y", posLastSignificantMove.Y); 2662 info.AddValue("posLastSignificantMove.Y", posLastSignificantMove.Y);
2675 info.AddValue("posLastSignificantMove.Z", posLastSignificantMove.Z); 2663 info.AddValue("posLastSignificantMove.Z", posLastSignificantMove.Z);
@@ -2679,7 +2667,7 @@ namespace OpenSim.Region.Environment.Scenes
2679 /* 2667 /*
2680 Dictionary<Guid, ScenePartUpdate> updateTimes_work = new Dictionary<Guid, ScenePartUpdate>(); 2668 Dictionary<Guid, ScenePartUpdate> updateTimes_work = new Dictionary<Guid, ScenePartUpdate>();
2681 2669
2682 foreach (LLUUID id in m_updateTimes.Keys) 2670 foreach (UUID id in m_updateTimes.Keys)
2683 { 2671 {
2684 updateTimes_work.Add(id.UUID, m_updateTimes[id]); 2672 updateTimes_work.Add(id.UUID, m_updateTimes[id]);
2685 } 2673 }
@@ -2699,11 +2687,11 @@ namespace OpenSim.Region.Environment.Scenes
2699 info.AddValue("m_parentID", m_parentID); 2687 info.AddValue("m_parentID", m_parentID);
2700 2688
2701// for OpenSim_v0.5 2689// for OpenSim_v0.5
2702 info.AddValue("currentParcelUUID", currentParcelUUID.UUID); 2690 info.AddValue("currentParcelUUID", currentParcelUUID.Guid);
2703 2691
2704 info.AddValue("lastKnownAllowedPosition.X", lastKnownAllowedPosition.x); 2692 info.AddValue("lastKnownAllowedPosition.X", lastKnownAllowedPosition.X);
2705 info.AddValue("lastKnownAllowedPosition.Y", lastKnownAllowedPosition.y); 2693 info.AddValue("lastKnownAllowedPosition.Y", lastKnownAllowedPosition.Y);
2706 info.AddValue("lastKnownAllowedPosition.Z", lastKnownAllowedPosition.z); 2694 info.AddValue("lastKnownAllowedPosition.Z", lastKnownAllowedPosition.Z);
2707 2695
2708 info.AddValue("sentMessageAboutRestrictedParcelFlyingDown", sentMessageAboutRestrictedParcelFlyingDown); 2696 info.AddValue("sentMessageAboutRestrictedParcelFlyingDown", sentMessageAboutRestrictedParcelFlyingDown);
2709 2697
@@ -2734,13 +2722,13 @@ namespace OpenSim.Region.Environment.Scenes
2734 } 2722 }
2735 } 2723 }
2736 2724
2737 public void RegisterControlEventsToScript(int controls, int accept, int pass_on, uint Obj_localID, LLUUID Script_item_LLUUID) 2725 public void RegisterControlEventsToScript(int controls, int accept, int pass_on, uint Obj_localID, UUID Script_item_UUID)
2738 { 2726 {
2739 ScriptControllers obj = new ScriptControllers(); 2727 ScriptControllers obj = new ScriptControllers();
2740 obj.ignoreControls = ScriptControlled.CONTROL_ZERO; 2728 obj.ignoreControls = ScriptControlled.CONTROL_ZERO;
2741 obj.eventControls = ScriptControlled.CONTROL_ZERO; 2729 obj.eventControls = ScriptControlled.CONTROL_ZERO;
2742 2730
2743 obj.itemID = Script_item_LLUUID; 2731 obj.itemID = Script_item_UUID;
2744 obj.objID = Obj_localID; 2732 obj.objID = Obj_localID;
2745 if (pass_on == 0 && accept == 0) 2733 if (pass_on == 0 && accept == 0)
2746 { 2734 {
@@ -2766,27 +2754,27 @@ namespace OpenSim.Region.Environment.Scenes
2766 if (pass_on == 1 && accept == 0) 2754 if (pass_on == 1 && accept == 0)
2767 { 2755 {
2768 IgnoredControls &= ~(ScriptControlled)controls; 2756 IgnoredControls &= ~(ScriptControlled)controls;
2769 if (scriptedcontrols.ContainsKey(Script_item_LLUUID)) 2757 if (scriptedcontrols.ContainsKey(Script_item_UUID))
2770 scriptedcontrols.Remove(Script_item_LLUUID); 2758 scriptedcontrols.Remove(Script_item_UUID);
2771 2759
2772 } 2760 }
2773 else 2761 else
2774 { 2762 {
2775 2763
2776 if (scriptedcontrols.ContainsKey(Script_item_LLUUID)) 2764 if (scriptedcontrols.ContainsKey(Script_item_UUID))
2777 { 2765 {
2778 scriptedcontrols[Script_item_LLUUID] = obj; 2766 scriptedcontrols[Script_item_UUID] = obj;
2779 } 2767 }
2780 else 2768 else
2781 { 2769 {
2782 scriptedcontrols.Add(Script_item_LLUUID, obj); 2770 scriptedcontrols.Add(Script_item_UUID, obj);
2783 } 2771 }
2784 } 2772 }
2785 } 2773 }
2786 ControllingClient.SendTakeControls(controls, pass_on == 1 ? true : false, true); 2774 ControllingClient.SendTakeControls(controls, pass_on == 1 ? true : false, true);
2787 } 2775 }
2788 2776
2789 public void HandleForceReleaseControls(IClientAPI remoteClient, LLUUID agentID) 2777 public void HandleForceReleaseControls(IClientAPI remoteClient, UUID agentID)
2790 { 2778 {
2791 IgnoredControls = ScriptControlled.CONTROL_ZERO; 2779 IgnoredControls = ScriptControlled.CONTROL_ZERO;
2792 lock (scriptedcontrols) 2780 lock (scriptedcontrols)
@@ -2796,13 +2784,13 @@ namespace OpenSim.Region.Environment.Scenes
2796 ControllingClient.SendTakeControls(int.MaxValue, false, false); 2784 ControllingClient.SendTakeControls(int.MaxValue, false, false);
2797 } 2785 }
2798 2786
2799 public void UnRegisterControlEventsToScript(uint Obj_localID, LLUUID Script_item_LLUUID) 2787 public void UnRegisterControlEventsToScript(uint Obj_localID, UUID Script_item_UUID)
2800 { 2788 {
2801 lock (scriptedcontrols) 2789 lock (scriptedcontrols)
2802 { 2790 {
2803 if (scriptedcontrols.ContainsKey(Script_item_LLUUID)) 2791 if (scriptedcontrols.ContainsKey(Script_item_UUID))
2804 { 2792 {
2805 scriptedcontrols.Remove(Script_item_LLUUID); 2793 scriptedcontrols.Remove(Script_item_UUID);
2806 IgnoredControls = ScriptControlled.CONTROL_ZERO; 2794 IgnoredControls = ScriptControlled.CONTROL_ZERO;
2807 foreach (ScriptControllers scData in scriptedcontrols.Values) 2795 foreach (ScriptControllers scData in scriptedcontrols.Values)
2808 { 2796 {
@@ -2864,7 +2852,7 @@ namespace OpenSim.Region.Environment.Scenes
2864 { 2852 {
2865 lock (scriptedcontrols) 2853 lock (scriptedcontrols)
2866 { 2854 {
2867 foreach (LLUUID scriptUUID in scriptedcontrols.Keys) 2855 foreach (UUID scriptUUID in scriptedcontrols.Keys)
2868 { 2856 {
2869 ScriptControllers scriptControlData = scriptedcontrols[scriptUUID]; 2857 ScriptControllers scriptControlData = scriptedcontrols[scriptUUID];
2870 ScriptControlled localHeld = allflags & scriptControlData.eventControls; // the flags interesting for us 2858 ScriptControlled localHeld = allflags & scriptControlData.eventControls; // the flags interesting for us
@@ -2916,14 +2904,14 @@ namespace OpenSim.Region.Environment.Scenes
2916 return flags; 2904 return flags;
2917 } 2905 }
2918 2906
2919 private void ItemReceived(LLUUID itemID) 2907 private void ItemReceived(UUID itemID)
2920 { 2908 {
2921 int attachpoint = m_appearance.GetAttachpoint(itemID); 2909 int attachpoint = m_appearance.GetAttachpoint(itemID);
2922 if (attachpoint == 0) 2910 if (attachpoint == 0)
2923 return; 2911 return;
2924 2912
2925 LLUUID asset = m_appearance.GetAttachedAsset(attachpoint); 2913 UUID asset = m_appearance.GetAttachedAsset(attachpoint);
2926 if (asset == LLUUID.Zero) // We have just logged in 2914 if (asset == UUID.Zero) // We have just logged in
2927 { 2915 {
2928 m_log.InfoFormat("[ATTACHMENT] Rez attachment {0}", 2916 m_log.InfoFormat("[ATTACHMENT] Rez attachment {0}",
2929 itemID.ToString()); 2917 itemID.ToString());
@@ -2947,7 +2935,7 @@ namespace OpenSim.Region.Environment.Scenes
2947 2935
2948 // Attach from world, if not already attached 2936 // Attach from world, if not already attached
2949 if (att.ParentGroup != null && !att.IsAttachment) 2937 if (att.ParentGroup != null && !att.IsAttachment)
2950 m_scene.AttachObject(ControllingClient, att.ParentGroup.LocalId, (uint)0, att.ParentGroup.GroupRotation, LLVector3.Zero); 2938 m_scene.AttachObject(ControllingClient, att.ParentGroup.LocalId, (uint)0, att.ParentGroup.GroupRotation, Vector3.Zero);
2951 } 2939 }
2952 } 2940 }
2953 } 2941 }