From 69c0f252a4ddeb137446e7db3fc1e0f7ffed7554 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 7 Jan 2012 12:05:42 +0100 Subject: Force the group tag of NPCs to "- NPC -" unless the name is completely blank. --- .../Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 86bfbf0..28367b8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -2100,10 +2100,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api private LSL_Key NpcCreate(string firstname, string lastname, LSL_Vector position, string notecard, bool owned) { + string groupTitle = String.Empty; + if (firstname != String.Empty || lastname != String.Empty) { if (firstname != "Shown outfit:") - firstname = "NPC: " + firstname; + groupTitle = "- NPC -"; } INPCModule module = World.RequestModuleInterface(); @@ -2143,6 +2145,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api ownerID, World,appearance); + ScenePresence sp; + if (World.TryGetScenePresence(x, out sp)) + { + sp.Grouptitle = groupTitle; + sp.SendAvatarDataToAllAgents(); + } return new LSL_Key(x.ToString()); } -- cgit v1.1