aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs130
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs120
2 files changed, 124 insertions, 126 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 1204020..6984d8f 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -227,6 +227,7 @@ namespace OpenSim.Region.Environment.Scenes
227 get { return m_innerScene.RestorePresences; } 227 get { return m_innerScene.RestorePresences; }
228 set { m_innerScene.RestorePresences = value; } 228 set { m_innerScene.RestorePresences = value; }
229 } 229 }
230
230 #endregion 231 #endregion
231 232
232 #region Constructors 233 #region Constructors
@@ -395,15 +396,15 @@ namespace OpenSim.Region.Environment.Scenes
395 try 396 try
396 { 397 {
397 ForEachScenePresence(delegate(ScenePresence agent) 398 ForEachScenePresence(delegate(ScenePresence agent)
399 {
400 // If agent is a root agent.
401 if (!agent.IsChildAgent)
398 { 402 {
399 // If agent is a root agent. 403 //agent.ControllingClient.new
400 if (!agent.IsChildAgent) 404 //this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo());
401 { 405 InformClientOfNeighbor(agent, otherRegion);
402 //agent.ControllingClient.new
403 //this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo());
404 InformClientOfNeighbor(agent, otherRegion);
405 }
406 } 406 }
407 }
407 ); 408 );
408 } 409 }
409 catch (NullReferenceException) 410 catch (NullReferenceException)
@@ -463,7 +464,7 @@ namespace OpenSim.Region.Environment.Scenes
463 { 464 {
464 if (m_RestartTimerCounter == 4 || m_RestartTimerCounter == 6 || m_RestartTimerCounter == 7) 465 if (m_RestartTimerCounter == 4 || m_RestartTimerCounter == 6 || m_RestartTimerCounter == 7)
465 SendRegionMessageFromEstateTools(LLUUID.Random(), LLUUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in " + 466 SendRegionMessageFromEstateTools(LLUUID.Random(), LLUUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in " +
466 ((8 - m_RestartTimerCounter) * 15) + " seconds"); 467 ((8 - m_RestartTimerCounter) * 15) + " seconds");
467 468
468 // SendGeneralAlert(RegionInfo.RegionName + ": Restarting in " + ((8 - m_RestartTimerCounter)*15) + 469 // SendGeneralAlert(RegionInfo.RegionName + ": Restarting in " + ((8 - m_RestartTimerCounter)*15) +
469 //" seconds"); 470 //" seconds");
@@ -505,15 +506,15 @@ namespace OpenSim.Region.Environment.Scenes
505 try 506 try
506 { 507 {
507 ForEachScenePresence(delegate(ScenePresence agent) 508 ForEachScenePresence(delegate(ScenePresence agent)
509 {
510 // If agent is a root agent.
511 if (!agent.IsChildAgent)
508 { 512 {
509 // If agent is a root agent. 513 //agent.ControllingClient.new
510 if (!agent.IsChildAgent) 514 //this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo());
511 { 515 InformClientOfNeighbor(agent, region);
512 //agent.ControllingClient.new
513 //this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo());
514 InformClientOfNeighbor(agent, region);
515 }
516 } 516 }
517 }
517 ); 518 );
518 } 519 }
519 catch (NullReferenceException) 520 catch (NullReferenceException)
@@ -580,16 +581,16 @@ namespace OpenSim.Region.Environment.Scenes
580 m_log.Warn("[SCENE]: Closing down the single simulator: " + RegionInfo.RegionName); 581 m_log.Warn("[SCENE]: Closing down the single simulator: " + RegionInfo.RegionName);
581 // Kick all ROOT agents with the message, 'The simulator is going down' 582 // Kick all ROOT agents with the message, 'The simulator is going down'
582 ForEachScenePresence(delegate(ScenePresence avatar) 583 ForEachScenePresence(delegate(ScenePresence avatar)
583 { 584 {
584 if (avatar.KnownChildRegions.Contains(RegionInfo.RegionHandle)) 585 if (avatar.KnownChildRegions.Contains(RegionInfo.RegionHandle))
585 avatar.KnownChildRegions.Remove(RegionInfo.RegionHandle); 586 avatar.KnownChildRegions.Remove(RegionInfo.RegionHandle);
586 587
587 if (!avatar.IsChildAgent) 588 if (!avatar.IsChildAgent)
588 avatar.ControllingClient.Kick("The simulator is going down."); 589 avatar.ControllingClient.Kick("The simulator is going down.");
589 590
590 avatar.ControllingClient.OutPacket(PacketPool.Instance.GetPacket(libsecondlife.Packets.PacketType.DisableSimulator), 591 avatar.ControllingClient.OutPacket(PacketPool.Instance.GetPacket(libsecondlife.Packets.PacketType.DisableSimulator),
591 ThrottleOutPacketType.Task); 592 ThrottleOutPacketType.Task);
592 }); 593 });
593 594
594 // Wait here, or the kick messages won't actually get to the agents before the scene terminates. 595 // Wait here, or the kick messages won't actually get to the agents before the scene terminates.
595 Thread.Sleep(500); 596 Thread.Sleep(500);
@@ -793,7 +794,7 @@ namespace OpenSim.Region.Environment.Scenes
793 { 794 {
794 tmpval = tmpval - (tmpval - 1.0f); 795 tmpval = tmpval - (tmpval - 1.0f);
795 } 796 }
796 m_timedilation = tmpval; 797 m_timedilation = tmpval;
797 798
798 m_lastupdate = DateTime.Now; 799 m_lastupdate = DateTime.Now;
799 } 800 }
@@ -884,9 +885,9 @@ namespace OpenSim.Region.Environment.Scenes
884 { 885 {
885 List<MapBlockData> mapBlocks = 886 List<MapBlockData> mapBlocks =
886 m_sceneGridService.RequestNeighbourMapBlocks((int)(RegionInfo.RegionLocX - 9), 887 m_sceneGridService.RequestNeighbourMapBlocks((int)(RegionInfo.RegionLocX - 9),
887 (int)(RegionInfo.RegionLocY - 9), 888 (int)(RegionInfo.RegionLocY - 9),
888 (int)(RegionInfo.RegionLocX + 9), 889 (int)(RegionInfo.RegionLocX + 9),
889 (int)(RegionInfo.RegionLocY + 9)); 890 (int)(RegionInfo.RegionLocY + 9));
890 List<AssetBase> textures = new List<AssetBase>(); 891 List<AssetBase> textures = new List<AssetBase>();
891 List<Image> bitImages = new List<Image>(); 892 List<Image> bitImages = new List<Image>();
892 893
@@ -1048,7 +1049,6 @@ namespace OpenSim.Region.Environment.Scenes
1048 m_log.Info("[SCENE]: Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)"); 1049 m_log.Info("[SCENE]: Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)");
1049 } 1050 }
1050 1051
1051
1052 /// <summary> 1052 /// <summary>
1053 /// Returns a new unallocated primitive ID 1053 /// Returns a new unallocated primitive ID
1054 /// </summary> 1054 /// </summary>
@@ -1134,7 +1134,7 @@ namespace OpenSim.Region.Environment.Scenes
1134 } 1134 }
1135 1135
1136 public SceneObjectGroup AddTree(LLVector3 scale, LLQuaternion rotation, LLVector3 position, 1136 public SceneObjectGroup AddTree(LLVector3 scale, LLQuaternion rotation, LLVector3 position,
1137 Tree treeType, bool newTree) 1137 Tree treeType, bool newTree)
1138 { 1138 {
1139 LLUUID uuid = this.RegionInfo.MasterAvatarAssignedUUID; 1139 LLUUID uuid = this.RegionInfo.MasterAvatarAssignedUUID;
1140 PrimitiveBaseShape treeShape = new PrimitiveBaseShape(); 1140 PrimitiveBaseShape treeShape = new PrimitiveBaseShape();
@@ -1228,7 +1228,7 @@ namespace OpenSim.Region.Environment.Scenes
1228 { 1228 {
1229 pos.Y = ((pos.Y - Constants.RegionSize)); 1229 pos.Y = ((pos.Y - Constants.RegionSize));
1230 newRegionHandle = Util.UIntsToLong((uint)(thisx * Constants.RegionSize), (uint)((thisy + 1) * Constants.RegionSize)); 1230 newRegionHandle = Util.UIntsToLong((uint)(thisx * Constants.RegionSize), (uint)((thisy + 1) * Constants.RegionSize));
1231 // y + 1 1231 // y + 1
1232 } 1232 }
1233 else if (position.Y < -1f) 1233 else if (position.Y < -1f)
1234 { 1234 {
@@ -1269,12 +1269,14 @@ namespace OpenSim.Region.Environment.Scenes
1269 } 1269 }
1270 } 1270 }
1271 } 1271 }
1272
1272 public void IncomingInterRegionPrimGroup(ulong regionHandle, LLUUID primID, string objXMLData) 1273 public void IncomingInterRegionPrimGroup(ulong regionHandle, LLUUID primID, string objXMLData)
1273 { 1274 {
1274 m_log.Warn("{[INTERREGION]: A new prim arrived from a neighbor"); 1275 m_log.Warn("{[INTERREGION]: A new prim arrived from a neighbor");
1275 m_sceneXmlLoader.LoadGroupFromXml2String(objXMLData); 1276 m_sceneXmlLoader.LoadGroupFromXml2String(objXMLData);
1276 1277
1277 } 1278 }
1279
1278 #endregion 1280 #endregion
1279 1281
1280 #region Add/Remove Avatar Methods 1282 #region Add/Remove Avatar Methods
@@ -1301,11 +1303,11 @@ namespace OpenSim.Region.Environment.Scenes
1301 1303
1302 m_innerScene.AddScenePresence(presence); 1304 m_innerScene.AddScenePresence(presence);
1303 1305
1304 lock (m_restorePresences) 1306 lock (m_restorePresences)
1305 { 1307 {
1306 Monitor.PulseAll(m_restorePresences); 1308 Monitor.PulseAll(m_restorePresences);
1307 } 1309 }
1308 } 1310 }
1309 else 1311 else
1310 { 1312 {
1311 m_log.Info("[REGION]: Add New Scene Presence"); 1313 m_log.Info("[REGION]: Add New Scene Presence");
@@ -1382,8 +1384,8 @@ namespace OpenSim.Region.Environment.Scenes
1382 client.OnMoveInventoryItem += MoveInventoryItem; 1384 client.OnMoveInventoryItem += MoveInventoryItem;
1383 client.OnRemoveInventoryItem += RemoveInventoryItem; 1385 client.OnRemoveInventoryItem += RemoveInventoryItem;
1384 client.OnRemoveInventoryFolder += RemoveInventoryFolder; 1386 client.OnRemoveInventoryFolder += RemoveInventoryFolder;
1385 // client.OnAssetUploadRequest += CommsManager.TransactionsManager.HandleUDPUploadRequest; 1387 // client.OnAssetUploadRequest += CommsManager.TransactionsManager.HandleUDPUploadRequest;
1386 // client.OnXferReceive += CommsManager.TransactionsManager.HandleXfer; 1388 // client.OnXferReceive += CommsManager.TransactionsManager.HandleXfer;
1387 client.OnRezScript += RezScript; 1389 client.OnRezScript += RezScript;
1388 1390
1389 client.OnRequestTaskInventory += RequestTaskInventory; 1391 client.OnRequestTaskInventory += RequestTaskInventory;
@@ -1452,8 +1454,8 @@ namespace OpenSim.Region.Environment.Scenes
1452 { 1454 {
1453 m_innerScene.removeUserCount(true); 1455 m_innerScene.removeUserCount(true);
1454 m_sceneGridService.LogOffUser(agentID, RegionInfo.RegionID, RegionInfo.RegionHandle, 1456 m_sceneGridService.LogOffUser(agentID, RegionInfo.RegionID, RegionInfo.RegionHandle,
1455 avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y, 1457 avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y,
1456 avatar.AbsolutePosition.Z); 1458 avatar.AbsolutePosition.Z);
1457 List<ulong> childknownRegions = new List<ulong>(); 1459 List<ulong> childknownRegions = new List<ulong>();
1458 List<ulong> ckn = avatar.GetKnownRegionList(); 1460 List<ulong> ckn = avatar.GetKnownRegionList();
1459 for (int i = 0; i < ckn.Count; i++) 1461 for (int i = 0; i < ckn.Count; i++)
@@ -1477,16 +1479,16 @@ namespace OpenSim.Region.Environment.Scenes
1477 } 1479 }
1478 m_eventManager.TriggerOnRemovePresence(agentID); 1480 m_eventManager.TriggerOnRemovePresence(agentID);
1479 Broadcast(delegate(IClientAPI client) 1481 Broadcast(delegate(IClientAPI client)
1482 {
1483 try
1484 {
1485 client.SendKillObject(avatar.RegionHandle, avatar.LocalId);
1486 }
1487 catch (System.NullReferenceException)
1480 { 1488 {
1481 try 1489 //We can safely ignore null reference exceptions. It means the avatar are dead and cleaned up anyway.
1482 { 1490 }
1483 client.SendKillObject(avatar.RegionHandle, avatar.LocalId); 1491 });
1484 }
1485 catch (System.NullReferenceException)
1486 {
1487 //We can safely ignore null reference exceptions. It means the avatar are dead and cleaned up anyway.
1488 }
1489 });
1490 1492
1491 ForEachScenePresence( 1493 ForEachScenePresence(
1492 delegate(ScenePresence presence) { presence.CoarseLocationChange(); }); 1494 delegate(ScenePresence presence) { presence.CoarseLocationChange(); });
@@ -1903,8 +1905,6 @@ namespace OpenSim.Region.Environment.Scenes
1903 } 1905 }
1904 } 1906 }
1905 1907
1906
1907
1908 #endregion 1908 #endregion
1909 1909
1910 #region Other Methods 1910 #region Other Methods
@@ -2152,10 +2152,10 @@ namespace OpenSim.Region.Environment.Scenes
2152 { 2152 {
2153 2153
2154 ClientManager.ForEachClient(delegate(IClientAPI controller) 2154 ClientManager.ForEachClient(delegate(IClientAPI controller)
2155 { 2155 {
2156 controller.SendBlueBoxMessage(FromAvatarID, fromSessionID, FromAvatarName, Message); 2156 controller.SendBlueBoxMessage(FromAvatarID, fromSessionID, FromAvatarName, Message);
2157 } 2157 }
2158 ); 2158 );
2159 } 2159 }
2160 2160
2161 /// <summary> 2161 /// <summary>
@@ -2180,27 +2180,27 @@ namespace OpenSim.Region.Environment.Scenes
2180 if (agentID == kickUserID) 2180 if (agentID == kickUserID)
2181 { 2181 {
2182 ClientManager.ForEachClient(delegate(IClientAPI controller) 2182 ClientManager.ForEachClient(delegate(IClientAPI controller)
2183 { 2183 {
2184 if (controller.AgentId != godID) 2184 if (controller.AgentId != godID)
2185 controller.Kick(Helpers.FieldToUTF8String(reason)); 2185 controller.Kick(Helpers.FieldToUTF8String(reason));
2186 2186
2187 2187
2188 2188
2189 } 2189 }
2190 ); 2190 );
2191 // This is a bit crude. It seems the client will be null before it actually stops the thread 2191 // This is a bit crude. It seems the client will be null before it actually stops the thread
2192 // The thread will kill itself eventually :/ 2192 // The thread will kill itself eventually :/
2193 // Is there another way to make sure *all* clients get this 'inter region' message? 2193 // Is there another way to make sure *all* clients get this 'inter region' message?
2194 ClientManager.ForEachClient(delegate(IClientAPI controller) 2194 ClientManager.ForEachClient(delegate(IClientAPI controller)
2195 { 2195 {
2196 ScenePresence p = GetScenePresence(controller.AgentId); 2196 ScenePresence p = GetScenePresence(controller.AgentId);
2197 bool childagent = !p.Equals(null) && p.IsChildAgent; 2197 bool childagent = !p.Equals(null) && p.IsChildAgent;
2198 if (controller.AgentId != godID && !childagent) 2198 if (controller.AgentId != godID && !childagent)
2199 // Do we really want to kick the initiator of this madness? 2199 // Do we really want to kick the initiator of this madness?
2200 { 2200 {
2201 controller.Close(true); 2201 controller.Close(true);
2202 }
2203 } 2202 }
2203 }
2204 ); 2204 );
2205 } 2205 }
2206 else 2206 else
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index b00b678..050bf95 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -115,12 +115,11 @@ namespace OpenSim.Region.Environment.Scenes
115 115
116 protected AvatarAppearance m_appearance; 116 protected AvatarAppearance m_appearance;
117 117
118 //neighbouring regions we have enabled a child agent in
118 private readonly List<ulong> m_knownChildRegions = new List<ulong>(); 119 private readonly List<ulong> m_knownChildRegions = new List<ulong>();
119 //neighbouring regions we have enabled a child agent in
120 120
121 private SignificantClientMovement handlerSignificantClientMovement = null; //OnSignificantClientMovement; 121 private SignificantClientMovement handlerSignificantClientMovement = null; //OnSignificantClientMovement;
122 122
123
124 /// <summary> 123 /// <summary>
125 /// Implemented Control Flags 124 /// Implemented Control Flags
126 /// </summary> 125 /// </summary>
@@ -1447,12 +1446,12 @@ namespace OpenSim.Region.Environment.Scenes
1447 m_perfMonMS=System.Environment.TickCount; 1446 m_perfMonMS=System.Environment.TickCount;
1448 1447
1449 m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence) 1448 m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence)
1449 {
1450 if (scenePresence.UUID != UUID)
1450 { 1451 {
1451 if (scenePresence.UUID != UUID) 1452 m_appearance.SendAppearanceToOtherAgent(scenePresence);
1452 { 1453 }
1453 m_appearance.SendAppearanceToOtherAgent(scenePresence); 1454 });
1454 }
1455 });
1456 m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS); 1455 m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS);
1457 } 1456 }
1458 1457
@@ -1780,9 +1779,9 @@ namespace OpenSim.Region.Environment.Scenes
1780 } 1779 }
1781 1780
1782 [SecurityPermission(SecurityAction.LinkDemand, 1781 [SecurityPermission(SecurityAction.LinkDemand,
1783 Flags = SecurityPermissionFlag.SerializationFormatter)] 1782 Flags = SecurityPermissionFlag.SerializationFormatter)]
1784 public virtual void GetObjectData( 1783 public virtual void GetObjectData(
1785 SerializationInfo info, StreamingContext context) 1784 SerializationInfo info, StreamingContext context)
1786 { 1785 {
1787 if (info == null) 1786 if (info == null)
1788 { 1787 {
@@ -1792,7 +1791,6 @@ namespace OpenSim.Region.Environment.Scenes
1792 info.AddValue("FullID", FullID.UUID); 1791 info.AddValue("FullID", FullID.UUID);
1793 info.AddValue("LastFullUpdateTime", LastFullUpdateTime); 1792 info.AddValue("LastFullUpdateTime", LastFullUpdateTime);
1794 info.AddValue("LastTerseUpdateTime", LastTerseUpdateTime); 1793 info.AddValue("LastTerseUpdateTime", LastTerseUpdateTime);
1795
1796 } 1794 }
1797 } 1795 }
1798 1796
@@ -1929,9 +1927,9 @@ namespace OpenSim.Region.Environment.Scenes
1929 1927
1930 m_requestedSitOffset 1928 m_requestedSitOffset
1931 = new LLVector3( 1929 = new LLVector3(
1932 (float)info.GetValue("m_requestedSitOffset.X", typeof(float)), 1930 (float)info.GetValue("m_requestedSitOffset.X", typeof(float)),
1933 (float)info.GetValue("m_requestedSitOffset.Y", typeof(float)), 1931 (float)info.GetValue("m_requestedSitOffset.Y", typeof(float)),
1934 (float)info.GetValue("m_requestedSitOffset.Z", typeof(float))); 1932 (float)info.GetValue("m_requestedSitOffset.Z", typeof(float)));
1935 1933
1936 m_sitAvatarHeight = (float)info.GetValue("m_sitAvatarHeight", typeof(float)); 1934 m_sitAvatarHeight = (float)info.GetValue("m_sitAvatarHeight", typeof(float));
1937 m_godlevel = (float)info.GetValue("m_godlevel", typeof(float)); 1935 m_godlevel = (float)info.GetValue("m_godlevel", typeof(float));
@@ -1939,10 +1937,10 @@ namespace OpenSim.Region.Environment.Scenes
1939 1937
1940 m_bodyRot 1938 m_bodyRot
1941 = new Quaternion( 1939 = new Quaternion(
1942 (float)info.GetValue("m_bodyRot.w", typeof(float)), 1940 (float)info.GetValue("m_bodyRot.w", typeof(float)),
1943 (float)info.GetValue("m_bodyRot.x", typeof(float)), 1941 (float)info.GetValue("m_bodyRot.x", typeof(float)),
1944 (float)info.GetValue("m_bodyRot.y", typeof(float)), 1942 (float)info.GetValue("m_bodyRot.y", typeof(float)),
1945 (float)info.GetValue("m_bodyRot.z", typeof(float))); 1943 (float)info.GetValue("m_bodyRot.z", typeof(float)));
1946 1944
1947 IsRestrictedToRegion = (bool)info.GetValue("IsRestrictedToRegion", typeof(bool)); 1945 IsRestrictedToRegion = (bool)info.GetValue("IsRestrictedToRegion", typeof(bool));
1948 m_newForce = (bool)info.GetValue("m_newForce", typeof(bool)); 1946 m_newForce = (bool)info.GetValue("m_newForce", typeof(bool));
@@ -1964,33 +1962,33 @@ namespace OpenSim.Region.Environment.Scenes
1964 1962
1965 lastPhysPos 1963 lastPhysPos
1966 = new LLVector3( 1964 = new LLVector3(
1967 (float)info.GetValue("lastPhysPos.X", typeof(float)), 1965 (float)info.GetValue("lastPhysPos.X", typeof(float)),
1968 (float)info.GetValue("lastPhysPos.Y", typeof(float)), 1966 (float)info.GetValue("lastPhysPos.Y", typeof(float)),
1969 (float)info.GetValue("lastPhysPos.Z", typeof(float))); 1967 (float)info.GetValue("lastPhysPos.Z", typeof(float)));
1970 1968
1971 m_CameraCenter 1969 m_CameraCenter
1972 = new Vector3( 1970 = new Vector3(
1973 (float)info.GetValue("m_CameraCenter.X", typeof(float)), 1971 (float)info.GetValue("m_CameraCenter.X", typeof(float)),
1974 (float)info.GetValue("m_CameraCenter.Y", typeof(float)), 1972 (float)info.GetValue("m_CameraCenter.Y", typeof(float)),
1975 (float)info.GetValue("m_CameraCenter.Z", typeof(float))); 1973 (float)info.GetValue("m_CameraCenter.Z", typeof(float)));
1976 1974
1977 m_CameraAtAxis 1975 m_CameraAtAxis
1978 = new Vector3( 1976 = new Vector3(
1979 (float)info.GetValue("m_CameraAtAxis.X", typeof(float)), 1977 (float)info.GetValue("m_CameraAtAxis.X", typeof(float)),
1980 (float)info.GetValue("m_CameraAtAxis.Y", typeof(float)), 1978 (float)info.GetValue("m_CameraAtAxis.Y", typeof(float)),
1981 (float)info.GetValue("m_CameraAtAxis.Z", typeof(float))); 1979 (float)info.GetValue("m_CameraAtAxis.Z", typeof(float)));
1982 1980
1983 m_CameraLeftAxis 1981 m_CameraLeftAxis
1984 = new Vector3( 1982 = new Vector3(
1985 (float)info.GetValue("m_CameraLeftAxis.X", typeof(float)), 1983 (float)info.GetValue("m_CameraLeftAxis.X", typeof(float)),
1986 (float)info.GetValue("m_CameraLeftAxis.Y", typeof(float)), 1984 (float)info.GetValue("m_CameraLeftAxis.Y", typeof(float)),
1987 (float)info.GetValue("m_CameraLeftAxis.Z", typeof(float))); 1985 (float)info.GetValue("m_CameraLeftAxis.Z", typeof(float)));
1988 1986
1989 m_CameraUpAxis 1987 m_CameraUpAxis
1990 = new Vector3( 1988 = new Vector3(
1991 (float)info.GetValue("m_CameraUpAxis.X", typeof(float)), 1989 (float)info.GetValue("m_CameraUpAxis.X", typeof(float)),
1992 (float)info.GetValue("m_CameraUpAxis.Y", typeof(float)), 1990 (float)info.GetValue("m_CameraUpAxis.Y", typeof(float)),
1993 (float)info.GetValue("m_CameraUpAxis.Z", typeof(float))); 1991 (float)info.GetValue("m_CameraUpAxis.Z", typeof(float)));
1994 1992
1995 m_DrawDistance = (float)info.GetValue("m_DrawDistance", typeof(float)); 1993 m_DrawDistance = (float)info.GetValue("m_DrawDistance", typeof(float));
1996 m_appearance = (AvatarAppearance)info.GetValue("m_appearance", typeof(AvatarAppearance)); 1994 m_appearance = (AvatarAppearance)info.GetValue("m_appearance", typeof(AvatarAppearance));
@@ -1998,9 +1996,9 @@ namespace OpenSim.Region.Environment.Scenes
1998 1996
1999 posLastSignificantMove 1997 posLastSignificantMove
2000 = new LLVector3( 1998 = new LLVector3(
2001 (float)info.GetValue("posLastSignificantMove.X", typeof(float)), 1999 (float)info.GetValue("posLastSignificantMove.X", typeof(float)),
2002 (float)info.GetValue("posLastSignificantMove.Y", typeof(float)), 2000 (float)info.GetValue("posLastSignificantMove.Y", typeof(float)),
2003 (float)info.GetValue("posLastSignificantMove.Z", typeof(float))); 2001 (float)info.GetValue("posLastSignificantMove.Z", typeof(float)));
2004 2002
2005 // m_partsUpdateQueue = (UpdateQueue)info.GetValue("m_partsUpdateQueue", typeof(UpdateQueue)); 2003 // m_partsUpdateQueue = (UpdateQueue)info.GetValue("m_partsUpdateQueue", typeof(UpdateQueue));
2006 2004
@@ -2018,41 +2016,41 @@ namespace OpenSim.Region.Environment.Scenes
2018 m_lastname = (string)info.GetValue("m_lastname", typeof(string)); 2016 m_lastname = (string)info.GetValue("m_lastname", typeof(string));
2019 m_allowMovement = (bool)info.GetValue("m_allowMovement", typeof(bool)); 2017 m_allowMovement = (bool)info.GetValue("m_allowMovement", typeof(bool));
2020 m_parentPosition = new LLVector3((float)info.GetValue("m_parentPosition.X", typeof(float)), 2018 m_parentPosition = new LLVector3((float)info.GetValue("m_parentPosition.X", typeof(float)),
2021 (float)info.GetValue("m_parentPosition.Y", typeof(float)), 2019 (float)info.GetValue("m_parentPosition.Y", typeof(float)),
2022 (float)info.GetValue("m_parentPosition.Z", typeof(float))); 2020 (float)info.GetValue("m_parentPosition.Z", typeof(float)));
2023 2021
2024 m_isChildAgent = (bool)info.GetValue("m_isChildAgent", typeof(bool)); 2022 m_isChildAgent = (bool)info.GetValue("m_isChildAgent", typeof(bool));
2025 m_parentID = (uint)info.GetValue("m_parentID", typeof(uint)); 2023 m_parentID = (uint)info.GetValue("m_parentID", typeof(uint));
2026 2024
2027// for OpenSim_v0.5 2025// for OpenSim_v0.5
2028 currentParcelUUID = new LLUUID((Guid)info.GetValue("currentParcelUUID", typeof(Guid))); 2026 currentParcelUUID = new LLUUID((Guid)info.GetValue("currentParcelUUID", typeof(Guid)));
2029 2027
2030 lastKnownAllowedPosition 2028 lastKnownAllowedPosition
2031 = new Vector3( 2029 = new Vector3(
2032 (float)info.GetValue("lastKnownAllowedPosition.X", typeof(float)), 2030 (float)info.GetValue("lastKnownAllowedPosition.X", typeof(float)),
2033 (float)info.GetValue("lastKnownAllowedPosition.Y", typeof(float)), 2031 (float)info.GetValue("lastKnownAllowedPosition.Y", typeof(float)),
2034 (float)info.GetValue("lastKnownAllowedPosition.Z", typeof(float))); 2032 (float)info.GetValue("lastKnownAllowedPosition.Z", typeof(float)));
2035 2033
2036 sentMessageAboutRestrictedParcelFlyingDown = (bool)info.GetValue("sentMessageAboutRestrictedParcelFlyingDown", typeof(bool)); 2034 sentMessageAboutRestrictedParcelFlyingDown = (bool)info.GetValue("sentMessageAboutRestrictedParcelFlyingDown", typeof(bool));
2037 2035
2038 m_LastChildAgentUpdatePosition 2036 m_LastChildAgentUpdatePosition
2039 = new LLVector3( 2037 = new LLVector3(
2040 (float)info.GetValue("m_LastChildAgentUpdatePosition.X", typeof(float)), 2038 (float)info.GetValue("m_LastChildAgentUpdatePosition.X", typeof(float)),
2041 (float)info.GetValue("m_LastChildAgentUpdatePosition.Y", typeof(float)), 2039 (float)info.GetValue("m_LastChildAgentUpdatePosition.Y", typeof(float)),
2042 (float)info.GetValue("m_LastChildAgentUpdatePosition.Z", typeof(float))); 2040 (float)info.GetValue("m_LastChildAgentUpdatePosition.Z", typeof(float)));
2043 2041
2044 m_perfMonMS = (int)info.GetValue("m_perfMonMS", typeof(int)); 2042 m_perfMonMS = (int)info.GetValue("m_perfMonMS", typeof(int));
2045 m_AgentControlFlags = (uint)info.GetValue("m_AgentControlFlags", typeof(uint)); 2043 m_AgentControlFlags = (uint)info.GetValue("m_AgentControlFlags", typeof(uint));
2046 2044
2047 m_headrotation 2045 m_headrotation
2048 = new LLQuaternion( 2046 = new LLQuaternion(
2049 (float)info.GetValue("m_headrotation.W", typeof(float)), 2047 (float)info.GetValue("m_headrotation.W", typeof(float)),
2050 (float)info.GetValue("m_headrotation.X", typeof(float)), 2048 (float)info.GetValue("m_headrotation.X", typeof(float)),
2051 (float)info.GetValue("m_headrotation.Y", typeof(float)), 2049 (float)info.GetValue("m_headrotation.Y", typeof(float)),
2052 (float)info.GetValue("m_headrotation.Z", typeof(float))); 2050 (float)info.GetValue("m_headrotation.Z", typeof(float)));
2053 2051
2054 m_state = (byte)info.GetValue("m_state", typeof(byte)); 2052 m_state = (byte)info.GetValue("m_state", typeof(byte));
2055 2053
2056 List<Guid> knownPrimUUID_work = (List<Guid>)info.GetValue("m_knownPrimUUID", typeof(List<Guid>)); 2054 List<Guid> knownPrimUUID_work = (List<Guid>)info.GetValue("m_knownPrimUUID", typeof(List<Guid>));
2057 2055
2058 foreach (Guid id in knownPrimUUID_work) 2056 foreach (Guid id in knownPrimUUID_work)
@@ -2064,9 +2062,9 @@ namespace OpenSim.Region.Environment.Scenes
2064 } 2062 }
2065 2063
2066 [SecurityPermission(SecurityAction.LinkDemand, 2064 [SecurityPermission(SecurityAction.LinkDemand,
2067 Flags = SecurityPermissionFlag.SerializationFormatter)] 2065 Flags = SecurityPermissionFlag.SerializationFormatter)]
2068 public override void GetObjectData( 2066 public override void GetObjectData(
2069 SerializationInfo info, StreamingContext context) 2067 SerializationInfo info, StreamingContext context)
2070 { 2068 {
2071 if (info == null) 2069 if (info == null)
2072 { 2070 {
@@ -2196,17 +2194,17 @@ namespace OpenSim.Region.Environment.Scenes
2196 info.AddValue("m_LastChildAgentUpdatePosition.X", m_LastChildAgentUpdatePosition.X); 2194 info.AddValue("m_LastChildAgentUpdatePosition.X", m_LastChildAgentUpdatePosition.X);
2197 info.AddValue("m_LastChildAgentUpdatePosition.Y", m_LastChildAgentUpdatePosition.Y); 2195 info.AddValue("m_LastChildAgentUpdatePosition.Y", m_LastChildAgentUpdatePosition.Y);
2198 info.AddValue("m_LastChildAgentUpdatePosition.Z", m_LastChildAgentUpdatePosition.Z); 2196 info.AddValue("m_LastChildAgentUpdatePosition.Z", m_LastChildAgentUpdatePosition.Z);
2199 2197
2200 info.AddValue("m_perfMonMS", m_perfMonMS); 2198 info.AddValue("m_perfMonMS", m_perfMonMS);
2201 info.AddValue("m_AgentControlFlags", m_AgentControlFlags); 2199 info.AddValue("m_AgentControlFlags", m_AgentControlFlags);
2202 2200
2203 info.AddValue("m_headrotation.W", m_headrotation.W); 2201 info.AddValue("m_headrotation.W", m_headrotation.W);
2204 info.AddValue("m_headrotation.X", m_headrotation.X); 2202 info.AddValue("m_headrotation.X", m_headrotation.X);
2205 info.AddValue("m_headrotation.Y", m_headrotation.Y); 2203 info.AddValue("m_headrotation.Y", m_headrotation.Y);
2206 info.AddValue("m_headrotation.Z", m_headrotation.Z); 2204 info.AddValue("m_headrotation.Z", m_headrotation.Z);
2207 2205
2208 info.AddValue("m_state", m_state); 2206 info.AddValue("m_state", m_state);
2209 2207
2210 List<Guid> knownPrimUUID_work = new List<Guid>(); 2208 List<Guid> knownPrimUUID_work = new List<Guid>();
2211 2209
2212 foreach (LLUUID id in m_knownPrimUUID) 2210 foreach (LLUUID id in m_knownPrimUUID)
@@ -2215,6 +2213,6 @@ namespace OpenSim.Region.Environment.Scenes
2215 } 2213 }
2216 2214
2217 info.AddValue("m_knownPrimUUID", knownPrimUUID_work); 2215 info.AddValue("m_knownPrimUUID", knownPrimUUID_work);
2218 } 2216 }
2219 } 2217 }
2220} 2218}