diff options
author | Sean Dague | 2007-09-13 14:19:57 +0000 |
---|---|---|
committer | Sean Dague | 2007-09-13 14:19:57 +0000 |
commit | 23b8e39c1b8ede8b1f685adc7db2547c3b4dbc03 (patch) | |
tree | 12c6353e5ea89716bf1a409063b1e65184614ee4 /OpenSim | |
parent | If first 4 characters in script is "//C#" script will be treated as pure C# i... (diff) | |
download | opensim-SC-23b8e39c1b8ede8b1f685adc7db2547c3b4dbc03.zip opensim-SC-23b8e39c1b8ede8b1f685adc7db2547c3b4dbc03.tar.gz opensim-SC-23b8e39c1b8ede8b1f685adc7db2547c3b4dbc03.tar.bz2 opensim-SC-23b8e39c1b8ede8b1f685adc7db2547c3b4dbc03.tar.xz |
llSetPos(), llGetPos(), llGetLocalPos() now implemented
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs | 43 |
1 files changed, 39 insertions, 4 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 9b533f9..10b5181 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 | |||
@@ -238,15 +238,50 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
238 | return ""; | 238 | return ""; |
239 | } | 239 | } |
240 | 240 | ||
241 | public void llSetPos(LSL_Types.Vector3 pos) { return; } | 241 | public void llSetPos(LSL_Types.Vector3 pos) |
242 | { | ||
243 | LLVector3 tmp; | ||
244 | if (m_host.ParentID != 0) | ||
245 | { | ||
246 | tmp = m_host.OffsetPosition; | ||
247 | } | ||
248 | else | ||
249 | { | ||
250 | tmp = m_host.GroupPosition; | ||
251 | } | ||
252 | tmp.X = (float)pos.X; | ||
253 | tmp.Y = (float)pos.Y; | ||
254 | tmp.Z = (float)pos.Z; | ||
255 | if (m_host.ParentID != 0) | ||
256 | { | ||
257 | m_host.OffsetPosition = tmp; | ||
258 | } | ||
259 | else | ||
260 | { | ||
261 | m_host.GroupPosition = tmp; | ||
262 | } | ||
263 | return; | ||
264 | } | ||
242 | 265 | ||
243 | public LSL_Types.Vector3 llGetPos() | 266 | public LSL_Types.Vector3 llGetPos() |
244 | { | 267 | { |
245 | throw new NotImplementedException("llGetPos"); | 268 | return new LSL_Types.Vector3(m_host.AbsolutePosition.X, |
246 | // return m_host.AbsolutePosition; | 269 | m_host.AbsolutePosition.Y, |
270 | m_host.AbsolutePosition.Z); | ||
247 | } | 271 | } |
248 | 272 | ||
249 | public LSL_Types.Vector3 llGetLocalPos() { return new LSL_Types.Vector3(); } | 273 | public LSL_Types.Vector3 llGetLocalPos() |
274 | { | ||
275 | if (m_host.ParentID != 0) { | ||
276 | return new LSL_Types.Vector3(m_host.OffsetPosition.X, | ||
277 | m_host.OffsetPosition.Y, | ||
278 | m_host.OffsetPosition.Z); | ||
279 | } else { | ||
280 | return new LSL_Types.Vector3(m_host.AbsolutePosition.X, | ||
281 | m_host.AbsolutePosition.Y, | ||
282 | m_host.AbsolutePosition.Z); | ||
283 | } | ||
284 | } | ||
250 | public void llSetRot(LSL_Types.Quaternion rot) { } | 285 | public void llSetRot(LSL_Types.Quaternion rot) { } |
251 | public LSL_Types.Quaternion llGetRot() { return new LSL_Types.Quaternion(); } | 286 | public LSL_Types.Quaternion llGetRot() { return new LSL_Types.Quaternion(); } |
252 | public LSL_Types.Quaternion llGetLocalRot() { return new LSL_Types.Quaternion(); } | 287 | public LSL_Types.Quaternion llGetLocalRot() { return new LSL_Types.Quaternion(); } |