diff options
author | Melanie | 2012-08-18 13:57:50 +0100 |
---|---|---|
committer | Melanie | 2012-08-18 13:57:50 +0100 |
commit | 5d43e27de29c104c3026b3c64ac3cc684f6353f2 (patch) | |
tree | 25b2e737c25fd168eb28e9b8e082f993844329c3 /OpenSim/Region/ScriptEngine/Shared/Helpers.cs | |
parent | Merge branch 'master' into careminster (diff) | |
parent | refactoring for Vector3 operator & constructor tweaks (diff) | |
download | opensim-SC_OLD-5d43e27de29c104c3026b3c64ac3cc684f6353f2.zip opensim-SC_OLD-5d43e27de29c104c3026b3c64ac3cc684f6353f2.tar.gz opensim-SC_OLD-5d43e27de29c104c3026b3c64ac3cc684f6353f2.tar.bz2 opensim-SC_OLD-5d43e27de29c104c3026b3c64ac3cc684f6353f2.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Helpers.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Helpers.cs | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs index 9e5fb24..22804f5 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs | |||
@@ -164,11 +164,11 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
164 | else | 164 | else |
165 | { | 165 | { |
166 | // Set the values from the touch data provided by the client | 166 | // Set the values from the touch data provided by the client |
167 | touchST = new LSL_Types.Vector3(value.STCoord.X, value.STCoord.Y, value.STCoord.Z); | 167 | touchST = new LSL_Types.Vector3(value.STCoord); |
168 | touchUV = new LSL_Types.Vector3(value.UVCoord.X, value.UVCoord.Y, value.UVCoord.Z); | 168 | touchUV = new LSL_Types.Vector3(value.UVCoord); |
169 | touchNormal = new LSL_Types.Vector3(value.Normal.X, value.Normal.Y, value.Normal.Z); | 169 | touchNormal = new LSL_Types.Vector3(value.Normal); |
170 | touchBinormal = new LSL_Types.Vector3(value.Binormal.X, value.Binormal.Y, value.Binormal.Z); | 170 | touchBinormal = new LSL_Types.Vector3(value.Binormal); |
171 | touchPos = new LSL_Types.Vector3(value.Position.X, value.Position.Y, value.Position.Z); | 171 | touchPos = new LSL_Types.Vector3(value.Position); |
172 | touchFace = value.FaceIndex; | 172 | touchFace = value.FaceIndex; |
173 | } | 173 | } |
174 | } | 174 | } |
@@ -189,19 +189,13 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
189 | Country = account.UserCountry; | 189 | Country = account.UserCountry; |
190 | 190 | ||
191 | Owner = Key; | 191 | Owner = Key; |
192 | Position = new LSL_Types.Vector3( | 192 | Position = new LSL_Types.Vector3(presence.AbsolutePosition); |
193 | presence.AbsolutePosition.X, | ||
194 | presence.AbsolutePosition.Y, | ||
195 | presence.AbsolutePosition.Z); | ||
196 | Rotation = new LSL_Types.Quaternion( | 193 | Rotation = new LSL_Types.Quaternion( |
197 | presence.Rotation.X, | 194 | presence.Rotation.X, |
198 | presence.Rotation.Y, | 195 | presence.Rotation.Y, |
199 | presence.Rotation.Z, | 196 | presence.Rotation.Z, |
200 | presence.Rotation.W); | 197 | presence.Rotation.W); |
201 | Velocity = new LSL_Types.Vector3( | 198 | Velocity = new LSL_Types.Vector3(presence.Velocity); |
202 | presence.Velocity.X, | ||
203 | presence.Velocity.Y, | ||
204 | presence.Velocity.Z); | ||
205 | 199 | ||
206 | Type = 0x01; // Avatar | 200 | Type = 0x01; // Avatar |
207 | if (presence.PresenceType == PresenceType.Npc) | 201 | if (presence.PresenceType == PresenceType.Npc) |
@@ -254,16 +248,12 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
254 | } | 248 | } |
255 | } | 249 | } |
256 | 250 | ||
257 | Position = new LSL_Types.Vector3(part.AbsolutePosition.X, | 251 | Position = new LSL_Types.Vector3(part.AbsolutePosition); |
258 | part.AbsolutePosition.Y, | ||
259 | part.AbsolutePosition.Z); | ||
260 | 252 | ||
261 | Quaternion wr = part.ParentGroup.GroupRotation; | 253 | Quaternion wr = part.ParentGroup.GroupRotation; |
262 | Rotation = new LSL_Types.Quaternion(wr.X, wr.Y, wr.Z, wr.W); | 254 | Rotation = new LSL_Types.Quaternion(wr.X, wr.Y, wr.Z, wr.W); |
263 | 255 | ||
264 | Velocity = new LSL_Types.Vector3(part.Velocity.X, | 256 | Velocity = new LSL_Types.Vector3(part.Velocity); |
265 | part.Velocity.Y, | ||
266 | part.Velocity.Z); | ||
267 | } | 257 | } |
268 | } | 258 | } |
269 | 259 | ||