From 29a740ec8c78bfc3c1ab5b41b302ae2205c6e9aa Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 7 Dec 2009 18:03:53 +0100 Subject: Initial windlight codebase commit --- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index cf36d08..975033a 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -522,7 +522,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC } - public void SendGenericMessage(string method, List message) + public void SendGenericMessage(string method, List message) { } -- cgit v1.1 From cfca9e1e811f6cdea6b7c3338f7f783a07f8e0ac Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 29 Jan 2010 07:20:13 +0000 Subject: Revert "Updates all IRegionModules to the new style region modules." This reverts commit ec3c31e61e5e540f822891110df9bc978655bbaf. --- .../Region/OptionalModules/World/NPC/NPCModule.cs | 28 ++++++---------------- 1 file changed, 7 insertions(+), 21 deletions(-) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index 521d01a..ac39a53 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs @@ -25,11 +25,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; using System.Collections.Generic; using System.Threading; using OpenMetaverse; -using Mono.Addins; using Nini.Config; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; @@ -39,8 +37,7 @@ using Timer=System.Timers.Timer; namespace OpenSim.Region.OptionalModules.World.NPC { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] - public class NPCModule : ISharedRegionModule, INPCModule + public class NPCModule : IRegionModule, INPCModule { // private const bool m_enabled = false; @@ -137,13 +134,15 @@ namespace OpenSim.Region.OptionalModules.World.NPC } - public void Initialise(IConfigSource source) + public void Initialise(Scene scene, IConfigSource source) { m_createMutex = new Mutex(false); m_timer = new Timer(500); m_timer.Elapsed += m_timer_Elapsed; m_timer.Start(); + + scene.RegisterModuleInterface(this); } void m_timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) @@ -174,19 +173,6 @@ namespace OpenSim.Region.OptionalModules.World.NPC } } - public void AddRegion(Scene scene) - { - scene.RegisterModuleInterface(this); - } - public void RegionLoaded(Scene scene) - { - } - - public void RemoveRegion(Scene scene) - { - scene.UnregisterModuleInterface(this); - } - public void PostInitialise() { } @@ -200,9 +186,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC get { return "NPCModule"; } } - public Type ReplaceableInterface + public bool IsSharedModule { - get { return null; } - } + get { return true; } + } } } -- cgit v1.1 From fce9e499e4682edf6db7b4f9c5546524b4a25197 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 8 Mar 2010 01:19:45 -0600 Subject: - parcel blocking, region crossing blocking, teleport blocking --- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 15473d8..ebf9333 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -190,6 +190,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC public event Action OnRegionHandShakeReply; public event GenericCall2 OnRequestWearables; public event GenericCall1 OnCompleteMovementToRegion; + public event UpdateAgent OnPreAgentUpdate; public event UpdateAgent OnAgentUpdate; public event AgentRequestSit OnAgentRequestSit; public event AgentSit OnAgentSit; -- cgit v1.1 From 8f838c722da978da646fcef59a5af767840832bb Mon Sep 17 00:00:00 2001 From: Tom Grimshaw Date: Mon, 17 May 2010 14:14:19 -0700 Subject: When killing a zombie session, don't send the stop packet since it often has the effect of killing a newly connected client. --- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 6360c99..4323c94 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -845,6 +845,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC public void Close() { + Close(true); + } + + public void Close(bool sendStop) + { } public void Start() -- cgit v1.1 From 91b1d17e5bd3ff6ed006744bc529b53a67af1a64 Mon Sep 17 00:00:00 2001 From: Tom Grimshaw Date: Tue, 18 May 2010 01:09:47 -0700 Subject: Fix for hanging on "Connecting to region".. caused by packets being processed before the presence has bound to receive events. Fixed this by adding packets to a queue and then processing them when the presence is ready. --- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 4323c94..b828357 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -839,6 +839,10 @@ namespace OpenSim.Region.OptionalModules.World.NPC { } + public void ProcessPendingPackets() + { + } + public void ProcessInPacket(Packet NewPack) { } -- cgit v1.1 From bebbe407ee166a0aa22f0ec8d14ada780924f9af Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Wed, 14 Jul 2010 19:58:23 +0200 Subject: Major attachments cleanup. Remove unused AttachObject ClientView method Clean up use of AttachObject throughout, reduce number of overloads and number of parameters --- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 4 ---- 1 file changed, 4 deletions(-) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index c3edba2..23255fb 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -627,10 +627,6 @@ namespace OpenSim.Region.OptionalModules.World.NPC { } - public virtual void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID) - { - } - public virtual void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels) { } -- cgit v1.1 From 330343505ca2d6d109e89b4767f4351ab9bec91d Mon Sep 17 00:00:00 2001 From: Tom Date: Fri, 6 Aug 2010 11:39:10 -0700 Subject: Implement CreateNewOutfitAttachments. This addresses mantis #199. --- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 23255fb..d6f4d53 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -156,7 +156,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC #pragma warning disable 67 public event Action OnLogout; public event ObjectPermissions OnObjectPermissions; - + public event MoveItemsAndLeaveCopy OnMoveItemsAndLeaveCopy; public event MoneyTransferRequest OnMoneyTransferRequest; public event ParcelBuy OnParcelBuy; public event Action OnConnectionClosed; -- cgit v1.1 From 52dd547863c0cdd22f53f0efcaef11ae096855a0 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 8 Oct 2010 11:31:52 +0200 Subject: Make SendKillObject send multiple localIDs in one packet. This avoids the halting visual behavior of large group deletes and eliminates the packet flood --- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 1653ecb..3cbe391 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -519,7 +519,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC } - public virtual void SendKillObject(ulong regionHandle, uint localID) + public virtual void SendKillObject(ulong regionHandle, List localID) { } -- cgit v1.1 From f985775962ae8da0010cc5ef5f903a53b550f5d2 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 5 Nov 2010 14:27:14 +0100 Subject: Revert "Fix for hanging on "Connecting to region".. caused by packets being processed before the presence has bound to receive events. Fixed this by adding packets to a queue and then processing them when the presence is ready." This reverts commit 91b1d17e5bd3ff6ed006744bc529b53a67af1a64. Conflicts: OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs OpenSim/Region/Framework/Scenes/ScenePresence.cs --- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 4 ---- 1 file changed, 4 deletions(-) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 737ca1b..39c3364 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -836,10 +836,6 @@ namespace OpenSim.Region.OptionalModules.World.NPC { } - public void ProcessPendingPackets() - { - } - public void ProcessInPacket(Packet NewPack) { } -- cgit v1.1 From 2cb2bff9b2ab68c325b0142da0b37730be9a12a3 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 30 Dec 2010 00:31:59 +0100 Subject: Implement SendPlacesReply --- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 51949b4..1ce3791 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -1175,5 +1175,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC public void StopFlying(ISceneEntity presence) { } + + public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data) + { + } } } -- cgit v1.1 From ec0aa7a90b578572fc45f27b5113a174ff37643e Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 17 Apr 2011 23:17:05 +0200 Subject: Fix up client implementations --- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 227450d..1b67b7d 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -360,7 +360,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC public event ClassifiedInfoRequest OnClassifiedInfoRequest; public event ClassifiedInfoUpdate OnClassifiedInfoUpdate; public event ClassifiedDelete OnClassifiedDelete; - public event ClassifiedDelete OnClassifiedGodDelete; + public event ClassifiedGodDelete OnClassifiedGodDelete; public event EventNotificationAddRequest OnEventNotificationAddRequest; public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest; -- cgit v1.1 From 96174595da269f50d37c88c213ad00b79a7c7c83 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 23 Jul 2011 11:39:32 +0100 Subject: Fix LLTextBox to work with the updated libOMV --- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index f07ad67..69d6261 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -1162,7 +1162,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC { } - public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) + public void SendTextBoxRequest(string message, int chatChannel, string objectname, UUID ownerID, string ownerFirstName, string ownerLastName, UUID objectId) { } -- cgit v1.1 From 69322b84cedd667d8dc3d18e475ae8c15a7fad50 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 6 Nov 2011 21:46:03 +0000 Subject: Fix up failing test to compensate for changed sit target offset --- OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs index d2b79f7..2e147fb 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs @@ -287,7 +287,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests // default avatar. Assert.That( npc.AbsolutePosition, - Is.EqualTo(part.AbsolutePosition + new Vector3(0, 0, 0.8857438f))); + Is.EqualTo(part.AbsolutePosition + new Vector3(0, 0, 0.8454993)); npcModule.Stand(npc.UUID, scene); @@ -295,4 +295,4 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests Assert.That(npc.ParentID, Is.EqualTo(0)); } } -} \ No newline at end of file +} -- cgit v1.1 From ec8c93aa5e1d0af2c0adf38156b05e85421f4a81 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 4 Dec 2011 12:35:01 +0100 Subject: Implement ChangeInventoryItemFlagsPacket handling --- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index a29ed21..2b60cc3 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -400,6 +400,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; public event SimWideDeletesDelegate OnSimWideDeletes; public event SendPostcard OnSendPostcard; + public event ChangeInventoryItemFlags OnChangeInventoryItemFlags; public event MuteListEntryUpdate OnUpdateMuteListEntry; public event MuteListEntryRemove OnRemoveMuteListEntry; public event GodlikeMessage onGodlikeMessage; -- cgit v1.1 From f1846045a6663c0530524d7c91d1ed17bf449c07 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 6 Jan 2012 21:34:43 +0100 Subject: Add osNpcCreateOwned to create an owned NPC. Those can be sensed only by the owner, can be destroyed only by the owner and only the owner can save their appearance. Added "NPC" as a flag to llSensor to sense NPCs and exclude them from "AGENT" results. --- .../Region/OptionalModules/World/NPC/NPCAvatar.cs | 9 ++++++- .../Region/OptionalModules/World/NPC/NPCModule.cs | 28 ++++++++++++++++++---- .../World/NPC/Tests/NPCModuleTests.cs | 10 ++++---- 3 files changed, 36 insertions(+), 11 deletions(-) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 6c7a683..b4181a4 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -42,13 +42,15 @@ namespace OpenSim.Region.OptionalModules.World.NPC private readonly Vector3 m_startPos; private readonly UUID m_uuid = UUID.Random(); private readonly Scene m_scene; + private readonly UUID m_ownerID; - public NPCAvatar(string firstname, string lastname, Vector3 position, Scene scene) + public NPCAvatar(string firstname, string lastname, Vector3 position, UUID ownerID, Scene scene) { m_firstname = firstname; m_lastname = lastname; m_startPos = position; m_scene = scene; + m_ownerID = ownerID; } public IScene Scene @@ -56,6 +58,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC get { return m_scene; } } + public UUID OwnerID + { + get { return m_ownerID; } + } + public ISceneAgent SceneAgent { get { throw new NotImplementedException(); } } public void Say(string message) diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index 56ff367..e874417 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs @@ -91,9 +91,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC } public UUID CreateNPC( - string firstname, string lastname, Vector3 position, Scene scene, AvatarAppearance appearance) + string firstname, string lastname, Vector3 position, UUID owner, Scene scene, AvatarAppearance appearance) { - NPCAvatar npcAvatar = new NPCAvatar(firstname, lastname, position, scene); + NPCAvatar npcAvatar = new NPCAvatar(firstname, lastname, position, owner, scene); npcAvatar.CircuitCode = (uint)Util.RandomClass.Next(0, int.MaxValue); m_log.DebugFormat( @@ -234,12 +234,30 @@ namespace OpenSim.Region.OptionalModules.World.NPC return false; } - public bool DeleteNPC(UUID agentID, Scene scene) + public UUID GetOwner(UUID agentID) { lock (m_avatars) { - if (m_avatars.ContainsKey(agentID)) + NPCAvatar av; + if (m_avatars.TryGetValue(agentID, out av)) { + return av.OwnerID; + } + } + + return UUID.Zero; + } + + public bool DeleteNPC(UUID agentID, UUID callerID, Scene scene) + { + lock (m_avatars) + { + NPCAvatar av; + if (m_avatars.TryGetValue(agentID, out av)) + { + if (av.OwnerID != UUID.Zero && callerID != UUID.Zero && av.OwnerID != callerID) + return false; + scene.RemoveClient(agentID, false); m_avatars.Remove(agentID); @@ -268,4 +286,4 @@ namespace OpenSim.Region.OptionalModules.World.NPC get { return true; } } } -} \ No newline at end of file +} diff --git a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs index 9c66b25..571d33d 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs @@ -109,7 +109,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests afm.SetAppearance(sp, originalTe, null); INPCModule npcModule = scene.RequestModuleInterface(); - UUID npcId = npcModule.CreateNPC("John", "Smith", new Vector3(128, 128, 30), scene, sp.Appearance); + UUID npcId = npcModule.CreateNPC("John", "Smith", new Vector3(128, 128, 30), UUID.Zero, scene, sp.Appearance); ScenePresence npc = scene.GetScenePresence(npcId); @@ -137,7 +137,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests am.RezSingleAttachmentFromInventory(sp, attItemId, (uint)AttachmentPoint.Chest); INPCModule npcModule = scene.RequestModuleInterface(); - UUID npcId = npcModule.CreateNPC("John", "Smith", new Vector3(128, 128, 30), scene, sp.Appearance); + UUID npcId = npcModule.CreateNPC("John", "Smith", new Vector3(128, 128, 30), UUID.Zero, scene, sp.Appearance); ScenePresence npc = scene.GetScenePresence(npcId); @@ -169,7 +169,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests Vector3 startPos = new Vector3(128, 128, 30); INPCModule npcModule = scene.RequestModuleInterface(); - UUID npcId = npcModule.CreateNPC("John", "Smith", startPos, scene, sp.Appearance); + UUID npcId = npcModule.CreateNPC("John", "Smith", startPos, UUID.Zero, scene, sp.Appearance); ScenePresence npc = scene.GetScenePresence(npcId); Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos)); @@ -240,7 +240,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests Vector3 startPos = new Vector3(128, 128, 30); INPCModule npcModule = scene.RequestModuleInterface(); - UUID npcId = npcModule.CreateNPC("John", "Smith", startPos, scene, sp.Appearance); + UUID npcId = npcModule.CreateNPC("John", "Smith", startPos, UUID.Zero, scene, sp.Appearance); ScenePresence npc = scene.GetScenePresence(npcId); SceneObjectPart part = SceneHelpers.AddSceneObject(scene); @@ -273,7 +273,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests Vector3 startPos = new Vector3(1, 1, 1); INPCModule npcModule = scene.RequestModuleInterface(); - UUID npcId = npcModule.CreateNPC("John", "Smith", startPos, scene, sp.Appearance); + UUID npcId = npcModule.CreateNPC("John", "Smith", startPos, UUID.Zero, scene, sp.Appearance); ScenePresence npc = scene.GetScenePresence(npcId); SceneObjectPart part = SceneHelpers.AddSceneObject(scene); -- cgit v1.1 From 07c487a28f6ce6d85cf32fba0c2ded724f7b5af7 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 2 Feb 2012 21:36:45 +0100 Subject: Make ban, eject, freeze and the scripted versions of those work. --- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 17fd6b1..7f5372c 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -944,7 +944,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, ILandObject lo, float simObjectBonusFactor,int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) { } - public void SendLandAccessListData(List avatars, uint accessFlag, int localLandID) + public void SendLandAccessListData(List accessList, uint accessFlag, int localLandID) { } public void SendForceClientSelectObjects(List objectIDs) -- cgit v1.1 From 9c6ba8d18f4b3c4b457240f251612691cb271d90 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 8 Feb 2012 13:04:23 +0100 Subject: Push more NPC stuff into threads --- .../Region/OptionalModules/World/NPC/NPCModule.cs | 37 +++++++++++++--------- 1 file changed, 22 insertions(+), 15 deletions(-) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index 6a48b89..3ea7352 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs @@ -140,26 +140,33 @@ namespace OpenSim.Region.OptionalModules.World.NPC // acd.AgentID, i, acd.Appearance.Texture.FaceTextures[i]); // } - lock (m_avatars) - { - scene.AuthenticateHandler.AddNewCircuit(npcAvatar.CircuitCode, acd); - scene.AddNewClient(npcAvatar, PresenceType.Npc); + ManualResetEvent ev = new ManualResetEvent(false); - ScenePresence sp; - if (scene.TryGetScenePresence(npcAvatar.AgentId, out sp)) + Util.FireAndForget(delegate(object x) { + lock (m_avatars) { - m_log.DebugFormat( - "[NPC MODULE]: Successfully retrieved scene presence for NPC {0} {1}", sp.Name, sp.UUID); + scene.AuthenticateHandler.AddNewCircuit(npcAvatar.CircuitCode, acd); + scene.AddNewClient(npcAvatar, PresenceType.Npc); - sp.CompleteMovement(npcAvatar, false); - } - else - { - m_log.WarnFormat("[NPC MODULE]: Could not find scene presence for NPC {0} {1}", sp.Name, sp.UUID); + ScenePresence sp; + if (scene.TryGetScenePresence(npcAvatar.AgentId, out sp)) + { + m_log.DebugFormat( + "[NPC MODULE]: Successfully retrieved scene presence for NPC {0} {1}", sp.Name, sp.UUID); + + sp.CompleteMovement(npcAvatar, false); + } + else + { + m_log.WarnFormat("[NPC MODULE]: Could not find scene presence for NPC {0} {1}", sp.Name, sp.UUID); + } + + m_avatars.Add(npcAvatar.AgentId, npcAvatar); } + ev.Set(); + }); - m_avatars.Add(npcAvatar.AgentId, npcAvatar); - } + ev.WaitOne(); m_log.DebugFormat("[NPC MODULE]: Created NPC with id {0}", npcAvatar.AgentId); -- cgit v1.1 From d342008e5b9ca6d6f0c2bbaac6b946a556adc40e Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 27 Feb 2012 08:49:19 +0100 Subject: Fix NPC appearance setting to include attachments again --- OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index ae46c97..78e9b29 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs @@ -99,8 +99,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC // Delete existing sp attachments scene.AttachmentsModule.DeleteAttachmentsFromScene(sp, false); + AvatarAppearance app = new AvatarAppearance(appearance, true); + sp.Appearance = app; + // Set new sp appearance. Also sends to clients. - scene.RequestModuleInterface().SetAppearance(sp, new AvatarAppearance(appearance, true)); + scene.RequestModuleInterface().SetAppearance(sp, app); // Rez needed sp attachments scene.AttachmentsModule.RezAttachments(sp); -- cgit v1.1 From 908abb1c3dded307e769abac71f660b835875975 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 10 Mar 2012 20:32:19 +0000 Subject: BIG MESS. changed Iclient interface so only one event is used to inform scene about position scale or rotation change by client (others can be added). Its served at SceneGraph that does permition checks, undostore and sends down to SOG. changed values are stored in a class (ObjectChangeData) and what is changed as a enum (ObjectChangeWhat) with bit fields and 'macros' of this for better readability (at top of scenegraph.cs lasy to find better place for now) this can be extended for other things clients changes and need undo/redo. SOG process acording to what is changed. Changed UNDO/redo to use this also (warning is only storing what is changed, previus stored all, this must be checked for side efects. to save all PRS change commented line in scenegraph). Still have excessive calls to ScheduleGroupForTerseUpdate. **** UNTESTED **** --- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index d0b822c..96f33a5 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -240,6 +240,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC public event UpdatePrimTexture OnUpdatePrimTexture; public event UpdateVector OnUpdatePrimGroupPosition; public event UpdateVector OnUpdatePrimSinglePosition; + public event ClientChangeObject onClientChangeObject; public event UpdatePrimRotation OnUpdatePrimGroupRotation; public event UpdatePrimSingleRotationPosition OnUpdatePrimSingleRotationPosition; public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation; -- cgit v1.1 From 84ca09f7c5cec051014181853083e52691bb7e07 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 15 Mar 2012 02:24:13 +0000 Subject: added ObjectPhysicsProperties http event message to send viewer that data. For now on caps/EventQueue, and still only used on a material change... --- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 5b9b071..7bd5590 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -1195,5 +1195,10 @@ namespace OpenSim.Region.OptionalModules.World.NPC public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data) { } + + public void SendPartPhysicsProprieties(ISceneEntity entity) + { + } + } } -- cgit v1.1 From 5936e0c3760922e09099b65e3db522055db2286c Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 18 Apr 2012 19:51:27 +0200 Subject: Allow scripts in attachments owned by the NPC to control the NPC --- OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index 68f21c8..ebf5e84 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs @@ -323,9 +323,15 @@ namespace OpenSim.Region.OptionalModules.World.NPC { NPCAvatar av; if (m_avatars.TryGetValue(npcID, out av)) + { + if (npcID == callerID) + return true; return CheckPermissions(av, callerID); + } else + { return false; + } } } @@ -337,7 +343,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC /// true if they do, false if they don't. private bool CheckPermissions(NPCAvatar av, UUID callerID) { - return callerID == UUID.Zero || av.OwnerID == UUID.Zero || av.OwnerID == callerID; + return callerID == UUID.Zero || av.OwnerID == UUID.Zero || av.OwnerID == callerID || av.AgentId == callerID; } } } -- cgit v1.1 From 7461fe4554f8104212071e3e01b07786f8eb546f Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 12 May 2012 15:27:37 +0100 Subject: ªTEST MESS* reduce animation packets send. Added onchangeanim event with parameters to define if to add or remove, and if to send anims pack on that evocation, etc --- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index c3335f0..8996865 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -189,6 +189,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC public event ObjectDrop OnObjectDrop; public event StartAnim OnStartAnim; public event StopAnim OnStopAnim; + public event ChangeAnim OnChangeAnim; public event LinkObjects OnLinkObjects; public event DelinkObjects OnDelinkObjects; public event RequestMapBlocks OnRequestMapBlocks; -- cgit v1.1 From ce8b9e6c570f73a5c70dfc2b52bbb595637b717d Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 19 Jul 2012 12:27:36 +0200 Subject: Fix slow loading of task inventory --- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 97db7e1..d00a6c0 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -755,7 +755,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC { } - public virtual void SendXferPacket(ulong xferID, uint packet, byte[] data) + public virtual void SendXferPacket(ulong xferID, uint packet, byte[] data, bool isTaskInventory) { } public virtual void SendAbortXferPacket(ulong xferID) -- cgit v1.1 From 12a329eb8542f46a71c457eb506f37d7e56b1305 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 14 Aug 2012 02:28:23 +0200 Subject: Comment spammy debug --- OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index b37aba3..3f19370 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs @@ -179,9 +179,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC ScenePresence sp; scene.TryGetScenePresence(agentID, out sp); - m_log.DebugFormat( - "[NPC MODULE]: Moving {0} to {1} in {2}, noFly {3}, landAtTarget {4}", - sp.Name, pos, scene.RegionInfo.RegionName, noFly, landAtTarget); +// m_log.DebugFormat( +// "[NPC MODULE]: Moving {0} to {1} in {2}, noFly {3}, landAtTarget {4}", +// sp.Name, pos, scene.RegionInfo.RegionName, noFly, landAtTarget); sp.MoveToTarget(pos, noFly, landAtTarget); sp.SetAlwaysRun = running; -- cgit v1.1 From 20b66cf654a74bef0d514bbf30b72496ba0edd37 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 14 Aug 2012 03:02:43 +0200 Subject: Removed more spammy NPC crap --- OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index 3f19370..72853ea 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs @@ -352,7 +352,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC scene.RemoveClient(agentID, false); m_avatars.Remove(agentID); - m_log.DebugFormat("[NPC MODULE]: Removed NPC {0} {1}", agentID, av.Name); +// m_log.DebugFormat("[NPC MODULE]: Removed NPC {0} {1}", agentID, av.Name); return true; } } -- cgit v1.1 From 4a969b45bd3032c8f744ef816347711f67809a37 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 14 Aug 2012 22:02:40 +0200 Subject: Remove NPC debug spam --- OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index cfedca9..f16927c 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs @@ -124,9 +124,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC NPCAvatar npcAvatar = new NPCAvatar(firstname, lastname, position, owner, senseAsAgent, scene); npcAvatar.CircuitCode = (uint)Util.RandomClass.Next(0, int.MaxValue); - m_log.DebugFormat( - "[NPC MODULE]: Creating NPC {0} {1} {2}, owner={3}, senseAsAgent={4} at {5} in {6}", - firstname, lastname, npcAvatar.AgentId, owner, senseAsAgent, position, scene.RegionInfo.RegionName); +// m_log.DebugFormat( +// "[NPC MODULE]: Creating NPC {0} {1} {2}, owner={3}, senseAsAgent={4} at {5} in {6}", +// firstname, lastname, npcAvatar.AgentId, owner, senseAsAgent, position, scene.RegionInfo.RegionName); AgentCircuitData acd = new AgentCircuitData(); acd.AgentID = npcAvatar.AgentId; @@ -157,7 +157,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC { sp.CompleteMovement(npcAvatar, false); m_avatars.Add(npcAvatar.AgentId, npcAvatar); - m_log.DebugFormat("[NPC MODULE]: Created NPC {0} {1}", npcAvatar.AgentId, sp.Name); +// m_log.DebugFormat("[NPC MODULE]: Created NPC {0} {1}", npcAvatar.AgentId, sp.Name); } } ev.Set(); @@ -179,9 +179,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC ScenePresence sp; if (scene.TryGetScenePresence(agentID, out sp)) { - m_log.DebugFormat( - "[NPC MODULE]: Moving {0} to {1} in {2}, noFly {3}, landAtTarget {4}", - sp.Name, pos, scene.RegionInfo.RegionName, noFly, landAtTarget); +// m_log.DebugFormat( +// "[NPC MODULE]: Moving {0} to {1} in {2}, noFly {3}, landAtTarget {4}", +// sp.Name, pos, scene.RegionInfo.RegionName, noFly, landAtTarget); sp.MoveToTarget(pos, noFly, landAtTarget); sp.SetAlwaysRun = running; -- cgit v1.1 From ca67ee60ac0e0c26d6d32fc68d48ef63570f034d Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 24 Sep 2012 21:22:08 +0100 Subject: add missing transactionID in SendInventoryItemCreateUpdate. and make use of it on inventoryAccessModule, etc. Most likelly it's needs where there is a transactionID not zero --- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index d00a6c0..7c693b6 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -739,6 +739,10 @@ namespace OpenSim.Region.OptionalModules.World.NPC { } + public void SendInventoryItemCreateUpdate(InventoryItemBase Item, UUID transactionID, uint callbackId) + { + } + public virtual void SendRemoveInventoryItem(UUID itemID) { } -- cgit v1.1 From 4fa088bafb4c78ad3177b0e944a4312bd6abdea7 Mon Sep 17 00:00:00 2001 From: teravus Date: Sun, 4 Nov 2012 22:57:24 -0500 Subject: Pipe Throttle Update Event to EventManager, client --> ScenePresence --> EventManager, so that modules can know when throttles are updated. The event contains no client specific data to preserve the possibility of 'multiple clients' and you must still call ControllingClient.GetThrottlesPacked(f) to see what the throttles actually are once the event fires. Hook EventManager.OnUpdateThrottle to GetTextureModule. --- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 7c693b6..6c8e2fc 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -473,7 +473,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC public event MuteListEntryRemove OnRemoveMuteListEntry; public event GodlikeMessage onGodlikeMessage; public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate; - + public event GenericCall2 OnUpdateThrottles; #pragma warning restore 67 #endregion -- cgit v1.1 From e9153e1d1aae50024d8cd05fe14a9bce34343a0e Mon Sep 17 00:00:00 2001 From: teravus Date: Thu, 15 Nov 2012 10:05:16 -0500 Subject: Revert "Merge master into teravuswork", it should have been avination, not master. This reverts commit dfac269032300872c4d0dc507f4f9062d102b0f4, reversing changes made to 619c39e5144f15aca129d6d999bcc5c34133ee64. --- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 18 +++++++----------- .../OptionalModules/World/NPC/Tests/NPCModuleTests.cs | 11 ----------- 2 files changed, 7 insertions(+), 22 deletions(-) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 3a03101..6c8e2fc 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -148,7 +148,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC OnInstantMessage(this, new GridInstantMessage(m_scene, m_uuid, m_firstname + " " + m_lastname, target, 0, false, message, - UUID.Zero, false, Position, new byte[0], true)); + UUID.Zero, false, Position, new byte[0])); } public void SendAgentOffline(UUID[] agentIDs) @@ -607,15 +607,13 @@ namespace OpenSim.Region.OptionalModules.World.NPC { } - public virtual void SendChatMessage( - string message, byte type, Vector3 fromPos, string fromName, - UUID fromAgentID, UUID ownerID, byte source, byte audible) + public virtual void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName, + UUID fromAgentID, byte source, byte audible) { } - public virtual void SendChatMessage( - byte[] message, byte type, Vector3 fromPos, string fromName, - UUID fromAgentID, UUID ownerID, byte source, byte audible) + public virtual void SendChatMessage(byte[] message, byte type, Vector3 fromPos, string fromName, + UUID fromAgentID, byte source, byte audible) { } @@ -911,13 +909,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC public void Close() { - Close(true, false); + Close(true); } - public void Close(bool sendStop, bool force) + public void Close(bool sendStop) { - // Remove ourselves from the scene - m_scene.RemoveClient(AgentId, false); } public void Start() diff --git a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs index 52ed846..9179966 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs @@ -117,12 +117,6 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests Assert.That(npc, Is.Not.Null); Assert.That(npc.Appearance.Texture.FaceTextures[8].TextureID, Is.EqualTo(originalFace8TextureId)); Assert.That(m_umMod.GetUserName(npc.UUID), Is.EqualTo(string.Format("{0} {1}", npc.Firstname, npc.Lastname))); - - IClientAPI client; - Assert.That(m_scene.TryGetClient(npcId, out client), Is.True); - - // Have to account for both SP and NPC. - Assert.That(m_scene.AuthenticateHandler.GetAgentCircuits().Count, Is.EqualTo(2)); } [Test] @@ -142,11 +136,6 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests ScenePresence deletedNpc = m_scene.GetScenePresence(npcId); Assert.That(deletedNpc, Is.Null); - IClientAPI client; - Assert.That(m_scene.TryGetClient(npcId, out client), Is.False); - - // Have to account for SP still present. - Assert.That(m_scene.AuthenticateHandler.GetAgentCircuits().Count, Is.EqualTo(1)); } [Test] -- cgit v1.1 From 5e0294815f7e3ec83b7e568e1468948ac0ff7331 Mon Sep 17 00:00:00 2001 From: teravus Date: Sat, 17 Nov 2012 03:47:09 -0500 Subject: * Plumbing and basic setting of the GetMesh Cap Throttler. * Last step is to flip the throttle distribution. --- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 6c8e2fc..ef53c48 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -597,6 +597,12 @@ namespace OpenSim.Region.OptionalModules.World.NPC public virtual void SetChildAgentThrottle(byte[] throttle) { } + + public void SetAgentThrottleSilent(int throttle, int setting) + { + + + } public byte[] GetThrottlesPacked(float multiplier) { return new byte[0]; -- cgit v1.1 From 77cc7ce399d1b1a710f3b3f4337932febdef66c8 Mon Sep 17 00:00:00 2001 From: teravus Date: Fri, 21 Dec 2012 19:12:30 -0500 Subject: * Partial Commit for Avatar Appearance to include the functionality of Cached Bakes. --- OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs index 52ed846..ef4005b 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs @@ -108,7 +108,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests // ScenePresence.SendInitialData() to reset our entire appearance. m_scene.AssetService.Store(AssetHelpers.CreateNotecardAsset(originalFace8TextureId)); - m_afMod.SetAppearance(sp, originalTe, null); + m_afMod.SetAppearance(sp, originalTe, null, new WearableCacheItem[0] ); UUID npcId = m_npcMod.CreateNPC("John", "Smith", new Vector3(128, 128, 30), UUID.Zero, true, m_scene, sp.Appearance); -- cgit v1.1 From 6571e7ead276027e5ed86cb1fc9d1b47ddae2e6e Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 22 Apr 2013 22:24:41 +0200 Subject: Allow callers to set the invoice parameter for GenericMessage --- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index d665126..7918c22 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -630,12 +630,12 @@ namespace OpenSim.Region.OptionalModules.World.NPC } - public void SendGenericMessage(string method, List message) + public void SendGenericMessage(string method, UUID invoice, List message) { } - public void SendGenericMessage(string method, List message) + public void SendGenericMessage(string method, UUID invoice, List message) { } -- cgit v1.1 From 01981fdf58dfe70c6df5ac514ca67fbd1ad2bc18 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 2 Aug 2014 18:57:43 +0100 Subject: dont fire a thread on npc creation keeping the main one just waiting --- OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index 9ec4740..226608a 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs @@ -170,9 +170,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC } */ - ManualResetEvent ev = new ManualResetEvent(false); +// ManualResetEvent ev = new ManualResetEvent(false); - Util.FireAndForget(delegate(object x) { +// Util.FireAndForget(delegate(object x) { lock (m_avatars) { scene.AuthenticateHandler.AddNewCircuit(npcAvatar.CircuitCode, acd); @@ -181,15 +181,16 @@ namespace OpenSim.Region.OptionalModules.World.NPC ScenePresence sp; if (scene.TryGetScenePresence(npcAvatar.AgentId, out sp)) { + sp.CompleteMovement(npcAvatar, false); m_avatars.Add(npcAvatar.AgentId, npcAvatar); // m_log.DebugFormat("[NPC MODULE]: Created NPC {0} {1}", npcAvatar.AgentId, sp.Name); } } - ev.Set(); - }); +// ev.Set(); +// }); - ev.WaitOne(); +// ev.WaitOne(); // m_log.DebugFormat("[NPC MODULE]: Created NPC with id {0}", npcAvatar.AgentId); -- cgit v1.1 From 8c657e48377213e7ee66c05a4047085cee6084ea Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 14 Aug 2014 20:41:36 +0100 Subject: add a estimator of client ping time, and painfully make it visible in show connections console command --- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index c88ccc5..7002d75 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -81,6 +81,8 @@ namespace OpenSim.Region.OptionalModules.World.NPC get { return m_scene; } } + public int PingTimeMS { get { return 0; } } + public UUID OwnerID { get { return m_ownerID; } -- cgit v1.1 From 5bf145a3977a55c474106bbe2a6c107dd9457f0d Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 21 Aug 2014 00:49:10 +0100 Subject: add a direct sendpartfullUpdate to send a full object update to a part, optionally overriding its parentID. check what it does to attachments --- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 7002d75..fa1d38a 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -1272,5 +1272,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC { } + public void SendPartFullUpdate(ISceneEntity ent, uint? parentID) + { + } + } } -- cgit v1.1 From 7351d92a76ac24edce848fe7410e920f17962101 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 29 Aug 2014 16:19:30 +0100 Subject: add method to get a category throttle rate --- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index fa1d38a..cb87536 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -1276,5 +1276,10 @@ namespace OpenSim.Region.OptionalModules.World.NPC { } + public int GetAgentThrottleSilent(int throttle) + { + return 0; + } + } } -- cgit v1.1 From caddabb5c4f62767305a589e9d818ae3457a8030 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 6 Nov 2014 22:25:16 +0000 Subject: scale ChildAgentThrottles with distance (internal to child server and not root as was done before ) --- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index cb87536..0b33c51 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -621,6 +621,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC { } + public virtual void SetChildAgentThrottle(byte[] throttle, float factor) + { + + } + public void SetAgentThrottleSilent(int throttle, int setting) { -- cgit v1.1 From 1fb2f0296fdaff56745daa1c1e8096cd8e25462b Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 15 Aug 2015 02:46:41 +0200 Subject: Track selected objects per client --- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 0b33c51..0b4d03a 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -65,6 +65,8 @@ namespace OpenSim.Region.OptionalModules.World.NPC private readonly Scene m_scene; private readonly UUID m_ownerID; + public List SelectedObjects {get; private set;} + public NPCAvatar( string firstname, string lastname, Vector3 position, UUID ownerID, bool senseAsAgent, Scene scene) { -- cgit v1.1 From e3d82ad706db04d295a549543380b71b00848f7f Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 22 Aug 2015 04:08:30 +0100 Subject: delay terrain sending if land queue is 2 busy --- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 0b4d03a..dcd2a52 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -671,6 +671,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC } + public virtual bool CanSendLayerData() + { + return false; + } + public virtual void SendLayerData(float[] map) { } -- cgit v1.1