aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorMelanie2009-10-19 21:58:51 +0100
committerMelanie2009-10-19 21:58:51 +0100
commitffd59868f5e2d797160b1bbfc13f3b4bac717b36 (patch)
treefb807a129a6e449ac17dadce15d7b27268c92c3f /OpenSim/Region/Framework
parentMerge branch 'master' into vehicles (diff)
parentMinor formatting cleanup. (diff)
downloadopensim-SC-ffd59868f5e2d797160b1bbfc13f3b4bac717b36.zip
opensim-SC-ffd59868f5e2d797160b1bbfc13f3b4bac717b36.tar.gz
opensim-SC-ffd59868f5e2d797160b1bbfc13f3b4bac717b36.tar.bz2
opensim-SC-ffd59868f5e2d797160b1bbfc13f3b4bac717b36.tar.xz
Merge branch 'master' into vehicles
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs15
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs12
2 files changed, 25 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 4c7850f..cc74f26 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -128,6 +128,7 @@ namespace OpenSim.Region.Framework.Scenes
128 public CommunicationsManager CommsManager; 128 public CommunicationsManager CommsManager;
129 129
130 protected SceneCommunicationService m_sceneGridService; 130 protected SceneCommunicationService m_sceneGridService;
131 public bool loginsdisabled = true;
131 132
132 public SceneCommunicationService SceneGridService 133 public SceneCommunicationService SceneGridService
133 { 134 {
@@ -1062,6 +1063,11 @@ namespace OpenSim.Region.Framework.Scenes
1062 StatsReporter.SetActiveScripts(m_sceneGraph.GetActiveScriptsCount()); 1063 StatsReporter.SetActiveScripts(m_sceneGraph.GetActiveScriptsCount());
1063 StatsReporter.addScriptLines(m_sceneGraph.GetScriptLPS()); 1064 StatsReporter.addScriptLines(m_sceneGraph.GetScriptLPS());
1064 } 1065 }
1066 if (loginsdisabled && (m_frame > 20))
1067 {
1068 m_log.Debug("[REGION]: Enabling Logins");
1069 loginsdisabled = false;
1070 }
1065 } 1071 }
1066 catch (NotImplementedException) 1072 catch (NotImplementedException)
1067 { 1073 {
@@ -1110,13 +1116,13 @@ namespace OpenSim.Region.Framework.Scenes
1110 1116
1111 public void AddGroupTarget(SceneObjectGroup grp) 1117 public void AddGroupTarget(SceneObjectGroup grp)
1112 { 1118 {
1113 lock(m_groupsWithTargets) 1119 lock (m_groupsWithTargets)
1114 m_groupsWithTargets[grp.UUID] = grp; 1120 m_groupsWithTargets[grp.UUID] = grp;
1115 } 1121 }
1116 1122
1117 public void RemoveGroupTarget(SceneObjectGroup grp) 1123 public void RemoveGroupTarget(SceneObjectGroup grp)
1118 { 1124 {
1119 lock(m_groupsWithTargets) 1125 lock (m_groupsWithTargets)
1120 m_groupsWithTargets.Remove(grp.UUID); 1126 m_groupsWithTargets.Remove(grp.UUID);
1121 } 1127 }
1122 1128
@@ -3227,6 +3233,11 @@ namespace OpenSim.Region.Framework.Scenes
3227 /// also return a reason.</returns> 3233 /// also return a reason.</returns>
3228 public bool NewUserConnection(AgentCircuitData agent, out string reason) 3234 public bool NewUserConnection(AgentCircuitData agent, out string reason)
3229 { 3235 {
3236 if (loginsdisabled)
3237 {
3238 reason = "Logins Disabled";
3239 return false;
3240 }
3230 // Don't disable this log message - it's too helpful 3241 // Don't disable this log message - it's too helpful
3231 m_log.InfoFormat( 3242 m_log.InfoFormat(
3232 "[CONNECTION BEGIN]: Region {0} told of incoming {1} agent {2} {3} {4} (circuit code {5})", 3243 "[CONNECTION BEGIN]: Region {0} told of incoming {1} agent {2} {3} {4} (circuit code {5})",
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 646a483..c25fa55 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -908,6 +908,7 @@ namespace OpenSim.Region.Framework.Scenes
908 if (PhysicsActor != null) 908 if (PhysicsActor != null)
909 { 909 {
910 m_physicsActor.OnRequestTerseUpdate -= SendTerseUpdateToAllClients; 910 m_physicsActor.OnRequestTerseUpdate -= SendTerseUpdateToAllClients;
911 m_physicsActor.OnOutOfBounds -= OutOfBoundsCall;
911 m_scene.PhysicsScene.RemoveAvatar(PhysicsActor); 912 m_scene.PhysicsScene.RemoveAvatar(PhysicsActor);
912 m_physicsActor.UnSubscribeEvents(); 913 m_physicsActor.UnSubscribeEvents();
913 m_physicsActor.OnCollisionUpdate -= PhysicsCollisionUpdate; 914 m_physicsActor.OnCollisionUpdate -= PhysicsCollisionUpdate;
@@ -3410,11 +3411,22 @@ namespace OpenSim.Region.Framework.Scenes
3410 scene.AddPhysicsActorTaint(m_physicsActor); 3411 scene.AddPhysicsActorTaint(m_physicsActor);
3411 //m_physicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients; 3412 //m_physicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients;
3412 m_physicsActor.OnCollisionUpdate += PhysicsCollisionUpdate; 3413 m_physicsActor.OnCollisionUpdate += PhysicsCollisionUpdate;
3414 m_physicsActor.OnOutOfBounds += OutOfBoundsCall; // Called for PhysicsActors when there's something wrong
3413 m_physicsActor.SubscribeEvents(500); 3415 m_physicsActor.SubscribeEvents(500);
3414 m_physicsActor.LocalID = LocalId; 3416 m_physicsActor.LocalID = LocalId;
3415 3417
3416 } 3418 }
3417 3419
3420 private void OutOfBoundsCall(PhysicsVector pos)
3421 {
3422 //bool flying = m_physicsActor.Flying;
3423 //RemoveFromPhysicalScene();
3424
3425 //AddToPhysicalScene(flying);
3426 if (ControllingClient != null)
3427 ControllingClient.SendAgentAlertMessage("Physics is having a problem with your avatar. You may not be able to move until you relog.",true);
3428 }
3429
3418 // Event called by the physics plugin to tell the avatar about a collision. 3430 // Event called by the physics plugin to tell the avatar about a collision.
3419 private void PhysicsCollisionUpdate(EventArgs e) 3431 private void PhysicsCollisionUpdate(EventArgs e)
3420 { 3432 {