clockwerk-opensim-config – Blame information for rev 9

Subversion Repositories:
Rev:
Rev Author Line No. Line
9 vero 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 refresh_texture()
10 {
11 count++;
12 string url = "";
13 integer c = count % 3;
14  
15 if (c == 0) {
16 url = URL1;
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 }
25  
26 default
27 {
28 state_entry()
29 {
30 refresh_texture();
31 llSetTimerEvent(refreshRate); // create a "timer event" every 300 seconds.
32 }
33  
34 timer()
35 {
36 refresh_texture();
37 }
38  
39 touch_start(integer times)
40 {
41 refresh_texture();
42 }
43 }