diff options
author | Homer Horwitz | 2009-04-04 15:43:02 +0000 |
---|---|---|
committer | Homer Horwitz | 2009-04-04 15:43:02 +0000 |
commit | 8136cf4075216d09738b8707258581e6db755759 (patch) | |
tree | 0d1a595c9301801750180624aeb04e839cf8f583 /OpenSim/Region/ScriptEngine/Shared/Api | |
parent | DST setting wasn't transferred to client, leading to wrong time display. (diff) | |
download | opensim-SC-8136cf4075216d09738b8707258581e6db755759.zip opensim-SC-8136cf4075216d09738b8707258581e6db755759.tar.gz opensim-SC-8136cf4075216d09738b8707258581e6db755759.tar.bz2 opensim-SC-8136cf4075216d09738b8707258581e6db755759.tar.xz |
Thanks jonc, for a patch that adds rendering of classic clouds.
First part of Mantis #964, the necessary clouds image will follow separately.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-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) |