diff options
author | Melanie | 2012-01-07 12:05:42 +0100 |
---|---|---|
committer | Melanie | 2012-01-07 12:05:42 +0100 |
commit | 69c0f252a4ddeb137446e7db3fc1e0f7ffed7554 (patch) | |
tree | bb55721e5fdbb90274216929fea10b74afaef9b1 /OpenSim/Region/ScriptEngine/Shared/Api | |
parent | Make sure to prefix NPC names with "NPC:" so they can't be mistaken for users (diff) | |
download | opensim-SC-69c0f252a4ddeb137446e7db3fc1e0f7ffed7554.zip opensim-SC-69c0f252a4ddeb137446e7db3fc1e0f7ffed7554.tar.gz opensim-SC-69c0f252a4ddeb137446e7db3fc1e0f7ffed7554.tar.bz2 opensim-SC-69c0f252a4ddeb137446e7db3fc1e0f7ffed7554.tar.xz |
Force the group tag of NPCs to "- NPC -" unless the name is completely blank.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 10 |
1 files changed, 9 insertions, 1 deletions
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 | |||
2100 | 2100 | ||
2101 | private LSL_Key NpcCreate(string firstname, string lastname, LSL_Vector position, string notecard, bool owned) | 2101 | private LSL_Key NpcCreate(string firstname, string lastname, LSL_Vector position, string notecard, bool owned) |
2102 | { | 2102 | { |
2103 | string groupTitle = String.Empty; | ||
2104 | |||
2103 | if (firstname != String.Empty || lastname != String.Empty) | 2105 | if (firstname != String.Empty || lastname != String.Empty) |
2104 | { | 2106 | { |
2105 | if (firstname != "Shown outfit:") | 2107 | if (firstname != "Shown outfit:") |
2106 | firstname = "NPC: " + firstname; | 2108 | groupTitle = "- NPC -"; |
2107 | } | 2109 | } |
2108 | 2110 | ||
2109 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | 2111 | INPCModule module = World.RequestModuleInterface<INPCModule>(); |
@@ -2143,6 +2145,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2143 | ownerID, | 2145 | ownerID, |
2144 | World,appearance); | 2146 | World,appearance); |
2145 | 2147 | ||
2148 | ScenePresence sp; | ||
2149 | if (World.TryGetScenePresence(x, out sp)) | ||
2150 | { | ||
2151 | sp.Grouptitle = groupTitle; | ||
2152 | sp.SendAvatarDataToAllAgents(); | ||
2153 | } | ||
2146 | return new LSL_Key(x.ToString()); | 2154 | return new LSL_Key(x.ToString()); |
2147 | } | 2155 | } |
2148 | 2156 | ||