aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authorJeff Ames2008-06-13 00:21:53 +0000
committerJeff Ames2008-06-13 00:21:53 +0000
commit64f01ade04863dbe7b392ea8f0fc4dcc8e32bd94 (patch)
tree74c4e8fdc25dc28da7c63cbc9d97141c0f344938 /OpenSim/Region/Environment/Scenes/ScenePresence.cs
parentlook mom, migrations in action. This adds a couple of indexes (diff)
downloadopensim-SC-64f01ade04863dbe7b392ea8f0fc4dcc8e32bd94.zip
opensim-SC-64f01ade04863dbe7b392ea8f0fc4dcc8e32bd94.tar.gz
opensim-SC-64f01ade04863dbe7b392ea8f0fc4dcc8e32bd94.tar.bz2
opensim-SC-64f01ade04863dbe7b392ea8f0fc4dcc8e32bd94.tar.xz
Update svn properties, clean up formatting, refactor out duplicate hard-coded port numbers.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs25
1 files changed, 9 insertions, 16 deletions
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 2774a45..f6dc8a2 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -418,7 +418,7 @@ namespace OpenSim.Region.Environment.Scenes
418 RegisterToEvents(); 418 RegisterToEvents();
419 SetDirectionVectors(); 419 SetDirectionVectors();
420 420
421 421
422 } 422 }
423 423
424 public ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo, byte[] visualParams, 424 public ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo, byte[] visualParams,
@@ -481,8 +481,6 @@ namespace OpenSim.Region.Environment.Scenes
481 // } 481 // }
482 } 482 }
483 483
484
485
486 public uint GenerateClientFlags(LLUUID ObjectID) 484 public uint GenerateClientFlags(LLUUID ObjectID)
487 { 485 {
488 return m_scene.ExternalChecks.ExternalChecksGenerateClientFlags(m_uuid, ObjectID); 486 return m_scene.ExternalChecks.ExternalChecksGenerateClientFlags(m_uuid, ObjectID);
@@ -590,27 +588,27 @@ namespace OpenSim.Region.Environment.Scenes
590// m_log.DebugFormat( 588// m_log.DebugFormat(
591// "[SCENE PRESENCE]: Upgrading child agent {0}, {1} to a root agent in {2} at pos {3}", 589// "[SCENE PRESENCE]: Upgrading child agent {0}, {1} to a root agent in {2} at pos {3}",
592// Name, UUID, m_scene.RegionInfo.RegionName, pos); 590// Name, UUID, m_scene.RegionInfo.RegionName, pos);
593 591
594 if (pos.X < 0 || pos.X > Constants.RegionSize || pos.Y < 0 || pos.Y > Constants.RegionSize || pos.Z < 0) 592 if (pos.X < 0 || pos.X > Constants.RegionSize || pos.Y < 0 || pos.Y > Constants.RegionSize || pos.Z < 0)
595 { 593 {
596 LLVector3 emergencyPos = new LLVector3(128, 128, 128); 594 LLVector3 emergencyPos = new LLVector3(128, 128, 128);
597 595
598 m_log.WarnFormat( 596 m_log.WarnFormat(
599 "[SCENE PRESENCE]: MakeRootAgent() was given an illegal position of {0} for avatar {1}, {2}. Substituting {3}", 597 "[SCENE PRESENCE]: MakeRootAgent() was given an illegal position of {0} for avatar {1}, {2}. Substituting {3}",
600 pos, Name, UUID, emergencyPos); 598 pos, Name, UUID, emergencyPos);
601 599
602 pos = emergencyPos; 600 pos = emergencyPos;
603 } 601 }
604 602
605 m_isChildAgent = false; 603 m_isChildAgent = false;
606 604
607 float localAVHeight = 1.56f; 605 float localAVHeight = 1.56f;
608 if (m_avHeight != 127.0f) 606 if (m_avHeight != 127.0f)
609 { 607 {
610 localAVHeight = m_avHeight; 608 localAVHeight = m_avHeight;
611 } 609 }
612 610
613 float posZLimit = (float)m_scene.GetLandHeight((int)pos.X, (int)pos.Y); 611 float posZLimit = (float)m_scene.GetLandHeight((int)pos.X, (int)pos.Y);
614 float newPosZ = posZLimit + localAVHeight; 612 float newPosZ = posZLimit + localAVHeight;
615 if (posZLimit >= (pos.Z - (localAVHeight / 2)) && !(Single.IsInfinity(newPosZ) || Single.IsNaN(newPosZ))) 613 if (posZLimit >= (pos.Z - (localAVHeight / 2)) && !(Single.IsInfinity(newPosZ) || Single.IsNaN(newPosZ)))
616 { 614 {
@@ -789,7 +787,7 @@ namespace OpenSim.Region.Environment.Scenes
789 // Must check for standing up even when PhysicsActor is null, 787 // Must check for standing up even when PhysicsActor is null,
790 // since sitting currently removes avatar from physical scene 788 // since sitting currently removes avatar from physical scene
791 //m_log.Debug("agentPos:" + AbsolutePosition.ToString()); 789 //m_log.Debug("agentPos:" + AbsolutePosition.ToString());
792 790
793 // This is irritating. Really. 791 // This is irritating. Really.
794 if (!AbsolutePosition.IsFinite()) 792 if (!AbsolutePosition.IsFinite())
795 { 793 {
@@ -969,8 +967,6 @@ namespace OpenSim.Region.Environment.Scenes
969 } 967 }
970 } 968 }
971 969
972
973
974 m_scene.EventManager.TriggerOnClientMovement(this); 970 m_scene.EventManager.TriggerOnClientMovement(this);
975 971
976 m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS); 972 m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS);
@@ -1006,7 +1002,6 @@ namespace OpenSim.Region.Environment.Scenes
1006 //m_log.Debug("[AUTOPILOT]: " + Util.GetDistanceTo(AbsolutePosition, m_autoPilotTarget).ToString()); 1002 //m_log.Debug("[AUTOPILOT]: " + Util.GetDistanceTo(AbsolutePosition, m_autoPilotTarget).ToString());
1007 if (Util.GetDistanceTo(AbsolutePosition, m_autoPilotTarget) <= 1.5) 1003 if (Util.GetDistanceTo(AbsolutePosition, m_autoPilotTarget) <= 1.5)
1008 { 1004 {
1009
1010 if (m_sitAtAutoTarget) 1005 if (m_sitAtAutoTarget)
1011 { 1006 {
1012 SceneObjectPart part = m_scene.GetSceneObjectPart(m_requestedSitTargetUUID); 1007 SceneObjectPart part = m_scene.GetSceneObjectPart(m_requestedSitTargetUUID);
@@ -2140,7 +2135,6 @@ namespace OpenSim.Region.Environment.Scenes
2140 m_log.Info("[CLIENT]: Couldn't save attachments. :("); 2135 m_log.Info("[CLIENT]: Couldn't save attachments. :(");
2141 } 2136 }
2142 m_attachments.Clear(); 2137 m_attachments.Clear();
2143
2144 } 2138 }
2145 } 2139 }
2146 lock (m_knownPrimUUID) 2140 lock (m_knownPrimUUID)
@@ -2204,7 +2198,6 @@ namespace OpenSim.Region.Environment.Scenes
2204 m_attachmentsTransported = true; 2198 m_attachmentsTransported = true;
2205 lock (m_attachments) 2199 lock (m_attachments)
2206 { 2200 {
2207
2208 foreach (SceneObjectGroup gobj in m_attachments) 2201 foreach (SceneObjectGroup gobj in m_attachments)
2209 { 2202 {
2210 // If the prim group is null then something must have happened to it! 2203 // If the prim group is null then something must have happened to it!