aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorSean Dague2008-07-07 20:12:14 +0000
committerSean Dague2008-07-07 20:12:14 +0000
commit867d72c9569e672d99dc5f50aca6b1a4f2ddf906 (patch)
treec7eed9e29967623643fa63ddec600acc2948ebb4 /OpenSim/Region
parentremove build references to what I believe to be the very old MSSQL (diff)
downloadopensim-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 '')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs56
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs12
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs3
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs3
-rw-r--r--OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs29
5 files changed, 42 insertions, 61 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);
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 1aa7ae3..e0b6e5d 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -4494,7 +4494,8 @@ namespace OpenSim.Region.ScriptEngine.Common
4494 if (rot.s == 0 && rot.x == 0 && rot.y == 0 && rot.z == 0) 4494 if (rot.s == 0 && rot.x == 0 && rot.y == 0 && rot.z == 0)
4495 rot.z = 1; // ZERO_ROTATION = 0,0,0,1 4495 rot.z = 1; // ZERO_ROTATION = 0,0,0,1
4496 4496
4497 m_host.SetSitTarget(new Vector3((float)offset.x, (float)offset.y, (float)offset.z), new Quaternion((float)rot.s, (float)rot.x, (float)rot.y, (float)rot.z)); 4497 m_host.SitTargetPosition = new Vector3((float)offset.x, (float)offset.y, (float)offset.z);
4498 m_host.SitTargetOrientation = new Quaternion((float)rot.s, (float)rot.x, (float)rot.y, (float)rot.z);
4498 } 4499 }
4499 4500
4500 public string llAvatarOnSitTarget() 4501 public string llAvatarOnSitTarget()
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 2525de0..b89965a 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4369,7 +4369,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4369 if (rot.s == 0 && rot.x == 0 && rot.y == 0 && rot.z == 0) 4369 if (rot.s == 0 && rot.x == 0 && rot.y == 0 && rot.z == 0)
4370 rot.z = 1; // ZERO_ROTATION = 0,0,0,1 4370 rot.z = 1; // ZERO_ROTATION = 0,0,0,1
4371 4371
4372 m_host.SetSitTarget(new Vector3((float)offset.x, (float)offset.y, (float)offset.z), new Quaternion((float)rot.s, (float)rot.x, (float)rot.y, (float)rot.z)); 4372 m_host.SitTargetPosition = new Vector3((float)offset.x, (float)offset.y, (float)offset.z);
4373 m_host.SitTargetOrientation = new Quaternion((float)rot.s, (float)rot.x, (float)rot.y, (float)rot.z);
4373 } 4374 }
4374 4375
4375 public string llAvatarOnSitTarget() 4376 public string llAvatarOnSitTarget()
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs
index 8db5d7d..6dfcb3c 100644
--- a/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs
+++ b/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs
@@ -557,18 +557,19 @@ namespace OpenSim.DataStore.MSSQL
557 557
558 try 558 try
559 { 559 {
560 prim.SetSitTargetLL(new LLVector3( 560 prim.SitTargetPositionLL = new LLVector3(
561 Convert.ToSingle(row["SitTargetOffsetX"]), 561 Convert.ToSingle(row["SitTargetOffsetX"]),
562 Convert.ToSingle(row["SitTargetOffsetY"]), 562 Convert.ToSingle(row["SitTargetOffsetY"]),
563 Convert.ToSingle(row["SitTargetOffsetZ"])), new LLQuaternion( 563 Convert.ToSingle(row["SitTargetOffsetZ"]));
564 Convert.ToSingle( 564 prim.SitTargetOrientationLL = new LLQuaternion(
565 row["SitTargetOrientX"]), 565 Convert.ToSingle(
566 Convert.ToSingle( 566 row["SitTargetOrientX"]),
567 row["SitTargetOrientY"]), 567 Convert.ToSingle(
568 Convert.ToSingle( 568 row["SitTargetOrientY"]),
569 row["SitTargetOrientZ"]), 569 Convert.ToSingle(
570 Convert.ToSingle( 570 row["SitTargetOrientZ"]),
571 row["SitTargetOrientW"]))); 571 Convert.ToSingle(
572 row["SitTargetOrientW"]));
572 } 573 }
573 catch (InvalidCastException) 574 catch (InvalidCastException)
574 { 575 {
@@ -628,12 +629,12 @@ namespace OpenSim.DataStore.MSSQL
628 try 629 try
629 { 630 {
630 // Sit target 631 // Sit target
631 LLVector3 sitTargetPos = prim.GetSitTargetPositionLL(); 632 LLVector3 sitTargetPos = prim.SitTargetPositionLL;
632 row["SitTargetOffsetX"] = sitTargetPos.X; 633 row["SitTargetOffsetX"] = sitTargetPos.X;
633 row["SitTargetOffsetY"] = sitTargetPos.Y; 634 row["SitTargetOffsetY"] = sitTargetPos.Y;
634 row["SitTargetOffsetZ"] = sitTargetPos.Z; 635 row["SitTargetOffsetZ"] = sitTargetPos.Z;
635 636
636 LLQuaternion sitTargetOrient = prim.GetSitTargetOrientationLL(); 637 LLQuaternion sitTargetOrient = prim.SitTargetOrientationLL;
637 row["SitTargetOrientW"] = sitTargetOrient.W; 638 row["SitTargetOrientW"] = sitTargetOrient.W;
638 row["SitTargetOrientX"] = sitTargetOrient.X; 639 row["SitTargetOrientX"] = sitTargetOrient.X;
639 row["SitTargetOrientY"] = sitTargetOrient.Y; 640 row["SitTargetOrientY"] = sitTargetOrient.Y;