diff options
author | Melanie | 2014-02-04 01:55:41 +0000 |
---|---|---|
committer | Melanie | 2014-02-04 01:55:41 +0000 |
commit | e1d1c279651784d7290241b8c4b416bc4c96ab3c (patch) | |
tree | 0a6f258ff2612b0faaf6aceadaa7be09b1f0386e /OpenSim/Region/OptionalModules | |
parent | Dropping the rest of Avination's modified appearance code for core. (diff) | |
parent | Add "--no-objects" parameter to 'load oar'. (diff) | |
download | opensim-SC-e1d1c279651784d7290241b8c4b416bc4c96ab3c.zip opensim-SC-e1d1c279651784d7290241b8c4b416bc4c96ab3c.tar.gz opensim-SC-e1d1c279651784d7290241b8c4b416bc4c96ab3c.tar.bz2 opensim-SC-e1d1c279651784d7290241b8c4b416bc4c96ab3c.tar.xz |
Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
Diffstat (limited to 'OpenSim/Region/OptionalModules')
3 files changed, 39 insertions, 4 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs index 296ab87..d059b97 100644 --- a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs | |||
@@ -304,7 +304,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady | |||
304 | finally | 304 | finally |
305 | { | 305 | { |
306 | if (os != null) | 306 | if (os != null) |
307 | os.Close(); | 307 | os.Dispose(); |
308 | } | 308 | } |
309 | } | 309 | } |
310 | } | 310 | } |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index a895ee1..fb644b7 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | |||
@@ -61,7 +61,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
61 | private readonly string m_firstname; | 61 | private readonly string m_firstname; |
62 | private readonly string m_lastname; | 62 | private readonly string m_lastname; |
63 | private readonly Vector3 m_startPos; | 63 | private readonly Vector3 m_startPos; |
64 | private readonly UUID m_uuid = UUID.Random(); | 64 | private readonly UUID m_uuid; |
65 | private readonly Scene m_scene; | 65 | private readonly Scene m_scene; |
66 | private readonly UUID m_ownerID; | 66 | private readonly UUID m_ownerID; |
67 | 67 | ||
@@ -71,6 +71,19 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
71 | m_firstname = firstname; | 71 | m_firstname = firstname; |
72 | m_lastname = lastname; | 72 | m_lastname = lastname; |
73 | m_startPos = position; | 73 | m_startPos = position; |
74 | m_uuid = UUID.Random(); | ||
75 | m_scene = scene; | ||
76 | m_ownerID = ownerID; | ||
77 | SenseAsAgent = senseAsAgent; | ||
78 | } | ||
79 | |||
80 | public NPCAvatar( | ||
81 | string firstname, string lastname, UUID agentID, Vector3 position, UUID ownerID, bool senseAsAgent, Scene scene) | ||
82 | { | ||
83 | m_firstname = firstname; | ||
84 | m_lastname = lastname; | ||
85 | m_startPos = position; | ||
86 | m_uuid = agentID; | ||
74 | m_scene = scene; | 87 | m_scene = scene; |
75 | m_ownerID = ownerID; | 88 | m_ownerID = ownerID; |
76 | SenseAsAgent = senseAsAgent; | 89 | SenseAsAgent = senseAsAgent; |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index fffe1ab..8a2da6e 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | |||
@@ -140,8 +140,30 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
140 | Vector3 position, UUID owner, bool senseAsAgent, Scene scene, | 140 | Vector3 position, UUID owner, bool senseAsAgent, Scene scene, |
141 | AvatarAppearance appearance) | 141 | AvatarAppearance appearance) |
142 | { | 142 | { |
143 | NPCAvatar npcAvatar = new NPCAvatar(firstname, lastname, position, | 143 | return CreateNPC(firstname, lastname, position, UUID.Zero, owner, senseAsAgent, scene, appearance); |
144 | owner, senseAsAgent, scene); | 144 | } |
145 | |||
146 | public UUID CreateNPC(string firstname, string lastname, | ||
147 | Vector3 position, UUID agentID, UUID owner, bool senseAsAgent, Scene scene, | ||
148 | AvatarAppearance appearance) | ||
149 | { | ||
150 | NPCAvatar npcAvatar = null; | ||
151 | |||
152 | try | ||
153 | { | ||
154 | if (agentID == UUID.Zero) | ||
155 | npcAvatar = new NPCAvatar(firstname, lastname, position, | ||
156 | owner, senseAsAgent, scene); | ||
157 | else | ||
158 | npcAvatar = new NPCAvatar(firstname, lastname, agentID, position, | ||
159 | owner, senseAsAgent, scene); | ||
160 | } | ||
161 | catch (Exception e) | ||
162 | { | ||
163 | m_log.Info("[NPC MODULE]: exception creating NPC avatar: " + e.ToString()); | ||
164 | return UUID.Zero; | ||
165 | } | ||
166 | |||
145 | npcAvatar.CircuitCode = (uint)Util.RandomClass.Next(0, | 167 | npcAvatar.CircuitCode = (uint)Util.RandomClass.Next(0, |
146 | int.MaxValue); | 168 | int.MaxValue); |
147 | 169 | ||