diff options
author | UbitUmarov | 2016-06-28 18:14:30 +0100 |
---|---|---|
committer | UbitUmarov | 2016-06-28 18:14:30 +0100 |
commit | a08c354a0737aa1c39e8abd1bc77446c5ace2997 (patch) | |
tree | 5d26160d350397acc53da256d426548d2825f169 /OpenSim/Region/OptionalModules/World | |
parent | mantis: 7936 replace httpServer_OpenSim.dll with a new one restoring some ch... (diff) | |
download | opensim-SC_OLD-a08c354a0737aa1c39e8abd1bc77446c5ace2997.zip opensim-SC_OLD-a08c354a0737aa1c39e8abd1bc77446c5ace2997.tar.gz opensim-SC_OLD-a08c354a0737aa1c39e8abd1bc77446c5ace2997.tar.bz2 opensim-SC_OLD-a08c354a0737aa1c39e8abd1bc77446c5ace2997.tar.xz |
fix NPCs OS_NPC_OBJECT_GROUP option. group ID needs to be set during creation, before scenepresence.CompleteMovement, set tittle just after it.
Diffstat (limited to 'OpenSim/Region/OptionalModules/World')
-rw-r--r-- | OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index d40fa48..8462661 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | |||
@@ -157,14 +157,14 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
157 | } | 157 | } |
158 | 158 | ||
159 | public UUID CreateNPC(string firstname, string lastname, | 159 | public UUID CreateNPC(string firstname, string lastname, |
160 | Vector3 position, UUID owner, bool senseAsAgent, Scene scene, | 160 | Vector3 position, UUID owner, bool senseAsAgent, Scene scene, |
161 | AvatarAppearance appearance) | 161 | AvatarAppearance appearance) |
162 | { | 162 | { |
163 | return CreateNPC(firstname, lastname, position, UUID.Zero, owner, senseAsAgent, scene, appearance); | 163 | return CreateNPC(firstname, lastname, position, UUID.Zero, owner, "", UUID.Zero, senseAsAgent, scene, appearance); |
164 | } | 164 | } |
165 | 165 | ||
166 | public UUID CreateNPC(string firstname, string lastname, | 166 | public UUID CreateNPC(string firstname, string lastname, |
167 | Vector3 position, UUID agentID, UUID owner, bool senseAsAgent, Scene scene, | 167 | Vector3 position, UUID agentID, UUID owner, string groupTitle, UUID groupID, bool senseAsAgent, Scene scene, |
168 | AvatarAppearance appearance) | 168 | AvatarAppearance appearance) |
169 | { | 169 | { |
170 | NPCAvatar npcAvatar = null; | 170 | NPCAvatar npcAvatar = null; |
@@ -222,8 +222,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
222 | ScenePresence sp; | 222 | ScenePresence sp; |
223 | if (scene.TryGetScenePresence(npcAvatar.AgentId, out sp)) | 223 | if (scene.TryGetScenePresence(npcAvatar.AgentId, out sp)) |
224 | { | 224 | { |
225 | 225 | npcAvatar.ActiveGroupId = groupID; | |
226 | sp.CompleteMovement(npcAvatar, false); | 226 | sp.CompleteMovement(npcAvatar, false); |
227 | sp.Grouptitle = groupTitle; | ||
227 | m_avatars.Add(npcAvatar.AgentId, npcAvatar); | 228 | m_avatars.Add(npcAvatar.AgentId, npcAvatar); |
228 | // m_log.DebugFormat("[NPC MODULE]: Created NPC {0} {1}", npcAvatar.AgentId, sp.Name); | 229 | // m_log.DebugFormat("[NPC MODULE]: Created NPC {0} {1}", npcAvatar.AgentId, sp.Name); |
229 | } | 230 | } |