aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorAdam Frisby2009-08-16 21:21:38 +1000
committerAdam Frisby2009-08-16 21:21:38 +1000
commitaea4d7c63b64ee06e51725acb6d1e48c971b26d8 (patch)
treef2be39d773040ea117f194f2a341e1df0adc2c60 /OpenSim/Region
parent* [MRM] Implements permission checks on IObject implementations in SOPObject.... (diff)
parentAdd copyright headers. Formatting cleanup. (diff)
downloadopensim-SC-aea4d7c63b64ee06e51725acb6d1e48c971b26d8.zip
opensim-SC-aea4d7c63b64ee06e51725acb6d1e48c971b26d8.tar.gz
opensim-SC-aea4d7c63b64ee06e51725acb6d1e48c971b26d8.tar.bz2
opensim-SC-aea4d7c63b64ee06e51725acb6d1e48c971b26d8.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs25
-rw-r--r--OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs14
-rw-r--r--OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs1
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs23
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs1
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs17
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs51
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs52
-rw-r--r--OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs1
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/ISecurityCredential.cs27
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs2
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/SecurityCredential.cs29
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs1
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs13
15 files changed, 165 insertions, 94 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 7633b7b..12c2d86 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -197,6 +197,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
197 private ObjectExtraParams handlerUpdateExtraParams; //OnUpdateExtraParams; 197 private ObjectExtraParams handlerUpdateExtraParams; //OnUpdateExtraParams;
198 private ObjectDuplicate handlerObjectDuplicate; 198 private ObjectDuplicate handlerObjectDuplicate;
199 private ObjectDuplicateOnRay handlerObjectDuplicateOnRay; 199 private ObjectDuplicateOnRay handlerObjectDuplicateOnRay;
200 private ObjectRequest handlerObjectRequest;
200 private ObjectSelect handlerObjectSelect; 201 private ObjectSelect handlerObjectSelect;
201 private ObjectDeselect handlerObjectDeselect; 202 private ObjectDeselect handlerObjectDeselect;
202 private ObjectIncludeInSearch handlerObjectIncludeInSearch; 203 private ObjectIncludeInSearch handlerObjectIncludeInSearch;
@@ -1083,6 +1084,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1083 public event GodKickUser OnGodKickUser; 1084 public event GodKickUser OnGodKickUser;
1084 public event ObjectExtraParams OnUpdateExtraParams; 1085 public event ObjectExtraParams OnUpdateExtraParams;
1085 public event UpdateShape OnUpdatePrimShape; 1086 public event UpdateShape OnUpdatePrimShape;
1087 public event ObjectRequest OnObjectRequest;
1086 public event ObjectSelect OnObjectSelect; 1088 public event ObjectSelect OnObjectSelect;
1087 public event ObjectDeselect OnObjectDeselect; 1089 public event ObjectDeselect OnObjectDeselect;
1088 public event GenericCall7 OnObjectDescription; 1090 public event GenericCall7 OnObjectDescription;
@@ -5937,6 +5939,29 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5937 5939
5938 break; 5940 break;
5939 5941
5942 case PacketType.RequestMultipleObjects:
5943 RequestMultipleObjectsPacket incomingRequest = (RequestMultipleObjectsPacket)Pack;
5944
5945 #region Packet Session and User Check
5946 if (m_checkPackets)
5947 {
5948 if (incomingRequest.AgentData.SessionID != SessionId ||
5949 incomingRequest.AgentData.AgentID != AgentId)
5950 break;
5951 }
5952 #endregion
5953
5954 handlerObjectRequest = null;
5955
5956 for (int i = 0; i < incomingRequest.ObjectData.Length; i++)
5957 {
5958 handlerObjectRequest = OnObjectRequest;
5959 if (handlerObjectRequest != null)
5960 {
5961 handlerObjectRequest(incomingRequest.ObjectData[i].ID, this);
5962 }
5963 }
5964 break;
5940 case PacketType.ObjectSelect: 5965 case PacketType.ObjectSelect:
5941 ObjectSelectPacket incomingselect = (ObjectSelectPacket)Pack; 5966 ObjectSelectPacket incomingselect = (ObjectSelectPacket)Pack;
5942 5967
diff --git a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs
index bcf20be..e9c1e9d 100644
--- a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs
+++ b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs
@@ -450,7 +450,7 @@ namespace OpenSim.Region.CoreModules.InterGrid
450 450
451 responseMap["sim_host"] = OSD.FromString(reg.ExternalHostName); 451 responseMap["sim_host"] = OSD.FromString(reg.ExternalHostName);
452 452
453 // DEPRECIATED 453 // DEPRECATED
454 responseMap["sim_ip"] = OSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString()); 454 responseMap["sim_ip"] = OSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString());
455 455
456 responseMap["connect"] = OSD.FromBoolean(true); 456 responseMap["connect"] = OSD.FromBoolean(true);
@@ -591,7 +591,7 @@ namespace OpenSim.Region.CoreModules.InterGrid
591 httpaddr = httpsCN; 591 httpaddr = httpsCN;
592 } 592 }
593 593
594 // DEPRECIATED 594 // DEPRECATED
595 responseMap["seed_capability"] 595 responseMap["seed_capability"]
596 = OSD.FromString( 596 = OSD.FromString(
597 regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + CapsUtil.GetCapsSeedPath(userCap.CapsObjectPath)); 597 regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + CapsUtil.GetCapsSeedPath(userCap.CapsObjectPath));
@@ -764,7 +764,7 @@ namespace OpenSim.Region.CoreModules.InterGrid
764 responseMap["sim_port"] = OSD.FromInteger(reg.InternalEndPoint.Port); 764 responseMap["sim_port"] = OSD.FromInteger(reg.InternalEndPoint.Port);
765 responseMap["sim_host"] = OSD.FromString(reg.ExternalHostName);// + ":" + reg.InternalEndPoint.Port.ToString()); 765 responseMap["sim_host"] = OSD.FromString(reg.ExternalHostName);// + ":" + reg.InternalEndPoint.Port.ToString());
766 766
767 // DEPRECIATED 767 // DEPRECATED
768 responseMap["sim_ip"] = OSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString()); 768 responseMap["sim_ip"] = OSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString());
769 769
770 responseMap["session_id"] = OSD.FromUUID(SessionID); 770 responseMap["session_id"] = OSD.FromUUID(SessionID);
@@ -851,7 +851,7 @@ namespace OpenSim.Region.CoreModules.InterGrid
851 851
852 string rezRespSeedCap = ""; 852 string rezRespSeedCap = "";
853 853
854 // DEPRECIATED 854 // DEPRECATED
855 if (rezResponseMap.ContainsKey("seed_capability")) 855 if (rezResponseMap.ContainsKey("seed_capability"))
856 rezRespSeedCap = rezResponseMap["seed_capability"].AsString(); 856 rezRespSeedCap = rezResponseMap["seed_capability"].AsString();
857 857
@@ -863,7 +863,7 @@ namespace OpenSim.Region.CoreModules.InterGrid
863 if (rezResponseMap.ContainsKey("rez_avatar/rez")) 863 if (rezResponseMap.ContainsKey("rez_avatar/rez"))
864 rezRespSeedCap = rezResponseMap["rez_avatar/rez"].AsString(); 864 rezRespSeedCap = rezResponseMap["rez_avatar/rez"].AsString();
865 865
866 // DEPRECIATED 866 // DEPRECATED
867 string rezRespSim_ip = rezResponseMap["sim_ip"].AsString(); 867 string rezRespSim_ip = rezResponseMap["sim_ip"].AsString();
868 868
869 string rezRespSim_host = rezResponseMap["sim_host"].AsString(); 869 string rezRespSim_host = rezResponseMap["sim_host"].AsString();
@@ -879,13 +879,13 @@ namespace OpenSim.Region.CoreModules.InterGrid
879 { 879 {
880 RezResponsePositionArray = (OSDArray)rezResponseMap["position"]; 880 RezResponsePositionArray = (OSDArray)rezResponseMap["position"];
881 } 881 }
882 // DEPRECIATED 882 // DEPRECATED
883 responseMap["seed_capability"] = OSD.FromString(rezRespSeedCap); 883 responseMap["seed_capability"] = OSD.FromString(rezRespSeedCap);
884 884
885 // REPLACEMENT r3 885 // REPLACEMENT r3
886 responseMap["region_seed_capability"] = OSD.FromString(rezRespSeedCap); 886 responseMap["region_seed_capability"] = OSD.FromString(rezRespSeedCap);
887 887
888 // DEPRECIATED 888 // DEPRECATED
889 responseMap["sim_ip"] = OSD.FromString(Util.GetHostFromDNS(rezRespSim_ip).ToString()); 889 responseMap["sim_ip"] = OSD.FromString(Util.GetHostFromDNS(rezRespSim_ip).ToString());
890 890
891 responseMap["sim_host"] = OSD.FromString(rezRespSim_host); 891 responseMap["sim_host"] = OSD.FromString(rezRespSim_host);
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index 62779e7..e9c35e9 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -107,6 +107,7 @@ namespace OpenSim.Region.Examples.SimpleModule
107 public event UpdateShape OnUpdatePrimShape; 107 public event UpdateShape OnUpdatePrimShape;
108 public event ObjectExtraParams OnUpdateExtraParams; 108 public event ObjectExtraParams OnUpdateExtraParams;
109 public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily; 109 public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily;
110 public event ObjectRequest OnObjectRequest;
110 public event ObjectSelect OnObjectSelect; 111 public event ObjectSelect OnObjectSelect;
111 public event GenericCall7 OnObjectDescription; 112 public event GenericCall7 OnObjectDescription;
112 public event GenericCall7 OnObjectName; 113 public event GenericCall7 OnObjectName;
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index 7bbe045..287d8d9 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -63,7 +63,7 @@ namespace OpenSim.Region.Framework.Scenes
63 public delegate void OnNewClientDelegate(IClientAPI client); 63 public delegate void OnNewClientDelegate(IClientAPI client);
64 64
65 /// <summary> 65 /// <summary>
66 /// Depreciated in favour of OnClientConnect. 66 /// Deprecated in favour of OnClientConnect.
67 /// Will be marked Obsolete after IClientCore has 100% of IClientAPI interfaces. 67 /// Will be marked Obsolete after IClientCore has 100% of IClientAPI interfaces.
68 /// </summary> 68 /// </summary>
69 public event OnNewClientDelegate OnNewClient; 69 public event OnNewClientDelegate OnNewClient;
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index 113918d..1a7f8f8 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
@@ -109,6 +109,29 @@ namespace OpenSim.Region.Framework.Scenes
109 } 109 }
110 110
111 /// <summary> 111 /// <summary>
112 /// Invoked when the client requests a prim.
113 /// </summary>
114 /// <param name="primLocalID"></param>
115 /// <param name="remoteClient"></param>
116 public void RequestPrim(uint primLocalID, IClientAPI remoteClient)
117 {
118 PacketType i = PacketType.ObjectUpdate;
119 List<EntityBase> EntityList = GetEntities();
120
121 foreach (EntityBase ent in EntityList)
122 {
123 if (ent is SceneObjectGroup)
124 {
125 if (((SceneObjectGroup)ent).LocalId == primLocalID)
126 {
127 ((SceneObjectGroup)ent).SendFullUpdateToClient(remoteClient);
128 return;
129 }
130 }
131 }
132 }
133
134 /// <summary>
112 /// Invoked when the client selects a prim. 135 /// Invoked when the client selects a prim.
113 /// </summary> 136 /// </summary>
114 /// <param name="primLocalID"></param> 137 /// <param name="primLocalID"></param>
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 18d7bad..a2275f8 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2076,6 +2076,7 @@ namespace OpenSim.Region.Framework.Scenes
2076 client.OnUpdatePrimTexture += m_sceneGraph.UpdatePrimTexture; 2076 client.OnUpdatePrimTexture += m_sceneGraph.UpdatePrimTexture;
2077 client.OnTeleportLocationRequest += RequestTeleportLocation; 2077 client.OnTeleportLocationRequest += RequestTeleportLocation;
2078 client.OnTeleportLandmarkRequest += RequestTeleportLandmark; 2078 client.OnTeleportLandmarkRequest += RequestTeleportLandmark;
2079 client.OnObjectRequest += RequestPrim;
2079 client.OnObjectSelect += SelectPrim; 2080 client.OnObjectSelect += SelectPrim;
2080 client.OnObjectDeselect += DeselectPrim; 2081 client.OnObjectDeselect += DeselectPrim;
2081 client.OnGrabUpdate += m_sceneGraph.MoveObject; 2082 client.OnGrabUpdate += m_sceneGraph.MoveObject;
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 0e0999a..7771831 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -928,25 +928,22 @@ namespace OpenSim.Region.Framework.Scenes
928 { 928 {
929 // Primitive Ray Tracing 929 // Primitive Ray Tracing
930 float closestDistance = 280f; 930 float closestDistance = 280f;
931 EntityIntersection returnResult = new EntityIntersection(); 931 EntityIntersection result = new EntityIntersection();
932 List<EntityBase> EntityList = GetEntities(); 932 List<EntityBase> EntityList = GetEntities();
933 foreach (EntityBase ent in EntityList) 933 foreach (EntityBase ent in EntityList)
934 { 934 {
935 if (ent is SceneObjectGroup) 935 if (ent is SceneObjectGroup)
936 { 936 {
937 SceneObjectGroup reportingG = (SceneObjectGroup)ent; 937 SceneObjectGroup reportingG = (SceneObjectGroup)ent;
938 EntityIntersection result = reportingG.TestIntersection(hray, frontFacesOnly, faceCenters); 938 EntityIntersection inter = reportingG.TestIntersection(hray, frontFacesOnly, faceCenters);
939 if (result.HitTF) 939 if (inter.HitTF && inter.distance < closestDistance)
940 { 940 {
941 if (result.distance < closestDistance) 941 closestDistance = inter.distance;
942 { 942 result = inter;
943 closestDistance = result.distance;
944 returnResult = result;
945 }
946 } 943 }
947 } 944 }
948 } 945 }
949 return returnResult; 946 return result;
950 } 947 }
951 948
952 /// <summary> 949 /// <summary>
@@ -979,7 +976,7 @@ namespace OpenSim.Region.Framework.Scenes
979 { 976 {
980 foreach (SceneObjectPart p in ((SceneObjectGroup) ent).GetParts()) 977 foreach (SceneObjectPart p in ((SceneObjectGroup) ent).GetParts())
981 { 978 {
982 if (p.Name==name) 979 if (p.Name == name)
983 { 980 {
984 return p; 981 return p;
985 } 982 }
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index c86e4a1..bc3d5c0 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -555,7 +555,7 @@ namespace OpenSim.Region.Framework.Scenes
555 // If we get a result, we're going to find the closest result to the origin of the ray 555 // If we get a result, we're going to find the closest result to the origin of the ray
556 // and send back the intersection information back to the innerscene. 556 // and send back the intersection information back to the innerscene.
557 557
558 EntityIntersection returnresult = new EntityIntersection(); 558 EntityIntersection result = new EntityIntersection();
559 559
560 lock (m_parts) 560 lock (m_parts)
561 { 561 {
@@ -576,26 +576,23 @@ namespace OpenSim.Region.Framework.Scenes
576 // when the camera crosses the border. 576 // when the camera crosses the border.
577 float idist = Constants.RegionSize; 577 float idist = Constants.RegionSize;
578 578
579
580 if (inter.HitTF) 579 if (inter.HitTF)
581 { 580 {
582 // We need to find the closest prim to return to the testcaller along the ray 581 // We need to find the closest prim to return to the testcaller along the ray
583 if (inter.distance < idist) 582 if (inter.distance < idist)
584 { 583 {
585 returnresult.HitTF = true; 584 result.HitTF = true;
586 returnresult.ipoint = inter.ipoint; 585 result.ipoint = inter.ipoint;
587 returnresult.obj = part; 586 result.obj = part;
588 returnresult.normal = inter.normal; 587 result.normal = inter.normal;
589 returnresult.distance = inter.distance; 588 result.distance = inter.distance;
590 } 589 }
591 } 590 }
592 } 591 }
593 } 592 }
594 return returnresult; 593 return result;
595 } 594 }
596 595
597
598
599 /// <summary> 596 /// <summary>
600 /// Gets a vector representing the size of the bounding box containing all the prims in the group 597 /// Gets a vector representing the size of the bounding box containing all the prims in the group
601 /// Treats all prims as rectangular, so no shape (cut etc) is taken into account 598 /// Treats all prims as rectangular, so no shape (cut etc) is taken into account
@@ -652,7 +649,6 @@ namespace OpenSim.Region.Framework.Scenes
652 frontBottomRight.Y = orig.Y + (part.Scale.Y / 2); 649 frontBottomRight.Y = orig.Y + (part.Scale.Y / 2);
653 frontBottomRight.Z = orig.Z - (part.Scale.Z / 2); 650 frontBottomRight.Z = orig.Z - (part.Scale.Z / 2);
654 651
655
656 backTopLeft.X = orig.X + (part.Scale.X / 2); 652 backTopLeft.X = orig.X + (part.Scale.X / 2);
657 backTopLeft.Y = orig.Y - (part.Scale.Y / 2); 653 backTopLeft.Y = orig.Y - (part.Scale.Y / 2);
658 backTopLeft.Z = orig.Z + (part.Scale.Z / 2); 654 backTopLeft.Z = orig.Z + (part.Scale.Z / 2);
@@ -839,7 +835,6 @@ namespace OpenSim.Region.Framework.Scenes
839 if (backBottomLeft.Z < minZ) 835 if (backBottomLeft.Z < minZ)
840 minZ = backBottomLeft.Z; 836 minZ = backBottomLeft.Z;
841 } 837 }
842
843 } 838 }
844 839
845 Vector3 boundingBox = new Vector3(maxX - minX, maxY - minY, maxZ - minZ); 840 Vector3 boundingBox = new Vector3(maxX - minX, maxY - minY, maxZ - minZ);
@@ -860,6 +855,7 @@ namespace OpenSim.Region.Framework.Scenes
860 // m_log.InfoFormat("BoundingBox is {0} , {1} , {2} ", boundingBox.X, boundingBox.Y, boundingBox.Z); 855 // m_log.InfoFormat("BoundingBox is {0} , {1} , {2} ", boundingBox.X, boundingBox.Y, boundingBox.Z);
861 return boundingBox; 856 return boundingBox;
862 } 857 }
858
863 #endregion 859 #endregion
864 860
865 public void SaveScriptedState(XmlTextWriter writer) 861 public void SaveScriptedState(XmlTextWriter writer)
@@ -1029,8 +1025,8 @@ namespace OpenSim.Region.Framework.Scenes
1029 //m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_scene.m_physicalPrim); 1025 //m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_scene.m_physicalPrim);
1030 //AttachToBackup(); 1026 //AttachToBackup();
1031 //m_rootPart.ScheduleFullUpdate(); 1027 //m_rootPart.ScheduleFullUpdate();
1032
1033 } 1028 }
1029
1034 /// <summary> 1030 /// <summary>
1035 /// 1031 ///
1036 /// </summary> 1032 /// </summary>
@@ -1130,6 +1126,7 @@ namespace OpenSim.Region.Framework.Scenes
1130 } 1126 }
1131 } 1127 }
1132 } 1128 }
1129
1133 // helper provided for parts. 1130 // helper provided for parts.
1134 public int GetSceneMaxUndo() 1131 public int GetSceneMaxUndo()
1135 { 1132 {
@@ -1183,7 +1180,6 @@ namespace OpenSim.Region.Framework.Scenes
1183 { 1180 {
1184 SceneObjectPart part = GetChildPart(localId); 1181 SceneObjectPart part = GetChildPart(localId);
1185 OnGrabPart(part, offsetPos, remoteClient); 1182 OnGrabPart(part, offsetPos, remoteClient);
1186
1187 } 1183 }
1188 } 1184 }
1189 1185
@@ -1267,28 +1263,10 @@ namespace OpenSim.Region.Framework.Scenes
1267 } 1263 }
1268 } 1264 }
1269 1265
1270 if ((aggregateScriptEvents & scriptEvents.at_target) != 0) 1266 m_scriptListens_atTarget = ((aggregateScriptEvents & scriptEvents.at_target) != 0);
1271 { 1267 m_scriptListens_notAtTarget = ((aggregateScriptEvents & scriptEvents.not_at_target) != 0);
1272 m_scriptListens_atTarget = true;
1273 }
1274 else
1275 {
1276 m_scriptListens_atTarget = false;
1277 }
1278
1279 if ((aggregateScriptEvents & scriptEvents.not_at_target) != 0)
1280 {
1281 m_scriptListens_notAtTarget = true;
1282 }
1283 else
1284 {
1285 m_scriptListens_notAtTarget = false;
1286 }
1287 1268
1288 if (m_scriptListens_atTarget || m_scriptListens_notAtTarget) 1269 if (!m_scriptListens_atTarget && !m_scriptListens_notAtTarget)
1289 {
1290 }
1291 else
1292 { 1270 {
1293 lock (m_targets) 1271 lock (m_targets)
1294 m_targets.Clear(); 1272 m_targets.Clear();
@@ -1787,9 +1765,6 @@ namespace OpenSim.Region.Framework.Scenes
1787 } 1765 }
1788 } 1766 }
1789 1767
1790
1791
1792
1793 /// <summary> 1768 /// <summary>
1794 /// Set the owner of the root part. 1769 /// Set the owner of the root part.
1795 /// </summary> 1770 /// </summary>
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 3646811..5a74bad 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -2710,11 +2710,10 @@ if (m_shape != null) {
2710 2710
2711 public EntityIntersection TestIntersection(Ray iray, Quaternion parentrot) 2711 public EntityIntersection TestIntersection(Ray iray, Quaternion parentrot)
2712 { 2712 {
2713 // In this case we're using a sphere with a radius of the largest dimention of the prim 2713 // In this case we're using a sphere with a radius of the largest dimension of the prim
2714 // TODO: Change to take shape into account 2714 // TODO: Change to take shape into account
2715 2715
2716 2716 EntityIntersection result = new EntityIntersection();
2717 EntityIntersection returnresult = new EntityIntersection();
2718 Vector3 vAbsolutePosition = AbsolutePosition; 2717 Vector3 vAbsolutePosition = AbsolutePosition;
2719 Vector3 vScale = Scale; 2718 Vector3 vScale = Scale;
2720 Vector3 rOrigin = iray.Origin; 2719 Vector3 rOrigin = iray.Origin;
@@ -2738,8 +2737,7 @@ if (m_shape != null) {
2738 2737
2739 Vector3 tmVal6 = vAbsolutePosition*rOrigin; 2738 Vector3 tmVal6 = vAbsolutePosition*rOrigin;
2740 2739
2741 2740 // Set Radius to the largest dimension of the prim
2742 // Set Radius to the largest dimention of the prim
2743 float radius = 0f; 2741 float radius = 0f;
2744 if (vScale.X > radius) 2742 if (vScale.X > radius)
2745 radius = vScale.X; 2743 radius = vScale.X;
@@ -2765,7 +2763,7 @@ if (m_shape != null) {
2765 if (rootsqr < 0.0f) 2763 if (rootsqr < 0.0f)
2766 { 2764 {
2767 // No intersection 2765 // No intersection
2768 return returnresult; 2766 return result;
2769 } 2767 }
2770 float root = ((-itestPart2) - (float) Math.Sqrt((double) rootsqr))/(itestPart1*2.0f); 2768 float root = ((-itestPart2) - (float) Math.Sqrt((double) rootsqr))/(itestPart1*2.0f);
2771 2769
@@ -2778,7 +2776,7 @@ if (m_shape != null) {
2778 if (root < 0.0f) 2776 if (root < 0.0f)
2779 { 2777 {
2780 // nope, no intersection 2778 // nope, no intersection
2781 return returnresult; 2779 return result;
2782 } 2780 }
2783 } 2781 }
2784 2782
@@ -2788,12 +2786,12 @@ if (m_shape != null) {
2788 new Vector3(iray.Origin.X + (iray.Direction.X*root), iray.Origin.Y + (iray.Direction.Y*root), 2786 new Vector3(iray.Origin.X + (iray.Direction.X*root), iray.Origin.Y + (iray.Direction.Y*root),
2789 iray.Origin.Z + (iray.Direction.Z*root)); 2787 iray.Origin.Z + (iray.Direction.Z*root));
2790 2788
2791 returnresult.HitTF = true; 2789 result.HitTF = true;
2792 returnresult.ipoint = ipoint; 2790 result.ipoint = ipoint;
2793 2791
2794 // Normal is calculated by the difference and then normalizing the result 2792 // Normal is calculated by the difference and then normalizing the result
2795 Vector3 normalpart = ipoint - vAbsolutePosition; 2793 Vector3 normalpart = ipoint - vAbsolutePosition;
2796 returnresult.normal = normalpart / normalpart.Length(); 2794 result.normal = normalpart / normalpart.Length();
2797 2795
2798 // It's funny how the Vector3 object has a Distance function, but the Axiom.Math object doesn't. 2796 // It's funny how the Vector3 object has a Distance function, but the Axiom.Math object doesn't.
2799 // I can write a function to do it.. but I like the fact that this one is Static. 2797 // I can write a function to do it.. but I like the fact that this one is Static.
@@ -2802,9 +2800,9 @@ if (m_shape != null) {
2802 Vector3 distanceConvert2 = new Vector3(ipoint.X, ipoint.Y, ipoint.Z); 2800 Vector3 distanceConvert2 = new Vector3(ipoint.X, ipoint.Y, ipoint.Z);
2803 float distance = (float) Util.GetDistanceTo(distanceConvert1, distanceConvert2); 2801 float distance = (float) Util.GetDistanceTo(distanceConvert1, distanceConvert2);
2804 2802
2805 returnresult.distance = distance; 2803 result.distance = distance;
2806 2804
2807 return returnresult; 2805 return result;
2808 } 2806 }
2809 2807
2810 public EntityIntersection TestIntersectionOBB(Ray iray, Quaternion parentrot, bool frontFacesOnly, bool faceCenters) 2808 public EntityIntersection TestIntersectionOBB(Ray iray, Quaternion parentrot, bool frontFacesOnly, bool faceCenters)
@@ -3008,9 +3006,9 @@ if (m_shape != null) {
3008 //distance[i] = (normals[i].X * AmBa.X + normals[i].Y * AmBa.Y + normals[i].Z * AmBa.Z) * -1; 3006 //distance[i] = (normals[i].X * AmBa.X + normals[i].Y * AmBa.Y + normals[i].Z * AmBa.Z) * -1;
3009 } 3007 }
3010 3008
3011 EntityIntersection returnresult = new EntityIntersection(); 3009 EntityIntersection result = new EntityIntersection();
3012 3010
3013 returnresult.distance = 1024; 3011 result.distance = 1024;
3014 float c = 0; 3012 float c = 0;
3015 float a = 0; 3013 float a = 0;
3016 float d = 0; 3014 float d = 0;
@@ -3030,7 +3028,7 @@ if (m_shape != null) {
3030 //{ 3028 //{
3031 //if (iray.Origin.Dot(normals[i]) > d) 3029 //if (iray.Origin.Dot(normals[i]) > d)
3032 //{ 3030 //{
3033 //return returnresult; 3031 //return result;
3034 //} 3032 //}
3035 // else 3033 // else
3036 //{ 3034 //{
@@ -3044,7 +3042,7 @@ if (m_shape != null) {
3044 //{ 3042 //{
3045 //if (a > fmin) 3043 //if (a > fmin)
3046 //{ 3044 //{
3047 //return returnresult; 3045 //return result;
3048 //} 3046 //}
3049 //fmax = a; 3047 //fmax = a;
3050 //} 3048 //}
@@ -3056,7 +3054,7 @@ if (m_shape != null) {
3056 //{ 3054 //{
3057 //if (a < 0 || a < fmax) 3055 //if (a < 0 || a < fmax)
3058 //{ 3056 //{
3059 //return returnresult; 3057 //return result;
3060 //} 3058 //}
3061 //fmin = a; 3059 //fmin = a;
3062 //} 3060 //}
@@ -3112,17 +3110,17 @@ if (m_shape != null) {
3112 // distance2 = (float)GetDistanceTo(q, iray.Origin); 3110 // distance2 = (float)GetDistanceTo(q, iray.Origin);
3113 //} 3111 //}
3114 3112
3115 if (distance2 < returnresult.distance) 3113 if (distance2 < result.distance)
3116 { 3114 {
3117 returnresult.distance = distance2; 3115 result.distance = distance2;
3118 returnresult.HitTF = true; 3116 result.HitTF = true;
3119 returnresult.ipoint = q; 3117 result.ipoint = q;
3120 //m_log.Info("[FACE]:" + i.ToString()); 3118 //m_log.Info("[FACE]:" + i.ToString());
3121 //m_log.Info("[POINT]: " + q.ToString()); 3119 //m_log.Info("[POINT]: " + q.ToString());
3122 //m_log.Info("[DIST]: " + distance2.ToString()); 3120 //m_log.Info("[DIST]: " + distance2.ToString());
3123 if (faceCenters) 3121 if (faceCenters)
3124 { 3122 {
3125 returnresult.normal = AAfacenormals[i] * AXrot; 3123 result.normal = AAfacenormals[i] * AXrot;
3126 3124
3127 Vector3 scaleComponent = AAfacenormals[i]; 3125 Vector3 scaleComponent = AAfacenormals[i];
3128 float ScaleOffset = 0.5f; 3126 float ScaleOffset = 0.5f;
@@ -3130,20 +3128,20 @@ if (m_shape != null) {
3130 if (scaleComponent.Y != 0) ScaleOffset = AXscale.Y; 3128 if (scaleComponent.Y != 0) ScaleOffset = AXscale.Y;
3131 if (scaleComponent.Z != 0) ScaleOffset = AXscale.Z; 3129 if (scaleComponent.Z != 0) ScaleOffset = AXscale.Z;
3132 ScaleOffset = Math.Abs(ScaleOffset); 3130 ScaleOffset = Math.Abs(ScaleOffset);
3133 Vector3 offset = returnresult.normal * ScaleOffset; 3131 Vector3 offset = result.normal * ScaleOffset;
3134 returnresult.ipoint = AXpos + offset; 3132 result.ipoint = AXpos + offset;
3135 3133
3136 ///pos = (intersectionpoint + offset); 3134 ///pos = (intersectionpoint + offset);
3137 } 3135 }
3138 else 3136 else
3139 { 3137 {
3140 returnresult.normal = normals[i]; 3138 result.normal = normals[i];
3141 } 3139 }
3142 returnresult.AAfaceNormal = AAfacenormals[i]; 3140 result.AAfaceNormal = AAfacenormals[i];
3143 } 3141 }
3144 } 3142 }
3145 } 3143 }
3146 return returnresult; 3144 return result;
3147 } 3145 }
3148 3146
3149 /// <summary> 3147 /// <summary>
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index 08fc61f..a3be181 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -686,6 +686,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
686 public event SpinStop OnSpinStop; 686 public event SpinStop OnSpinStop;
687 public event UpdateShape OnUpdatePrimShape; 687 public event UpdateShape OnUpdatePrimShape;
688 public event ObjectExtraParams OnUpdateExtraParams; 688 public event ObjectExtraParams OnUpdateExtraParams;
689 public event ObjectRequest OnObjectRequest;
689 public event ObjectSelect OnObjectSelect; 690 public event ObjectSelect OnObjectSelect;
690 public event ObjectDeselect OnObjectDeselect; 691 public event ObjectDeselect OnObjectDeselect;
691 public event GenericCall7 OnObjectDescription; 692 public event GenericCall7 OnObjectDescription;
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/ISecurityCredential.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/ISecurityCredential.cs
index e6878d1..533d176 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/ISecurityCredential.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/ISecurityCredential.cs
@@ -1,3 +1,30 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
1namespace OpenSim.Region.OptionalModules.Scripting.Minimodule 28namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
2{ 29{
3 public interface ISecurityCredential 30 public interface ISecurityCredential
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs
index 6415250..19f7210 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs
@@ -212,6 +212,6 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
212 bool Bright { get; set; } // SetPrimParms(FULLBRIGHT) 212 bool Bright { get; set; } // SetPrimParms(FULLBRIGHT)
213 double Bloom { get; set; } // SetPrimParms(GLOW) 213 double Bloom { get; set; } // SetPrimParms(GLOW)
214 bool Shiny { get; set; } // SetPrimParms(SHINY) 214 bool Shiny { get; set; } // SetPrimParms(SHINY)
215 bool BumpMap { get; set; } // SetPrimParms(BUMPMAP) [DEPRECIATE IN FAVOUR OF UUID?] 215 bool BumpMap { get; set; } // SetPrimParms(BUMPMAP) [DEPRECATE IN FAVOUR OF UUID?]
216 } 216 }
217} 217}
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SecurityCredential.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SecurityCredential.cs
index 771bc8b..6e350b9 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SecurityCredential.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SecurityCredential.cs
@@ -1,4 +1,31 @@
1using System; 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
2using System.Collections.Generic; 29using System.Collections.Generic;
3using System.Text; 30using System.Text;
4using OpenMetaverse; 31using OpenMetaverse;
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index 4a8ba8c..f0bdf3b 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -213,6 +213,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
213 public event UpdateShape OnUpdatePrimShape; 213 public event UpdateShape OnUpdatePrimShape;
214 public event ObjectExtraParams OnUpdateExtraParams; 214 public event ObjectExtraParams OnUpdateExtraParams;
215 public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily; 215 public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily;
216 public event ObjectRequest OnObjectRequest;
216 public event ObjectSelect OnObjectSelect; 217 public event ObjectSelect OnObjectSelect;
217 public event GenericCall7 OnObjectDescription; 218 public event GenericCall7 OnObjectDescription;
218 public event GenericCall7 OnObjectName; 219 public event GenericCall7 OnObjectName;
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index 8fdc5a7..b7030f1 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -347,18 +347,13 @@ namespace OpenSim.Region.Physics.OdePlugin
347 #endif 347 #endif
348 } 348 }
349 349
350 // zero out a heightmap array float array (single dimention [flattened])) 350 // zero out a heightmap array float array (single dimension [flattened]))
351 if ((int)Constants.RegionSize == 256) 351 if ((int)Constants.RegionSize == 256)
352 _heightmap = new float[514*514]; 352 _heightmap = new float[514*514];
353 else 353 else
354 _heightmap = new float[(((int)Constants.RegionSize + 2) * ((int)Constants.RegionSize + 2))]; 354 _heightmap = new float[(((int)Constants.RegionSize + 2) * ((int)Constants.RegionSize + 2))];
355 _watermap = new float[258 * 258]; 355 _watermap = new float[258 * 258];
356 356
357
358
359
360
361
362 // Zero out the prim spaces array (we split our space into smaller spaces so 357 // Zero out the prim spaces array (we split our space into smaller spaces so
363 // we can hit test less. 358 // we can hit test less.
364 } 359 }
@@ -2197,7 +2192,7 @@ namespace OpenSim.Region.Physics.OdePlugin
2197 } 2192 }
2198 2193
2199 /// <summary> 2194 /// <summary>
2200 /// Called when a static prim moves. Allocates a space for the prim based on it's position 2195 /// Called when a static prim moves. Allocates a space for the prim based on its position
2201 /// </summary> 2196 /// </summary>
2202 /// <param name="geom">the pointer to the geom that moved</param> 2197 /// <param name="geom">the pointer to the geom that moved</param>
2203 /// <param name="pos">the position that the geom moved to</param> 2198 /// <param name="pos">the position that the geom moved to</param>
@@ -3013,7 +3008,7 @@ namespace OpenSim.Region.Physics.OdePlugin
3013 float[] returnarr = new float[262144]; 3008 float[] returnarr = new float[262144];
3014 float[,] resultarr = new float[m_regionWidth, m_regionHeight]; 3009 float[,] resultarr = new float[m_regionWidth, m_regionHeight];
3015 3010
3016 // Filling out the array into it's multi-dimentional components 3011 // Filling out the array into its multi-dimensional components
3017 for (int y = 0; y < m_regionHeight; y++) 3012 for (int y = 0; y < m_regionHeight; y++)
3018 { 3013 {
3019 for (int x = 0; x < m_regionWidth; x++) 3014 for (int x = 0; x < m_regionWidth; x++)
@@ -3126,7 +3121,7 @@ namespace OpenSim.Region.Physics.OdePlugin
3126 float[] returnarr = new float[262144]; 3121 float[] returnarr = new float[262144];
3127 float[,] resultarr = new float[m_regionWidth,m_regionHeight]; 3122 float[,] resultarr = new float[m_regionWidth,m_regionHeight];
3128 3123
3129 // Filling out the array into it's multi-dimentional components 3124 // Filling out the array into its multi-dimensional components
3130 for (int y = 0; y < m_regionHeight; y++) 3125 for (int y = 0; y < m_regionHeight; y++)
3131 { 3126 {
3132 for (int x = 0; x < m_regionWidth; x++) 3127 for (int x = 0; x < m_regionWidth; x++)