diff options
author | UbitUmarov | 2017-04-04 19:27:45 +0100 |
---|---|---|
committer | UbitUmarov | 2017-04-04 19:27:45 +0100 |
commit | e237e1b2fa444b0bf0077036c9436f919e344e2b (patch) | |
tree | b67615c35fe7185a1e02130f0bd1ca24045dcbda /OpenSim/Region/ScriptEngine | |
parent | mantis 8740: rename osObjectTeleport as osTeleportObject, replaced the stop ... (diff) | |
download | opensim-SC_OLD-e237e1b2fa444b0bf0077036c9436f919e344e2b.zip opensim-SC_OLD-e237e1b2fa444b0bf0077036c9436f919e344e2b.tar.gz opensim-SC_OLD-e237e1b2fa444b0bf0077036c9436f919e344e2b.tar.bz2 opensim-SC_OLD-e237e1b2fa444b0bf0077036c9436f919e344e2b.tar.xz |
add LSL_Integer osGetLinkNumber(LSL_String name). uses a cache for the string to linknumber map, cache invalidations may still be missing :(
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 9 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | 5 |
2 files changed, 14 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index b50ae28..0275cf4 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -4663,5 +4663,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4663 | sog.TeleportObject(myid, targetPos, rotation, flags); | 4663 | sog.TeleportObject(myid, targetPos, rotation, flags); |
4664 | // a delay here may break vehicles | 4664 | // a delay here may break vehicles |
4665 | } | 4665 | } |
4666 | |||
4667 | public LSL_Integer osGetLinkNumber(LSL_String name) | ||
4668 | { | ||
4669 | m_host.AddScriptLPS(1); | ||
4670 | SceneObjectGroup sog = m_host.ParentGroup; | ||
4671 | if(sog== null || sog.IsDeleted) | ||
4672 | return -1; | ||
4673 | return sog.GetLinkNumber(name); | ||
4674 | } | ||
4666 | } | 4675 | } |
4667 | } | 4676 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 3c8e02d..7c08628 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | |||
@@ -1144,5 +1144,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
1144 | { | 1144 | { |
1145 | m_OSSL_Functions.osTeleportObject(objectUUID, targetPos, targetrotation, flags); | 1145 | m_OSSL_Functions.osTeleportObject(objectUUID, targetPos, targetrotation, flags); |
1146 | } | 1146 | } |
1147 | |||
1148 | public LSL_Integer osGetLinkNumber(LSL_String name) | ||
1149 | { | ||
1150 | return m_OSSL_Functions.osGetLinkNumber(name); | ||
1151 | } | ||
1147 | } | 1152 | } |
1148 | } | 1153 | } |