diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 6 |
1 files changed, 5 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 91ac3b7..b18aa3b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -2135,11 +2135,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2135 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | 2135 | INPCModule module = World.RequestModuleInterface<INPCModule>(); |
2136 | if (module != null) | 2136 | if (module != null) |
2137 | { | 2137 | { |
2138 | ScenePresence clonePresence = World.GetScenePresence(new UUID(cloneFrom.m_string)); | ||
2139 | if (clonePresence == null) | ||
2140 | return new LSL_Key(UUID.Zero.ToString()); | ||
2141 | |||
2138 | UUID x = module.CreateNPC(firstname, | 2142 | UUID x = module.CreateNPC(firstname, |
2139 | lastname, | 2143 | lastname, |
2140 | new Vector3((float) position.x, (float) position.y, (float) position.z), | 2144 | new Vector3((float) position.x, (float) position.y, (float) position.z), |
2141 | World, | 2145 | World, |
2142 | new UUID(cloneFrom)); | 2146 | clonePresence.Appearance); |
2143 | 2147 | ||
2144 | return new LSL_Key(x.ToString()); | 2148 | return new LSL_Key(x.ToString()); |
2145 | } | 2149 | } |