diff options
author | Justin Clark-Casey (justincc) | 2011-08-18 00:53:05 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-08-18 00:53:05 +0100 |
commit | c1a34cd8da293e63d3cba70b5271c9a297789db2 (patch) | |
tree | f6d87f42151ca8891cb37ed1bf2a5d5361c86ddf /OpenSim/Framework | |
parent | comment out noisy attachments logging (diff) | |
download | opensim-SC_OLD-c1a34cd8da293e63d3cba70b5271c9a297789db2.zip opensim-SC_OLD-c1a34cd8da293e63d3cba70b5271c9a297789db2.tar.gz opensim-SC_OLD-c1a34cd8da293e63d3cba70b5271c9a297789db2.tar.bz2 opensim-SC_OLD-c1a34cd8da293e63d3cba70b5271c9a297789db2.tar.xz |
Don't try to save changed attachment states when an NPC with attachments is removed from the scene.
This is done by introducing a PresenceType enum into ScenePresence which currently has two values, User and Npc.
This seems better than a SaveAttachments flag in terms of code comprehension, though I'm still slightly uneasy about introducing these semantics to core objects
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/IScene.cs | 7 | ||||
-rw-r--r-- | OpenSim/Framework/PresenceType.cs | 39 |
2 files changed, 43 insertions, 3 deletions
diff --git a/OpenSim/Framework/IScene.cs b/OpenSim/Framework/IScene.cs index b5f975b..8f7a2e5 100644 --- a/OpenSim/Framework/IScene.cs +++ b/OpenSim/Framework/IScene.cs | |||
@@ -72,10 +72,11 @@ namespace OpenSim.Framework | |||
72 | 72 | ||
73 | /// <summary> | 73 | /// <summary> |
74 | /// Register the new client with the scene. The client starts off as a child agent - the later agent crossing | 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 during login. | 75 | /// will promote it to a root agent. |
76 | /// </summary> | 76 | /// </summary> |
77 | /// <param name="client"></param | 77 | /// <param name="client"></param> |
78 | void AddNewClient(IClientAPI client); | 78 | /// <param name="type">The type of agent to add.</param> |
79 | void AddNewClient(IClientAPI client, PresenceType type); | ||
79 | 80 | ||
80 | /// <summary> | 81 | /// <summary> |
81 | /// Remove the given client from the scene. | 82 | /// Remove the given client from the scene. |
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 | */ | ||
27 | using System; | ||
28 | |||
29 | namespace 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 | ||