aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie2013-08-13 22:53:47 +0100
committerMelanie2013-08-13 22:53:47 +0100
commit4a6eff1ee83f88a188936a1a0d4a2c55924ef1c6 (patch)
tree245e7c3257c8c6c29356ba5c1eb61ae50a127226
parentMerge branch 'master' into careminster (diff)
parentminor: Eliminate one of the duplicate 'have's in the HG message telling the u... (diff)
downloadopensim-SC_OLD-4a6eff1ee83f88a188936a1a0d4a2c55924ef1c6.zip
opensim-SC_OLD-4a6eff1ee83f88a188936a1a0d4a2c55924ef1c6.tar.gz
opensim-SC_OLD-4a6eff1ee83f88a188936a1a0d4a2c55924ef1c6.tar.bz2
opensim-SC_OLD-4a6eff1ee83f88a188936a1a0d4a2c55924ef1c6.tar.xz
Merge branch 'master' into careminster
-rw-r--r--OpenSim/Addons/Groups/GroupsModule.cs10
-rw-r--r--OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs2
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs11
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs113
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs1
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs4
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs33
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs1
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs1
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs2
-rw-r--r--OpenSim/Tests/Common/Mock/TestClient.cs26
-rw-r--r--OpenSim/Tools/pCampBot/Behaviours/NoneBehaviour.cs43
-rw-r--r--OpenSim/Tools/pCampBot/BotManager.cs30
-rw-r--r--OpenSim/Tools/pCampBot/pCampBot.cs7
15 files changed, 246 insertions, 42 deletions
diff --git a/OpenSim/Addons/Groups/GroupsModule.cs b/OpenSim/Addons/Groups/GroupsModule.cs
index 830c671..b0493fa 100644
--- a/OpenSim/Addons/Groups/GroupsModule.cs
+++ b/OpenSim/Addons/Groups/GroupsModule.cs
@@ -1223,12 +1223,16 @@ namespace OpenSim.Groups
1223 { 1223 {
1224 if (m_debugEnabled) m_log.InfoFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 1224 if (m_debugEnabled) m_log.InfoFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
1225 1225
1226 // NPCs currently don't have a CAPs structure or event queues. There is a strong argument for conveying this information
1227 // to them anyway since it makes writing server-side bots a lot easier, but for now we don't do anything.
1228 if (remoteClient.SceneAgent.PresenceType == PresenceType.Npc)
1229 return;
1230
1226 OSDArray AgentData = new OSDArray(1); 1231 OSDArray AgentData = new OSDArray(1);
1227 OSDMap AgentDataMap = new OSDMap(1); 1232 OSDMap AgentDataMap = new OSDMap(1);
1228 AgentDataMap.Add("AgentID", OSD.FromUUID(dataForAgentID)); 1233 AgentDataMap.Add("AgentID", OSD.FromUUID(dataForAgentID));
1229 AgentData.Add(AgentDataMap); 1234 AgentData.Add(AgentDataMap);
1230 1235
1231
1232 OSDArray GroupData = new OSDArray(data.Length); 1236 OSDArray GroupData = new OSDArray(data.Length);
1233 OSDArray NewGroupData = new OSDArray(data.Length); 1237 OSDArray NewGroupData = new OSDArray(data.Length);
1234 1238
@@ -1274,8 +1278,7 @@ namespace OpenSim.Groups
1274 if (queue != null) 1278 if (queue != null)
1275 { 1279 {
1276 queue.Enqueue(queue.BuildEvent("AgentGroupDataUpdate", llDataStruct), GetRequestingAgentID(remoteClient)); 1280 queue.Enqueue(queue.BuildEvent("AgentGroupDataUpdate", llDataStruct), GetRequestingAgentID(remoteClient));
1277 } 1281 }
1278
1279 } 1282 }
1280 1283
1281 private void SendScenePresenceUpdate(UUID AgentID, string Title) 1284 private void SendScenePresenceUpdate(UUID AgentID, string Title)
@@ -1337,6 +1340,7 @@ namespace OpenSim.Groups
1337 1340
1338 GroupMembershipData[] membershipArray = GetProfileListedGroupMemberships(remoteClient, dataForAgentID); 1341 GroupMembershipData[] membershipArray = GetProfileListedGroupMemberships(remoteClient, dataForAgentID);
1339 SendGroupMembershipInfoViaCaps(remoteClient, dataForAgentID, membershipArray); 1342 SendGroupMembershipInfoViaCaps(remoteClient, dataForAgentID, membershipArray);
1343
1340 //remoteClient.SendAvatarGroupsReply(dataForAgentID, membershipArray); 1344 //remoteClient.SendAvatarGroupsReply(dataForAgentID, membershipArray);
1341 if (remoteClient.AgentId == dataForAgentID) 1345 if (remoteClient.AgentId == dataForAgentID)
1342 remoteClient.RefreshGroupMembership(); 1346 remoteClient.RefreshGroupMembership();
diff --git a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs
index c33168c..4642b2a 100644
--- a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs
+++ b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs
@@ -404,7 +404,7 @@ namespace OpenSim.Groups
404 url = m_UserManagement.GetUserServerURL(uid, "GroupsServerURI"); 404 url = m_UserManagement.GetUserServerURL(uid, "GroupsServerURI");
405 if (url == string.Empty) 405 if (url == string.Empty)
406 { 406 {
407 reason = "You don't have have an accessible groups server in your home world. You membership to this group in only within this grid."; 407 reason = "You don't have an accessible groups server in your home world. You membership to this group in only within this grid.";
408 return true; 408 return true;
409 } 409 }
410 410
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
index 4272375..725bf06 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
@@ -229,7 +229,12 @@ namespace OpenSim.Region.ClientStack.Linden
229 queue.Enqueue(ev); 229 queue.Enqueue(ev);
230 } 230 }
231 else 231 else
232 m_log.WarnFormat("[EVENTQUEUE]: (Enqueue) No queue found for agent {0} in region {1}", avatarID, m_scene.RegionInfo.RegionName); 232 {
233 OSDMap evMap = (OSDMap)ev;
234 m_log.WarnFormat(
235 "[EVENTQUEUE]: (Enqueue) No queue found for agent {0} when placing message {1} in region {2}",
236 avatarID, evMap["message"], m_scene.Name);
237 }
233 } 238 }
234 catch (NullReferenceException e) 239 catch (NullReferenceException e)
235 { 240 {
@@ -365,14 +370,14 @@ namespace OpenSim.Region.ClientStack.Linden
365 OSDMap ev = (OSDMap)element; 370 OSDMap ev = (OSDMap)element;
366 m_log.DebugFormat( 371 m_log.DebugFormat(
367 "Eq OUT {0,-30} to {1,-20} {2,-20}", 372 "Eq OUT {0,-30} to {1,-20} {2,-20}",
368 ev["message"], m_scene.GetScenePresence(agentId).Name, m_scene.RegionInfo.RegionName); 373 ev["message"], m_scene.GetScenePresence(agentId).Name, m_scene.Name);
369 } 374 }
370 } 375 }
371 376
372 public Hashtable GetEvents(UUID requestID, UUID pAgentId) 377 public Hashtable GetEvents(UUID requestID, UUID pAgentId)
373 { 378 {
374 if (DebugLevel >= 2) 379 if (DebugLevel >= 2)
375 m_log.WarnFormat("POLLED FOR EQ MESSAGES BY {0} in {1}", pAgentId, m_scene.RegionInfo.RegionName); 380 m_log.WarnFormat("POLLED FOR EQ MESSAGES BY {0} in {1}", pAgentId, m_scene.Name);
376 381
377 Queue<OSD> queue = GetQueue(pAgentId); 382 Queue<OSD> queue = GetQueue(pAgentId);
378 if (queue == null) 383 if (queue == null)
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
index 7c8c189..35045b5 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
@@ -799,7 +799,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
799 } 799 }
800 800
801 [Test] 801 [Test]
802 public void TestSameSimulatorNeighbouringRegionsTeleport() 802 public void TestSameSimulatorNeighbouringRegionsTeleportV1()
803 { 803 {
804 TestHelpers.InMethod(); 804 TestHelpers.InMethod();
805// TestHelpers.EnableLogging(); 805// TestHelpers.EnableLogging();
@@ -904,5 +904,116 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
904 // Check events 904 // Check events
905 Assert.That(m_numberOfAttachEventsFired, Is.EqualTo(0)); 905 Assert.That(m_numberOfAttachEventsFired, Is.EqualTo(0));
906 } 906 }
907
908 [Test]
909 public void TestSameSimulatorNeighbouringRegionsTeleportV2()
910 {
911 TestHelpers.InMethod();
912// TestHelpers.EnableLogging();
913
914 BaseHttpServer httpServer = new BaseHttpServer(99999);
915 MainServer.AddHttpServer(httpServer);
916 MainServer.Instance = httpServer;
917
918 AttachmentsModule attModA = new AttachmentsModule();
919 AttachmentsModule attModB = new AttachmentsModule();
920 EntityTransferModule etmA = new EntityTransferModule();
921 EntityTransferModule etmB = new EntityTransferModule();
922 LocalSimulationConnectorModule lscm = new LocalSimulationConnectorModule();
923
924 IConfigSource config = new IniConfigSource();
925 IConfig modulesConfig = config.AddConfig("Modules");
926 modulesConfig.Set("EntityTransferModule", etmA.Name);
927 modulesConfig.Set("SimulationServices", lscm.Name);
928 IConfig entityTransferConfig = config.AddConfig("EntityTransfer");
929
930 modulesConfig.Set("InventoryAccessModule", "BasicInventoryAccessModule");
931
932 SceneHelpers sh = new SceneHelpers();
933 TestScene sceneA = sh.SetupScene("sceneA", TestHelpers.ParseTail(0x100), 1000, 1000);
934 TestScene sceneB = sh.SetupScene("sceneB", TestHelpers.ParseTail(0x200), 1001, 1000);
935
936 SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm);
937 SceneHelpers.SetupSceneModules(
938 sceneA, config, new CapabilitiesModule(), etmA, attModA, new BasicInventoryAccessModule());
939 SceneHelpers.SetupSceneModules(
940 sceneB, config, new CapabilitiesModule(), etmB, attModB, new BasicInventoryAccessModule());
941
942 UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(sceneA, 0x1);
943
944 AgentCircuitData acd = SceneHelpers.GenerateAgentData(ua1.PrincipalID);
945 TestClient tc = new TestClient(acd, sceneA);
946 List<TestClient> destinationTestClients = new List<TestClient>();
947 EntityTransferHelpers.SetUpInformClientOfNeighbour(tc, destinationTestClients);
948
949 ScenePresence beforeTeleportSp = SceneHelpers.AddScenePresence(sceneA, tc, acd);
950 beforeTeleportSp.AbsolutePosition = new Vector3(30, 31, 32);
951
952 Assert.That(destinationTestClients.Count, Is.EqualTo(1));
953 Assert.That(destinationTestClients[0], Is.Not.Null);
954
955 InventoryItemBase attItem = CreateAttachmentItem(sceneA, ua1.PrincipalID, "att", 0x10, 0x20);
956
957 sceneA.AttachmentsModule.RezSingleAttachmentFromInventory(
958 beforeTeleportSp, attItem.ID, (uint)AttachmentPoint.Chest);
959
960 Vector3 teleportPosition = new Vector3(10, 11, 12);
961 Vector3 teleportLookAt = new Vector3(20, 21, 22);
962
963 // Here, we need to make clientA's receipt of SendRegionTeleport trigger clientB's CompleteMovement(). This
964 // is to operate the teleport V2 mechanism where the EntityTransferModule will first request the client to
965 // CompleteMovement to the region and then call UpdateAgent to the destination region to confirm the receipt
966 // Both these operations will occur on different threads and will wait for each other.
967 // We have to do this via ThreadPool directly since FireAndForget has been switched to sync for the V1
968 // test protocol, where we are trying to avoid unpredictable async operations in regression tests.
969 ((TestClient)beforeTeleportSp.ControllingClient).OnTestClientSendRegionTeleport
970 += (regionHandle, simAccess, regionExternalEndPoint, locationID, flags, capsURL)
971 => ThreadPool.UnsafeQueueUserWorkItem(o => destinationTestClients[0].CompleteMovement(), null);
972
973 m_numberOfAttachEventsFired = 0;
974 sceneA.RequestTeleportLocation(
975 beforeTeleportSp.ControllingClient,
976 sceneB.RegionInfo.RegionHandle,
977 teleportPosition,
978 teleportLookAt,
979 (uint)TeleportFlags.ViaLocation);
980
981 // Check attachments have made it into sceneB
982 ScenePresence afterTeleportSceneBSp = sceneB.GetScenePresence(ua1.PrincipalID);
983
984 // This is appearance data, as opposed to actually rezzed attachments
985 List<AvatarAttachment> sceneBAttachments = afterTeleportSceneBSp.Appearance.GetAttachments();
986 Assert.That(sceneBAttachments.Count, Is.EqualTo(1));
987 Assert.That(sceneBAttachments[0].AttachPoint, Is.EqualTo((int)AttachmentPoint.Chest));
988 Assert.That(sceneBAttachments[0].ItemID, Is.EqualTo(attItem.ID));
989 Assert.That(sceneBAttachments[0].AssetID, Is.EqualTo(attItem.AssetID));
990 Assert.That(afterTeleportSceneBSp.Appearance.GetAttachpoint(attItem.ID), Is.EqualTo((int)AttachmentPoint.Chest));
991
992 // This is the actual attachment
993 List<SceneObjectGroup> actualSceneBAttachments = afterTeleportSceneBSp.GetAttachments();
994 Assert.That(actualSceneBAttachments.Count, Is.EqualTo(1));
995 SceneObjectGroup actualSceneBAtt = actualSceneBAttachments[0];
996 Assert.That(actualSceneBAtt.Name, Is.EqualTo(attItem.Name));
997 Assert.That(actualSceneBAtt.AttachmentPoint, Is.EqualTo((uint)AttachmentPoint.Chest));
998
999 Assert.That(sceneB.GetSceneObjectGroups().Count, Is.EqualTo(1));
1000
1001 // Check attachments have been removed from sceneA
1002 ScenePresence afterTeleportSceneASp = sceneA.GetScenePresence(ua1.PrincipalID);
1003
1004 // Since this is appearance data, it is still present on the child avatar!
1005 List<AvatarAttachment> sceneAAttachments = afterTeleportSceneASp.Appearance.GetAttachments();
1006 Assert.That(sceneAAttachments.Count, Is.EqualTo(1));
1007 Assert.That(afterTeleportSceneASp.Appearance.GetAttachpoint(attItem.ID), Is.EqualTo((int)AttachmentPoint.Chest));
1008
1009 // This is the actual attachment, which should no longer exist
1010 List<SceneObjectGroup> actualSceneAAttachments = afterTeleportSceneASp.GetAttachments();
1011 Assert.That(actualSceneAAttachments.Count, Is.EqualTo(0));
1012
1013 Assert.That(sceneA.GetSceneObjectGroups().Count, Is.EqualTo(0));
1014
1015 // Check events
1016 Assert.That(m_numberOfAttachEventsFired, Is.EqualTo(0));
1017 }
907 } 1018 }
908} 1019}
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
index e0f061b..8a734e1 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
@@ -1212,7 +1212,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1212 AgentDataMap.Add("AgentID", OSD.FromUUID(dataForAgentID)); 1212 AgentDataMap.Add("AgentID", OSD.FromUUID(dataForAgentID));
1213 AgentData.Add(AgentDataMap); 1213 AgentData.Add(AgentDataMap);
1214 1214
1215
1216 OSDArray GroupData = new OSDArray(data.Length); 1215 OSDArray GroupData = new OSDArray(data.Length);
1217 OSDArray NewGroupData = new OSDArray(data.Length); 1216 OSDArray NewGroupData = new OSDArray(data.Length);
1218 1217
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
index b0a29c0..78fe096 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
@@ -377,7 +377,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC
377 m_log.DebugFormat("[NPC MODULE]: Found {0} {1} to remove", 377 m_log.DebugFormat("[NPC MODULE]: Found {0} {1} to remove",
378 agentID, av.Name); 378 agentID, av.Name);
379 */ 379 */
380 scene.RemoveClient(agentID, false); 380
381 scene.IncomingCloseAgent(agentID, false);
382// scene.RemoveClient(agentID, false);
381 m_avatars.Remove(agentID); 383 m_avatars.Remove(agentID);
382 384
383// m_log.DebugFormat("[NPC MODULE]: Removed NPC {0} {1}", agentID, av.Name); 385// m_log.DebugFormat("[NPC MODULE]: Removed NPC {0} {1}", agentID, av.Name);
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs b/OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs
index 0f11c4a..5f232a4 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs
@@ -311,21 +311,28 @@ public class BSActorAvatarMove : BSActor
311 // Don't care about collisions with the terrain 311 // Don't care about collisions with the terrain
312 if (kvp.Key > m_physicsScene.TerrainManager.HighestTerrainID) 312 if (kvp.Key > m_physicsScene.TerrainManager.HighestTerrainID)
313 { 313 {
314 OMV.Vector3 touchPosition = kvp.Value.Position; 314 BSPhysObject collisionObject;
315 m_physicsScene.DetailLog("{0},BSCharacter.WalkUpStairs,min={1},max={2},touch={3}", 315 if (m_physicsScene.PhysObjects.TryGetValue(kvp.Key, out collisionObject))
316 m_controllingPrim.LocalID, nearFeetHeightMin, nearFeetHeightMax, touchPosition);
317 if (touchPosition.Z >= nearFeetHeightMin && touchPosition.Z <= nearFeetHeightMax)
318 { 316 {
319 // This contact is within the 'near the feet' range. 317 if (!collisionObject.IsVolumeDetect)
320 // The normal should be our contact point to the object so it is pointing away
321 // thus the difference between our facing orientation and the normal should be small.
322 OMV.Vector3 directionFacing = OMV.Vector3.UnitX * m_controllingPrim.RawOrientation;
323 OMV.Vector3 touchNormal = OMV.Vector3.Normalize(kvp.Value.SurfaceNormal);
324 float diff = Math.Abs(OMV.Vector3.Distance(directionFacing, touchNormal));
325 if (diff < BSParam.AvatarStepApproachFactor)
326 { 318 {
327 if (highestTouchPosition.Z < touchPosition.Z) 319 OMV.Vector3 touchPosition = kvp.Value.Position;
328 highestTouchPosition = touchPosition; 320 m_physicsScene.DetailLog("{0},BSCharacter.WalkUpStairs,min={1},max={2},touch={3}",
321 m_controllingPrim.LocalID, nearFeetHeightMin, nearFeetHeightMax, touchPosition);
322 if (touchPosition.Z >= nearFeetHeightMin && touchPosition.Z <= nearFeetHeightMax)
323 {
324 // This contact is within the 'near the feet' range.
325 // The normal should be our contact point to the object so it is pointing away
326 // thus the difference between our facing orientation and the normal should be small.
327 OMV.Vector3 directionFacing = OMV.Vector3.UnitX * m_controllingPrim.RawOrientation;
328 OMV.Vector3 touchNormal = OMV.Vector3.Normalize(kvp.Value.SurfaceNormal);
329 float diff = Math.Abs(OMV.Vector3.Distance(directionFacing, touchNormal));
330 if (diff < BSParam.AvatarStepApproachFactor)
331 {
332 if (highestTouchPosition.Z < touchPosition.Z)
333 highestTouchPosition = touchPosition;
334 }
335 }
329 } 336 }
330 } 337 }
331 } 338 }
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
index 9af3dce..d584782 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
@@ -404,6 +404,7 @@ public sealed class BSCharacter : BSPhysObject
404 404
405 // Allows the detection of collisions with inherently non-physical prims. see llVolumeDetect for more 405 // Allows the detection of collisions with inherently non-physical prims. see llVolumeDetect for more
406 public override void SetVolumeDetect(int param) { return; } 406 public override void SetVolumeDetect(int param) { return; }
407 public override bool IsVolumeDetect { get { return false; } }
407 408
408 public override OMV.Vector3 GeometricCenter { get { return OMV.Vector3.Zero; } } 409 public override OMV.Vector3 GeometricCenter { get { return OMV.Vector3.Zero; } }
409 public override OMV.Vector3 CenterOfMass { get { return OMV.Vector3.Zero; } } 410 public override OMV.Vector3 CenterOfMass { get { return OMV.Vector3.Zero; } }
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
index 0704591..27caf62 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
@@ -175,6 +175,7 @@ public abstract class BSPhysObject : PhysicsActor
175 public abstract bool IsSolid { get; } 175 public abstract bool IsSolid { get; }
176 public abstract bool IsStatic { get; } 176 public abstract bool IsStatic { get; }
177 public abstract bool IsSelected { get; } 177 public abstract bool IsSelected { get; }
178 public abstract bool IsVolumeDetect { get; }
178 179
179 // Materialness 180 // Materialness
180 public MaterialAttributes.Material Material { get; private set; } 181 public MaterialAttributes.Material Material { get; private set; }
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
index a0b6abc..6b5dea3 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
@@ -617,6 +617,10 @@ public class BSPrim : BSPhysObject
617 } 617 }
618 return; 618 return;
619 } 619 }
620 public override bool IsVolumeDetect
621 {
622 get { return _isVolumeDetect; }
623 }
620 public override void SetMaterial(int material) 624 public override void SetMaterial(int material)
621 { 625 {
622 base.SetMaterial(material); 626 base.SetMaterial(material);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 3646c98..2fb073d 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -533,7 +533,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
533 m_log.Warn( 533 m_log.Warn(
534 string.Format( 534 string.Format(
535 "[SCRIPT INSTANCE]: Could not delete script state {0} for script {1} (id {2}) in part {3} (id {4}) in object {5} in {6}. Exception ", 535 "[SCRIPT INSTANCE]: Could not delete script state {0} for script {1} (id {2}) in part {3} (id {4}) in object {5} in {6}. Exception ",
536 ScriptTask.Name, ScriptTask.ItemID, Part.Name, Part.UUID, Part.ParentGroup.Name, Engine.World.Name), 536 savedState, ScriptTask.Name, ScriptTask.ItemID, Part.Name, Part.UUID, Part.ParentGroup.Name, Engine.World.Name),
537 e); 537 e);
538 } 538 }
539 } 539 }
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index df8cf27..e8520f2 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -61,8 +61,13 @@ namespace OpenSim.Tests.Common.Mock
61 // Test client specific events - for use by tests to implement some IClientAPI behaviour. 61 // Test client specific events - for use by tests to implement some IClientAPI behaviour.
62 public event Action<RegionInfo, Vector3, Vector3> OnReceivedMoveAgentIntoRegion; 62 public event Action<RegionInfo, Vector3, Vector3> OnReceivedMoveAgentIntoRegion;
63 public event Action<ulong, IPEndPoint> OnTestClientInformClientOfNeighbour; 63 public event Action<ulong, IPEndPoint> OnTestClientInformClientOfNeighbour;
64 public event TestClientOnSendRegionTeleportDelegate OnTestClientSendRegionTeleport;
64 public event Action<GridInstantMessage> OnReceivedInstantMessage; 65 public event Action<GridInstantMessage> OnReceivedInstantMessage;
65 66
67 public delegate void TestClientOnSendRegionTeleportDelegate(
68 ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint,
69 uint locationID, uint flags, string capsURL);
70
66// disable warning: public events, part of the public API 71// disable warning: public events, part of the public API
67#pragma warning disable 67 72#pragma warning disable 67
68 73
@@ -475,7 +480,8 @@ namespace OpenSim.Tests.Common.Mock
475 480
476 public void CompleteMovement() 481 public void CompleteMovement()
477 { 482 {
478 OnCompleteMovementToRegion(this, true); 483 if (OnCompleteMovementToRegion != null)
484 OnCompleteMovementToRegion(this, true);
479 } 485 }
480 486
481 /// <summary> 487 /// <summary>
@@ -615,21 +621,25 @@ namespace OpenSim.Tests.Common.Mock
615 OnTestClientInformClientOfNeighbour(neighbourHandle, neighbourExternalEndPoint); 621 OnTestClientInformClientOfNeighbour(neighbourHandle, neighbourExternalEndPoint);
616 } 622 }
617 623
618 public virtual void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, 624 public virtual void SendRegionTeleport(
619 uint locationID, uint flags, string capsURL) 625 ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint,
626 uint locationID, uint flags, string capsURL)
620 { 627 {
621 m_log.DebugFormat("[TEST CLIENT]: Received SendRegionTeleport"); 628 m_log.DebugFormat(
629 "[TEST CLIENT]: Received SendRegionTeleport for {0} {1} on {2}", m_firstName, m_lastName, m_scene.Name);
622 630
623 CapsSeedUrl = capsURL; 631 CapsSeedUrl = capsURL;
624 632
625 // We don't do this here so that the source region can complete processing first in a single-threaded 633 if (OnTestClientSendRegionTeleport != null)
626 // regression test scenario. The test itself will have to call CompleteTeleportClientSide() after a teleport 634 OnTestClientSendRegionTeleport(
627 // CompleteTeleportClientSide(); 635 regionHandle, simAccess, regionExternalEndPoint, locationID, flags, capsURL);
628 } 636 }
629 637
630 public virtual void SendTeleportFailed(string reason) 638 public virtual void SendTeleportFailed(string reason)
631 { 639 {
632 m_log.DebugFormat("[TEST CLIENT]: Teleport failed with reason {0}", reason); 640 m_log.DebugFormat(
641 "[TEST CLIENT]: Teleport failed for {0} {1} on {2} with reason {3}",
642 m_firstName, m_lastName, m_scene.Name, reason);
633 } 643 }
634 644
635 public virtual void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt, 645 public virtual void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt,
diff --git a/OpenSim/Tools/pCampBot/Behaviours/NoneBehaviour.cs b/OpenSim/Tools/pCampBot/Behaviours/NoneBehaviour.cs
new file mode 100644
index 0000000..9cf8a54
--- /dev/null
+++ b/OpenSim/Tools/pCampBot/Behaviours/NoneBehaviour.cs
@@ -0,0 +1,43 @@
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 OpenMetaverse;
29using System;
30using System.Collections.Generic;
31using System.Linq;
32using pCampBot.Interfaces;
33
34namespace pCampBot
35{
36 /// <summary>
37 /// Do nothing
38 /// </summary>
39 public class NoneBehaviour : AbstractBehaviour
40 {
41 public NoneBehaviour() { Name = "None"; }
42 }
43} \ No newline at end of file
diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs
index d615b3f..74bd36a 100644
--- a/OpenSim/Tools/pCampBot/BotManager.cs
+++ b/OpenSim/Tools/pCampBot/BotManager.cs
@@ -177,18 +177,21 @@ namespace pCampBot
177 // We must give each bot its own list of instantiated behaviours since they store state. 177 // We must give each bot its own list of instantiated behaviours since they store state.
178 List<IBehaviour> behaviours = new List<IBehaviour>(); 178 List<IBehaviour> behaviours = new List<IBehaviour>();
179 179
180 // Hard-coded for now 180 // Hard-coded for now
181 if (behaviourSwitches.Contains("p")) 181 if (behaviourSwitches.Contains("c"))
182 behaviours.Add(new PhysicsBehaviour()); 182 behaviours.Add(new CrossBehaviour());
183 183
184 if (behaviourSwitches.Contains("g")) 184 if (behaviourSwitches.Contains("g"))
185 behaviours.Add(new GrabbingBehaviour()); 185 behaviours.Add(new GrabbingBehaviour());
186
187 if (behaviourSwitches.Contains("n"))
188 behaviours.Add(new NoneBehaviour());
189
190 if (behaviourSwitches.Contains("p"))
191 behaviours.Add(new PhysicsBehaviour());
186 192
187 if (behaviourSwitches.Contains("t")) 193 if (behaviourSwitches.Contains("t"))
188 behaviours.Add(new TeleportBehaviour()); 194 behaviours.Add(new TeleportBehaviour());
189
190 if (behaviourSwitches.Contains("c"))
191 behaviours.Add(new CrossBehaviour());
192 195
193 StartBot(this, behaviours, firstName, lastName, password, loginUri); 196 StartBot(this, behaviours, firstName, lastName, password, loginUri);
194 } 197 }
@@ -327,17 +330,30 @@ namespace pCampBot
327 string outputFormat = "{0,-30} {1, -30} {2,-14}"; 330 string outputFormat = "{0,-30} {1, -30} {2,-14}";
328 MainConsole.Instance.OutputFormat(outputFormat, "Name", "Region", "Status"); 331 MainConsole.Instance.OutputFormat(outputFormat, "Name", "Region", "Status");
329 332
333 Dictionary<ConnectionState, int> totals = new Dictionary<ConnectionState, int>();
334 foreach (object o in Enum.GetValues(typeof(ConnectionState)))
335 totals[(ConnectionState)o] = 0;
336
330 lock (m_lBot) 337 lock (m_lBot)
331 { 338 {
332 foreach (Bot pb in m_lBot) 339 foreach (Bot pb in m_lBot)
333 { 340 {
334 Simulator currentSim = pb.Client.Network.CurrentSim; 341 Simulator currentSim = pb.Client.Network.CurrentSim;
342 totals[pb.ConnectionState]++;
335 343
336 MainConsole.Instance.OutputFormat( 344 MainConsole.Instance.OutputFormat(
337 outputFormat, 345 outputFormat,
338 pb.Name, currentSim != null ? currentSim.Name : "(none)", pb.ConnectionState); 346 pb.Name, currentSim != null ? currentSim.Name : "(none)", pb.ConnectionState);
339 } 347 }
340 } 348 }
349
350 ConsoleDisplayList cdl = new ConsoleDisplayList();
351
352 foreach (KeyValuePair<ConnectionState, int> kvp in totals)
353 cdl.AddRow(kvp.Key, kvp.Value);
354
355
356 MainConsole.Instance.OutputFormat("\n{0}", cdl.ToString());
341 } 357 }
342 358
343 /* 359 /*
diff --git a/OpenSim/Tools/pCampBot/pCampBot.cs b/OpenSim/Tools/pCampBot/pCampBot.cs
index 9e82577..2707a49 100644
--- a/OpenSim/Tools/pCampBot/pCampBot.cs
+++ b/OpenSim/Tools/pCampBot/pCampBot.cs
@@ -123,9 +123,10 @@ namespace pCampBot
123 " -password password for the bots\n" + 123 " -password password for the bots\n" +
124 " -b, behaviours behaviours for bots. Comma separated, e.g. p,g. Default is p\n" + 124 " -b, behaviours behaviours for bots. Comma separated, e.g. p,g. Default is p\n" +
125 " current options are:\n" + 125 " current options are:\n" +
126 " p (physics)\n" + 126 " p (physics - bots constantly move and jump around)\n" +
127 " g (grab)\n" + 127 " g (grab - bots randomly click prims whether set clickable or not)\n" +
128 " t (teleport)\n" + 128 " n (none - bots do nothing)\n" +
129 " t (teleport - bots regularly teleport between regions on the grid)\n" +
129// " c (cross)" + 130// " c (cross)" +
130 " -wear set appearance folder to load from (default: no)\n" + 131 " -wear set appearance folder to load from (default: no)\n" +
131 " -h, -help show this message"); 132 " -h, -help show this message");