aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorMic Bowman2011-08-19 14:49:16 -0700
committerMic Bowman2011-08-19 14:49:16 -0700
commit384cb79a1a27c47bb3fdbdef6d601a3dcb9dfb0f (patch)
tree5e557eac5d4d3d4ad95b9e3e70a2a661e5745ec3 /OpenSim/Framework
parentBulletSim: add runtime setting of physics parameters. Update default values. (diff)
parentGet rid of HttpServer.dll to avoid confusion since we use HttpServer_OpenSim.... (diff)
downloadopensim-SC_OLD-384cb79a1a27c47bb3fdbdef6d601a3dcb9dfb0f.zip
opensim-SC_OLD-384cb79a1a27c47bb3fdbdef6d601a3dcb9dfb0f.tar.gz
opensim-SC_OLD-384cb79a1a27c47bb3fdbdef6d601a3dcb9dfb0f.tar.bz2
opensim-SC_OLD-384cb79a1a27c47bb3fdbdef6d601a3dcb9dfb0f.tar.xz
Merge branch 'master' into bulletsim
Conflicts: OpenSim/Region/Framework/Scenes/SceneManager.cs
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/AvatarAppearance.cs14
-rw-r--r--OpenSim/Framework/IClientAPI.cs4
-rw-r--r--OpenSim/Framework/IScene.cs16
-rw-r--r--OpenSim/Framework/PresenceType.cs39
-rw-r--r--OpenSim/Framework/Tests/UtilTest.cs8
-rw-r--r--OpenSim/Framework/Util.cs11
6 files changed, 80 insertions, 12 deletions
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs
index 73b068d..ab4ed66 100644
--- a/OpenSim/Framework/AvatarAppearance.cs
+++ b/OpenSim/Framework/AvatarAppearance.cs
@@ -412,12 +412,20 @@ namespace OpenSim.Framework
412 } 412 }
413 413
414 /// <summary> 414 /// <summary>
415 /// Add an attachment, if the attachpoint has the 415 /// Add an attachment
416 /// </summary>
417 /// <remarks>
418 /// If the attachpoint has the
416 /// 0x80 bit set then we assume this is an append 419 /// 0x80 bit set then we assume this is an append
417 /// operation otherwise we replace whatever is 420 /// operation otherwise we replace whatever is
418 /// currently attached at the attachpoint 421 /// currently attached at the attachpoint
422 /// </remarks>
423 /// <param name="attachpoint"></param>
424 /// <param name="item">If UUID.Zero, then an any attachment at the attachpoint is removed.</param>
425 /// <param name="asset"></param>
426 /// <returns>
419 /// return true if something actually changed 427 /// return true if something actually changed
420 /// </summary> 428 /// </returns>
421 public bool SetAttachment(int attachpoint, UUID item, UUID asset) 429 public bool SetAttachment(int attachpoint, UUID item, UUID asset)
422 { 430 {
423 if (attachpoint == 0) 431 if (attachpoint == 0)
@@ -539,7 +547,7 @@ namespace OpenSim.Framework
539 /// </summary> 547 /// </summary>
540 public void Unpack(OSDMap data) 548 public void Unpack(OSDMap data)
541 { 549 {
542 if ((data != null) && (data["serial"] != null)) 550 if ((data != null) && (data["serial"] != null))
543 m_serial = data["serial"].AsInteger(); 551 m_serial = data["serial"].AsInteger();
544 if ((data != null) && (data["height"] != null)) 552 if ((data != null) && (data["height"] != null))
545 m_avatarHeight = (float)data["height"].AsReal(); 553 m_avatarHeight = (float)data["height"].AsReal();
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 481e1bb..a0d10ed 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -786,7 +786,7 @@ namespace OpenSim.Framework
786 event DeRezObject OnDeRezObject; 786 event DeRezObject OnDeRezObject;
787 event Action<IClientAPI> OnRegionHandShakeReply; 787 event Action<IClientAPI> OnRegionHandShakeReply;
788 event GenericCall1 OnRequestWearables; 788 event GenericCall1 OnRequestWearables;
789 event GenericCall1 OnCompleteMovementToRegion; 789 event Action<IClientAPI, bool> OnCompleteMovementToRegion;
790 event UpdateAgent OnPreAgentUpdate; 790 event UpdateAgent OnPreAgentUpdate;
791 event UpdateAgent OnAgentUpdate; 791 event UpdateAgent OnAgentUpdate;
792 event AgentRequestSit OnAgentRequestSit; 792 event AgentRequestSit OnAgentRequestSit;
@@ -935,7 +935,7 @@ namespace OpenSim.Framework
935 event ScriptReset OnScriptReset; 935 event ScriptReset OnScriptReset;
936 event GetScriptRunning OnGetScriptRunning; 936 event GetScriptRunning OnGetScriptRunning;
937 event SetScriptRunning OnSetScriptRunning; 937 event SetScriptRunning OnSetScriptRunning;
938 event Action<Vector3> OnAutoPilotGo; 938 event Action<Vector3, bool> OnAutoPilotGo;
939 939
940 event TerrainUnacked OnUnackedTerrain; 940 event TerrainUnacked OnUnackedTerrain;
941 event ActivateGesture OnActivateGesture; 941 event ActivateGesture OnActivateGesture;
diff --git a/OpenSim/Framework/IScene.cs b/OpenSim/Framework/IScene.cs
index 1298f26..8f7a2e5 100644
--- a/OpenSim/Framework/IScene.cs
+++ b/OpenSim/Framework/IScene.cs
@@ -70,8 +70,20 @@ namespace OpenSim.Framework
70 70
71 event restart OnRestart; 71 event restart OnRestart;
72 72
73 void AddNewClient(IClientAPI client); 73 /// <summary>
74 void RemoveClient(UUID agentID); 74 /// Register the new client with the scene. The client starts off as a child agent - the later agent crossing
75 /// will promote it to a root agent.
76 /// </summary>
77 /// <param name="client"></param>
78 /// <param name="type">The type of agent to add.</param>
79 void AddNewClient(IClientAPI client, PresenceType type);
80
81 /// <summary>
82 /// Remove the given client from the scene.
83 /// </summary>
84 /// <param name="agentID"></param>
85 /// <param name="closeChildAgents">Close the neighbour child agents associated with this client.</param>
86 void RemoveClient(UUID agentID, bool closeChildAgents);
75 87
76 void Restart(); 88 void Restart();
77 //RegionInfo OtherRegionUp(RegionInfo thisRegion); 89 //RegionInfo OtherRegionUp(RegionInfo thisRegion);
diff --git a/OpenSim/Framework/PresenceType.cs b/OpenSim/Framework/PresenceType.cs
new file mode 100644
index 0000000..8c4c6e6
--- /dev/null
+++ b/OpenSim/Framework/PresenceType.cs
@@ -0,0 +1,39 @@
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 */
27using System;
28
29namespace OpenSim.Framework
30{
31 /// <summary>
32 /// Indicate the type of ScenePresence.
33 /// </summary>
34 public enum PresenceType
35 {
36 User,
37 Npc
38 }
39} \ No newline at end of file
diff --git a/OpenSim/Framework/Tests/UtilTest.cs b/OpenSim/Framework/Tests/UtilTest.cs
index 5eac411..c5a20e7 100644
--- a/OpenSim/Framework/Tests/UtilTest.cs
+++ b/OpenSim/Framework/Tests/UtilTest.cs
@@ -61,7 +61,7 @@ namespace OpenSim.Framework.Tests
61 "Magnitude of vector was incorrect."); 61 "Magnitude of vector was incorrect.");
62 62
63 TestDelegate d = delegate() { Util.GetNormalizedVector(v1); }; 63 TestDelegate d = delegate() { Util.GetNormalizedVector(v1); };
64 bool causesArgumentException = TestHelper.AssertThisDelegateCausesArgumentException(d); 64 bool causesArgumentException = TestHelpers.AssertThisDelegateCausesArgumentException(d);
65 Assert.That(causesArgumentException, Is.True, 65 Assert.That(causesArgumentException, Is.True,
66 "Getting magnitude of null vector did not cause argument exception."); 66 "Getting magnitude of null vector did not cause argument exception.");
67 67
@@ -94,12 +94,12 @@ namespace OpenSim.Framework.Tests
94 "Magnitude of vector was incorrect."); 94 "Magnitude of vector was incorrect.");
95 95
96 TestDelegate d = delegate() { Util.GetNormalizedVector(v1); }; 96 TestDelegate d = delegate() { Util.GetNormalizedVector(v1); };
97 bool causesArgumentException = TestHelper.AssertThisDelegateCausesArgumentException(d); 97 bool causesArgumentException = TestHelpers.AssertThisDelegateCausesArgumentException(d);
98 Assert.That(causesArgumentException, Is.True, 98 Assert.That(causesArgumentException, Is.True,
99 "Getting magnitude of null vector did not cause argument exception."); 99 "Getting magnitude of null vector did not cause argument exception.");
100 100
101 d = delegate() { Util.GetNormalizedVector(v2); }; 101 d = delegate() { Util.GetNormalizedVector(v2); };
102 causesArgumentException = TestHelper.AssertThisDelegateCausesArgumentException(d); 102 causesArgumentException = TestHelpers.AssertThisDelegateCausesArgumentException(d);
103 Assert.That(causesArgumentException, Is.True, 103 Assert.That(causesArgumentException, Is.True,
104 "Getting magnitude of null vector did not cause argument exception."); 104 "Getting magnitude of null vector did not cause argument exception.");
105 } 105 }
@@ -122,7 +122,7 @@ namespace OpenSim.Framework.Tests
122 "Magnitude of vector was incorrect."); 122 "Magnitude of vector was incorrect.");
123 123
124 TestDelegate d = delegate() { Util.GetNormalizedVector(v1); }; 124 TestDelegate d = delegate() { Util.GetNormalizedVector(v1); };
125 bool causesArgumentException = TestHelper.AssertThisDelegateCausesArgumentException(d); 125 bool causesArgumentException = TestHelpers.AssertThisDelegateCausesArgumentException(d);
126 Assert.That(causesArgumentException, Is.True, 126 Assert.That(causesArgumentException, Is.True,
127 "Getting magnitude of null vector did not cause argument exception."); 127 "Getting magnitude of null vector did not cause argument exception.");
128 128
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 984a7a8..51ced7b 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -56,8 +56,13 @@ namespace OpenSim.Framework
56 /// <summary> 56 /// <summary>
57 /// The method used by Util.FireAndForget for asynchronously firing events 57 /// The method used by Util.FireAndForget for asynchronously firing events
58 /// </summary> 58 /// </summary>
59 /// <remarks>
60 /// None is used to execute the method in the same thread that made the call. It should only be used by regression
61 /// test code that relies on predictable event ordering.
62 /// </remarks>
59 public enum FireAndForgetMethod 63 public enum FireAndForgetMethod
60 { 64 {
65 None,
61 UnsafeQueueUserWorkItem, 66 UnsafeQueueUserWorkItem,
62 QueueUserWorkItem, 67 QueueUserWorkItem,
63 BeginInvoke, 68 BeginInvoke,
@@ -89,7 +94,8 @@ namespace OpenSim.Framework
89 public static readonly Regex UUIDPattern 94 public static readonly Regex UUIDPattern
90 = new Regex("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"); 95 = new Regex("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$");
91 96
92 public static FireAndForgetMethod FireAndForgetMethod = FireAndForgetMethod.SmartThreadPool; 97 public static FireAndForgetMethod DefaultFireAndForgetMethod = FireAndForgetMethod.SmartThreadPool;
98 public static FireAndForgetMethod FireAndForgetMethod = DefaultFireAndForgetMethod;
93 99
94 /// <summary> 100 /// <summary>
95 /// Gets the name of the directory where the current running executable 101 /// Gets the name of the directory where the current running executable
@@ -1506,6 +1512,9 @@ namespace OpenSim.Framework
1506 1512
1507 switch (FireAndForgetMethod) 1513 switch (FireAndForgetMethod)
1508 { 1514 {
1515 case FireAndForgetMethod.None:
1516 realCallback.Invoke(obj);
1517 break;
1509 case FireAndForgetMethod.UnsafeQueueUserWorkItem: 1518 case FireAndForgetMethod.UnsafeQueueUserWorkItem:
1510 ThreadPool.UnsafeQueueUserWorkItem(realCallback, obj); 1519 ThreadPool.UnsafeQueueUserWorkItem(realCallback, obj);
1511 break; 1520 break;