diff options
author | Sean Dague | 2007-09-13 13:06:54 +0000 |
---|---|---|
committer | Sean Dague | 2007-09-13 13:06:54 +0000 |
commit | af6c9d355da94c1547a3ea0b50e85dd21120b8f4 (patch) | |
tree | 68df3db68493ef33faa1fa49f9faee21e0ba1728 /OpenSim | |
parent | remove ^M, as native storage should be UNIX format, and ^M in/out mashing (diff) | |
download | opensim-SC_OLD-af6c9d355da94c1547a3ea0b50e85dd21120b8f4.zip opensim-SC_OLD-af6c9d355da94c1547a3ea0b50e85dd21120b8f4.tar.gz opensim-SC_OLD-af6c9d355da94c1547a3ea0b50e85dd21120b8f4.tar.bz2 opensim-SC_OLD-af6c9d355da94c1547a3ea0b50e85dd21120b8f4.tar.xz |
implement llGetScale and llSetScale
drop IScriptHost for now and just use SceneObjectPart, given how many of
SceneObjectPart's properties we need for the script engine
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs | 22 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs | 2 |
2 files changed, 19 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs index c98da48..9b533f9 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs | |||
@@ -22,11 +22,11 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
22 | 22 | ||
23 | private System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding(); | 23 | private System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding(); |
24 | private ScriptEngine m_ScriptEngine; | 24 | private ScriptEngine m_ScriptEngine; |
25 | private IScriptHost m_host; | 25 | private SceneObjectPart m_host; |
26 | private uint m_localID; | 26 | private uint m_localID; |
27 | private LLUUID m_itemID; | 27 | private LLUUID m_itemID; |
28 | 28 | ||
29 | public LSL_BuiltIn_Commands(ScriptEngine ScriptEngine, IScriptHost host, uint localID, LLUUID itemID) | 29 | public LSL_BuiltIn_Commands(ScriptEngine ScriptEngine, SceneObjectPart host, uint localID, LLUUID itemID) |
30 | { | 30 | { |
31 | m_ScriptEngine = ScriptEngine; | 31 | m_ScriptEngine = ScriptEngine; |
32 | m_host = host; | 32 | m_host = host; |
@@ -208,8 +208,22 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
208 | public LSL_Types.Vector3 llWind(LSL_Types.Vector3 offset) { return new LSL_Types.Vector3(); } | 208 | public LSL_Types.Vector3 llWind(LSL_Types.Vector3 offset) { return new LSL_Types.Vector3(); } |
209 | public void llSetStatus(int status, int value) { return; } | 209 | public void llSetStatus(int status, int value) { return; } |
210 | public int llGetStatus(int status) { return 0; } | 210 | public int llGetStatus(int status) { return 0; } |
211 | public void llSetScale(LSL_Types.Vector3 scale) { return; } | 211 | |
212 | public LSL_Types.Vector3 llGetScale() { return new LSL_Types.Vector3(); } | 212 | public void llSetScale(LSL_Types.Vector3 scale) |
213 | { | ||
214 | // TODO: this needs to trigger a persistance save as well | ||
215 | LLVector3 tmp = m_host.Scale; | ||
216 | tmp.X = (float)scale.X; | ||
217 | tmp.Y = (float)scale.Y; | ||
218 | tmp.Z = (float)scale.Z; | ||
219 | m_host.Scale = tmp; | ||
220 | return; | ||
221 | } | ||
222 | public LSL_Types.Vector3 llGetScale() | ||
223 | { | ||
224 | return new LSL_Types.Vector3(m_host.Scale.X, m_host.Scale.Y, m_host.Scale.Z); | ||
225 | } | ||
226 | |||
213 | public void llSetColor(LSL_Types.Vector3 color, int face) { return; } | 227 | public void llSetColor(LSL_Types.Vector3 color, int face) { return; } |
214 | public double llGetAlpha(int face) { return 0; } | 228 | public double llGetAlpha(int face) { return 0; } |
215 | public void llSetAlpha(double alpha, int face) { return; } | 229 | public void llSetAlpha(double alpha, int face) { return; } |
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs index ec50b93..f731cb4 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs | |||
@@ -257,7 +257,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
257 | // It will be up to the script itself to hook up the correct events. | 257 | // It will be up to the script itself to hook up the correct events. |
258 | string FileName = ""; | 258 | string FileName = ""; |
259 | 259 | ||
260 | IScriptHost m_host = World.GetSceneObjectPart(localID); | 260 | SceneObjectPart m_host = World.GetSceneObjectPart(localID); |
261 | 261 | ||
262 | try | 262 | try |
263 | { | 263 | { |