diff options
author | Sean Dague | 2008-07-07 20:12:14 +0000 |
---|---|---|
committer | Sean Dague | 2008-07-07 20:12:14 +0000 |
commit | 867d72c9569e672d99dc5f50aca6b1a4f2ddf906 (patch) | |
tree | c7eed9e29967623643fa63ddec600acc2948ebb4 /OpenSim/Region/Environment/Scenes | |
parent | remove build references to what I believe to be the very old MSSQL (diff) | |
download | opensim-SC-867d72c9569e672d99dc5f50aca6b1a4f2ddf906.zip opensim-SC-867d72c9569e672d99dc5f50aca6b1a4f2ddf906.tar.gz opensim-SC-867d72c9569e672d99dc5f50aca6b1a4f2ddf906.tar.bz2 opensim-SC-867d72c9569e672d99dc5f50aca6b1a4f2ddf906.tar.xz |
change SitTarget calls from functions to properties
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 56 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 12 |
2 files changed, 23 insertions, 45 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 2b40ad2..685a3d5 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -1508,28 +1508,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
1508 | return LLUUID.Zero; | 1508 | return LLUUID.Zero; |
1509 | } | 1509 | } |
1510 | 1510 | ||
1511 | public Quaternion GetSitTargetOrientation() | ||
1512 | { | ||
1513 | return m_sitTargetOrientation; | ||
1514 | } | ||
1515 | |||
1516 | public LLQuaternion GetSitTargetOrientationLL() | ||
1517 | { | ||
1518 | return | ||
1519 | new LLQuaternion(m_sitTargetOrientation.x, m_sitTargetOrientation.y, m_sitTargetOrientation.z, | ||
1520 | m_sitTargetOrientation.w); | ||
1521 | } | ||
1522 | |||
1523 | public Vector3 GetSitTargetPosition() | ||
1524 | { | ||
1525 | return m_sitTargetPosition; | ||
1526 | } | ||
1527 | |||
1528 | public LLVector3 GetSitTargetPositionLL() | ||
1529 | { | ||
1530 | return new LLVector3(m_sitTargetPosition.x, m_sitTargetPosition.y, m_sitTargetPosition.z); | ||
1531 | } | ||
1532 | |||
1533 | /// <summary> | 1511 | /// <summary> |
1534 | /// Method for a prim to get it's world position from the group. | 1512 | /// Method for a prim to get it's world position from the group. |
1535 | /// Remember, the Group Position simply gives the position of the group itself | 1513 | /// Remember, the Group Position simply gives the position of the group itself |
@@ -2382,23 +2360,23 @@ namespace OpenSim.Region.Environment.Scenes | |||
2382 | aggregateScriptEvents(); | 2360 | aggregateScriptEvents(); |
2383 | } | 2361 | } |
2384 | 2362 | ||
2385 | public void SetSitTarget(Vector3 offset, Quaternion orientation) | 2363 | // public void SetSitTarget(Vector3 offset, Quaternion orientation) |
2386 | { | 2364 | // { |
2387 | m_sitTargetPosition = offset; | 2365 | // m_sitTargetPosition = offset; |
2388 | m_sitTargetOrientation = orientation; | 2366 | // m_sitTargetOrientation = orientation; |
2389 | } | 2367 | // } |
2390 | 2368 | ||
2391 | // Utility function so the databases don't have to reference axiom.math | 2369 | // // Utility function so the databases don't have to reference axiom.math |
2392 | public void SetSitTargetLL(LLVector3 offset, LLQuaternion orientation) | 2370 | // public void SetSitTargetLL(LLVector3 offset, LLQuaternion orientation) |
2393 | { | 2371 | // { |
2394 | if ( | 2372 | // if ( |
2395 | !(offset.X == 0 && offset.Y == 0 && offset.Z == 0 && (orientation.W == 0 || orientation.W == 1) && | 2373 | // !(offset.X == 0 && offset.Y == 0 && offset.Z == 0 && (orientation.W == 0 || orientation.W == 1) && |
2396 | orientation.X == 0 && orientation.Y == 0 && orientation.Z == 0)) | 2374 | // orientation.X == 0 && orientation.Y == 0 && orientation.Z == 0)) |
2397 | { | 2375 | // { |
2398 | m_sitTargetPosition = new Vector3(offset.X, offset.Y, offset.Z); | 2376 | // m_sitTargetPosition = new Vector3(offset.X, offset.Y, offset.Z); |
2399 | m_sitTargetOrientation = new Quaternion(orientation.W, orientation.X, orientation.Y, orientation.Z); | 2377 | // m_sitTargetOrientation = new Quaternion(orientation.W, orientation.X, orientation.Y, orientation.Z); |
2400 | } | 2378 | // } |
2401 | } | 2379 | // } |
2402 | 2380 | ||
2403 | /// <summary> | 2381 | /// <summary> |
2404 | /// Set the text displayed for this part. | 2382 | /// Set the text displayed for this part. |
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 22ca159..a0a76cf 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -1096,8 +1096,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1096 | foreach (SceneObjectPart part in partArray) | 1096 | foreach (SceneObjectPart part in partArray) |
1097 | { | 1097 | { |
1098 | // Is a sit target available? | 1098 | // Is a sit target available? |
1099 | Vector3 avSitOffSet = part.GetSitTargetPosition(); | 1099 | Vector3 avSitOffSet = part.SitTargetPosition; |
1100 | Quaternion avSitOrientation = part.GetSitTargetOrientation(); | 1100 | Quaternion avSitOrientation = part.SitTargetOrientation; |
1101 | LLUUID avOnTargetAlready = part.GetAvatarOnSitTarget(); | 1101 | LLUUID avOnTargetAlready = part.GetAvatarOnSitTarget(); |
1102 | 1102 | ||
1103 | bool SitTargetUnOccupied = (!(avOnTargetAlready != LLUUID.Zero)); | 1103 | bool SitTargetUnOccupied = (!(avOnTargetAlready != LLUUID.Zero)); |
@@ -1130,8 +1130,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1130 | // see http://wiki.secondlife.com/wiki/User:Andrew_Linden/Office_Hours/2007_11_06 for details on how LL does it | 1130 | // see http://wiki.secondlife.com/wiki/User:Andrew_Linden/Office_Hours/2007_11_06 for details on how LL does it |
1131 | 1131 | ||
1132 | // Is a sit target available? | 1132 | // Is a sit target available? |
1133 | Vector3 avSitOffSet = part.GetSitTargetPosition(); | 1133 | Vector3 avSitOffSet = part.SitTargetPosition; |
1134 | Quaternion avSitOrientation = part.GetSitTargetOrientation(); | 1134 | Quaternion avSitOrientation = part.SitTargetOrientation; |
1135 | LLUUID avOnTargetAlready = part.GetAvatarOnSitTarget(); | 1135 | LLUUID avOnTargetAlready = part.GetAvatarOnSitTarget(); |
1136 | 1136 | ||
1137 | bool SitTargetUnOccupied = (!(avOnTargetAlready != LLUUID.Zero)); | 1137 | bool SitTargetUnOccupied = (!(avOnTargetAlready != LLUUID.Zero)); |
@@ -1222,8 +1222,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1222 | { | 1222 | { |
1223 | if (part.GetAvatarOnSitTarget() == UUID) | 1223 | if (part.GetAvatarOnSitTarget() == UUID) |
1224 | { | 1224 | { |
1225 | Vector3 sitTargetPos = part.GetSitTargetPosition(); | 1225 | Vector3 sitTargetPos = part.SitTargetPosition; |
1226 | Quaternion sitTargetOrient = part.GetSitTargetOrientation(); | 1226 | Quaternion sitTargetOrient = part.SitTargetOrientation; |
1227 | 1227 | ||
1228 | //Quaternion vq = new Quaternion(sitTargetPos.x, sitTargetPos.y+0.2f, sitTargetPos.z+0.2f, 0); | 1228 | //Quaternion vq = new Quaternion(sitTargetPos.x, sitTargetPos.y+0.2f, sitTargetPos.z+0.2f, 0); |
1229 | //Quaternion nq = new Quaternion(sitTargetOrient.w, -sitTargetOrient.x, -sitTargetOrient.y, -sitTargetOrient.z); | 1229 | //Quaternion nq = new Quaternion(sitTargetOrient.w, -sitTargetOrient.x, -sitTargetOrient.y, -sitTargetOrient.z); |