Force the group tag of NPCs to "- NPC -" unless the name is completely blank.

avinationmerge
Melanie 2012-01-07 12:05:42 +01:00
parent 38ae479249
commit 69c0f252a4
1 changed files with 9 additions and 1 deletions

View File

@ -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) 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 != String.Empty || lastname != String.Empty)
{ {
if (firstname != "Shown outfit:") if (firstname != "Shown outfit:")
firstname = "NPC: " + firstname; groupTitle = "- NPC -";
} }
INPCModule module = World.RequestModuleInterface<INPCModule>(); INPCModule module = World.RequestModuleInterface<INPCModule>();
@ -2143,6 +2145,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
ownerID, ownerID,
World,appearance); World,appearance);
ScenePresence sp;
if (World.TryGetScenePresence(x, out sp))
{
sp.Grouptitle = groupTitle;
sp.SendAvatarDataToAllAgents();
}
return new LSL_Key(x.ToString()); return new LSL_Key(x.ToString());
} }