mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
Merge branch 'master' into vehicles
This commit is contained in:
@@ -128,6 +128,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
public CommunicationsManager CommsManager;
|
||||
|
||||
protected SceneCommunicationService m_sceneGridService;
|
||||
public bool loginsdisabled = true;
|
||||
|
||||
public SceneCommunicationService SceneGridService
|
||||
{
|
||||
@@ -1062,6 +1063,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
StatsReporter.SetActiveScripts(m_sceneGraph.GetActiveScriptsCount());
|
||||
StatsReporter.addScriptLines(m_sceneGraph.GetScriptLPS());
|
||||
}
|
||||
if (loginsdisabled && (m_frame > 20))
|
||||
{
|
||||
m_log.Debug("[REGION]: Enabling Logins");
|
||||
loginsdisabled = false;
|
||||
}
|
||||
}
|
||||
catch (NotImplementedException)
|
||||
{
|
||||
@@ -1110,13 +1116,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public void AddGroupTarget(SceneObjectGroup grp)
|
||||
{
|
||||
lock(m_groupsWithTargets)
|
||||
lock (m_groupsWithTargets)
|
||||
m_groupsWithTargets[grp.UUID] = grp;
|
||||
}
|
||||
|
||||
public void RemoveGroupTarget(SceneObjectGroup grp)
|
||||
{
|
||||
lock(m_groupsWithTargets)
|
||||
lock (m_groupsWithTargets)
|
||||
m_groupsWithTargets.Remove(grp.UUID);
|
||||
}
|
||||
|
||||
@@ -3227,6 +3233,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// also return a reason.</returns>
|
||||
public bool NewUserConnection(AgentCircuitData agent, out string reason)
|
||||
{
|
||||
if (loginsdisabled)
|
||||
{
|
||||
reason = "Logins Disabled";
|
||||
return false;
|
||||
}
|
||||
// Don't disable this log message - it's too helpful
|
||||
m_log.InfoFormat(
|
||||
"[CONNECTION BEGIN]: Region {0} told of incoming {1} agent {2} {3} {4} (circuit code {5})",
|
||||
|
||||
@@ -908,6 +908,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (PhysicsActor != null)
|
||||
{
|
||||
m_physicsActor.OnRequestTerseUpdate -= SendTerseUpdateToAllClients;
|
||||
m_physicsActor.OnOutOfBounds -= OutOfBoundsCall;
|
||||
m_scene.PhysicsScene.RemoveAvatar(PhysicsActor);
|
||||
m_physicsActor.UnSubscribeEvents();
|
||||
m_physicsActor.OnCollisionUpdate -= PhysicsCollisionUpdate;
|
||||
@@ -3410,11 +3411,22 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
scene.AddPhysicsActorTaint(m_physicsActor);
|
||||
//m_physicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients;
|
||||
m_physicsActor.OnCollisionUpdate += PhysicsCollisionUpdate;
|
||||
m_physicsActor.OnOutOfBounds += OutOfBoundsCall; // Called for PhysicsActors when there's something wrong
|
||||
m_physicsActor.SubscribeEvents(500);
|
||||
m_physicsActor.LocalID = LocalId;
|
||||
|
||||
}
|
||||
|
||||
private void OutOfBoundsCall(PhysicsVector pos)
|
||||
{
|
||||
//bool flying = m_physicsActor.Flying;
|
||||
//RemoveFromPhysicalScene();
|
||||
|
||||
//AddToPhysicalScene(flying);
|
||||
if (ControllingClient != null)
|
||||
ControllingClient.SendAgentAlertMessage("Physics is having a problem with your avatar. You may not be able to move until you relog.",true);
|
||||
}
|
||||
|
||||
// Event called by the physics plugin to tell the avatar about a collision.
|
||||
private void PhysicsCollisionUpdate(EventArgs e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user