diff options
author | Mike Mazur | 2008-07-18 04:51:36 +0000 |
---|---|---|
committer | Mike Mazur | 2008-07-18 04:51:36 +0000 |
commit | 2558f8ac3122f2721c9f47500626f781ff548bbe (patch) | |
tree | b38ed2afbb202f164480be3a362b512d6ea8deb9 /bin/assets/ScriptsAssetSet/osWeatherMap.lsl | |
parent | masks MySQL password from console startup messages (diff) | |
download | opensim-SC_OLD-2558f8ac3122f2721c9f47500626f781ff548bbe.zip opensim-SC_OLD-2558f8ac3122f2721c9f47500626f781ff548bbe.tar.gz opensim-SC_OLD-2558f8ac3122f2721c9f47500626f781ff548bbe.tar.bz2 opensim-SC_OLD-2558f8ac3122f2721c9f47500626f781ff548bbe.tar.xz |
Make scripts LSL compliant.
Diffstat (limited to '')
-rw-r--r-- | bin/assets/ScriptsAssetSet/osWeatherMap.lsl | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/bin/assets/ScriptsAssetSet/osWeatherMap.lsl b/bin/assets/ScriptsAssetSet/osWeatherMap.lsl index 7dda87b..8fc6007 100644 --- a/bin/assets/ScriptsAssetSet/osWeatherMap.lsl +++ b/bin/assets/ScriptsAssetSet/osWeatherMap.lsl | |||
@@ -1,13 +1,30 @@ | |||
1 | default | 1 | integer count = 0; |
2 | integer refreshRate = 300; | ||
3 | string URL1 = "http://icons.wunderground.com/data/640x480/2xus_rd.gif"; | ||
4 | string URL2 = "http://icons.wunderground.com/data/640x480/2xus_sf.gif"; | ||
5 | string URL3 = "http://icons.wunderground.com/data/640x480/2xus_st.gif"; | ||
6 | string dynamicID=""; | ||
7 | string contentType="image"; | ||
8 | |||
9 | void refresh_texture() | ||
2 | { | 10 | { |
3 | integer count = 0; | 11 | count++; |
4 | integer refreshRate = 300; | 12 | string url = ""; |
5 | string URL1 = "http://icons.wunderground.com/data/640x480/2xus_rd.gif"; | 13 | integer c = count % 3; |
6 | string URL2 = "http://icons.wunderground.com/data/640x480/2xus_sf.gif"; | 14 | |
7 | string URL3 = "http://icons.wunderground.com/data/640x480/2xus_st.gif"; | 15 | if (c == 0) { |
8 | string dynamicID=""; | 16 | url = URL1; |
9 | string contentType="image"; | 17 | } else if (c == 1) { |
18 | url = URL2; | ||
19 | } else { | ||
20 | url = URL3; | ||
21 | } | ||
22 | // refresh rate is not yet respected here, which is why we need the timer | ||
23 | osSetDynamicTextureURL(dynamicID, contentType ,url , "", refreshRate ); | ||
24 | } | ||
10 | 25 | ||
26 | default | ||
27 | { | ||
11 | state_entry() | 28 | state_entry() |
12 | { | 29 | { |
13 | refresh_texture(); | 30 | refresh_texture(); |
@@ -23,21 +40,4 @@ default | |||
23 | { | 40 | { |
24 | refresh_texture(); | 41 | refresh_texture(); |
25 | } | 42 | } |
26 | |||
27 | void refresh_texture() | ||
28 | { | ||
29 | count++; | ||
30 | string url = ""; | ||
31 | integer c = count % 3; | ||
32 | |||
33 | if (c == 0) { | ||
34 | url = URL1; | ||
35 | } else if (c == 1) { | ||
36 | url = URL2; | ||
37 | } else { | ||
38 | url = URL3; | ||
39 | } | ||
40 | // refresh rate is not yet respected here, which is why we need the timer | ||
41 | osSetDynamicTextureURL(dynamicID, contentType ,url , "", refreshRate ); | ||
42 | } | ||
43 | } | 43 | } |