diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index edaa3e9..bcbfe96 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -1027,7 +1027,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1027 | public LSL_Float llCloud(LSL_Vector offset) | 1027 | public LSL_Float llCloud(LSL_Vector offset) |
1028 | { | 1028 | { |
1029 | m_host.AddScriptLPS(1); | 1029 | m_host.AddScriptLPS(1); |
1030 | return 0; | 1030 | float cloudCover = 0f; |
1031 | ICloudModule module = World.RequestModuleInterface<ICloudModule>(); | ||
1032 | if (module != null) | ||
1033 | { | ||
1034 | Vector3 pos = m_host.GetWorldPosition(); | ||
1035 | int x = (int)(pos.X + offset.x); | ||
1036 | int y = (int)(pos.Y + offset.y); | ||
1037 | |||
1038 | cloudCover = module.CloudCover(x, y, 0); | ||
1039 | |||
1040 | } | ||
1041 | return cloudCover; | ||
1031 | } | 1042 | } |
1032 | 1043 | ||
1033 | public LSL_Vector llWind(LSL_Vector offset) | 1044 | public LSL_Vector llWind(LSL_Vector offset) |