flagflag  If you want to see English page, please click "English" Button at Left.
1: 2010-01-11 (月) 22:53:24 iseki ソース 2: 2010-01-11 (月) 23:36:54 iseki ソース
Line 1: Line 1:
*** llSetTerrain(int x, int y, double height) [#ndfa0172] *** llSetTerrain(int x, int y, double height) [#ndfa0172]
 +- 座標 (x, y) の標高を height にする関数.
- OpenSim/Region/ScriptEngine/Shared/Api/I​mplementation/LSL_Api.cs - OpenSim/Region/ScriptEngine/Shared/Api/I​mplementation/LSL_Api.cs
       public void llSetTerrain(int x, int y, double height)        public void llSetTerrain(int x, int y, double height)
Line 5: Line 6:
           m_host.AddScriptLPS(1);            m_host.AddScriptLPS(1);
-           World.Heightmap[x, y] = height; +           //tm.SetHeightMap(x, y, height, m_host.OwnerID);    //別解 
-            ITerrainModule tm = m_ScriptEngine.World.RequestModuleInterf​ace<ITerrainModule>(); + 
-            if (tm != null) +           if (World.Permissions.CanTerraformLand(m_ho​st.OwnerID, new Vector3(x,y,0))) { 
-            +               World.Heightmap[x, y] = height; 
-                //tm.SetHeightMap(x, y, height); +                ITerrainModule tm = m_ScriptEngine.World.RequestModuleInterf​ace<ITerrainModule>(); 
-               tm.TaintTerrain();+                if (tm != null) 
 +               
 +                    tm.TaintTerrain(); 
 +               }
           }            }
       }        }
 +- OpenSim/Region/ScriptEngine/Shared/Api/I​nterface/ILSL_Api.cs
 + void llSetTerrain(int x, int y, double height);
 +- OpenSim/Region/ScriptEngine/Shared/Api/R​untime/LSL_Stub.cs
 +       public void llSetTerrain(int x, int y, double height)
 +       {
 +           m_LSL_Functions.llSetTerrain(x, y, height);
 +       }
 +
 +*** 別解:TerrainModule.cs に SetHeightMap() 関数を追加する場合 [#pc196495]
 +- OpenSim/Region/CoreModules/World/Terrain​/TerrainModule.cs
 + public void SetHeightMap(int x, int y, double height, UUID agentId)
 + {
 +     if (m_scene.Permissions.CanTerraformLand(ag​entId, new Vector3(x,y,0))) {
 +         m_channel[x, y] = height;
 +         CheckForTerrainUpdates();
 +     }
 +  }
 +- OpenSim/Region/Framework/Interfaces/ITer​rainModule.cs  (インターフェイス)
 + void SetHeightMap(int x, int y, double height, UUID agentId)


トップ   新規 ページ一覧 単語検索 最終更新   ヘルプ   最終更新のRSS 1.0 最終更新のRSS 2.0 最終更新のRSS Atom

サイト内 検索

ログイン

ユーザー名:

パスワード:


パスワード紛失
新規登録

サブ メニュー

ミニカレンダー

前月2024年 5月翌月
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
<今日>

オンライン状況

79 人のユーザが現在オンラインです。 (13 人のユーザが xpwiki を参照しています。)

登録ユーザ: 0
ゲスト: 79

もっと...

アクセスカウンタ

今日 : 3438343834383438
昨日 : 1631416314163141631416314
総計 : 2351621323516213235162132351621323516213235162132351621323516213
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com