Merge branch 'master' into careminster
commit
759f1d2dbe
|
@ -80,6 +80,7 @@ what it is today.
|
||||||
* dmiles (Daxtron Labs)
|
* dmiles (Daxtron Labs)
|
||||||
* dslake (Intel)
|
* dslake (Intel)
|
||||||
* FredoChaplin
|
* FredoChaplin
|
||||||
|
* Garmin Kawaguichi
|
||||||
* Gerhard
|
* Gerhard
|
||||||
* Godfrey
|
* Godfrey
|
||||||
* Grumly57
|
* Grumly57
|
||||||
|
|
|
@ -34,6 +34,7 @@ namespace OpenSim.Framework
|
||||||
string Name { get; set; }
|
string Name { get; set; }
|
||||||
UUID UUID { get; }
|
UUID UUID { get; }
|
||||||
uint LocalId { get; }
|
uint LocalId { get; }
|
||||||
|
|
||||||
Vector3 AbsolutePosition { get; }
|
Vector3 AbsolutePosition { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,12 @@ namespace OpenSim.Framework
|
||||||
public interface ISceneObject
|
public interface ISceneObject
|
||||||
{
|
{
|
||||||
UUID UUID { get; }
|
UUID UUID { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The owner of this object.
|
||||||
|
/// </summary>
|
||||||
|
UUID OwnerID { get; set; }
|
||||||
|
|
||||||
ISceneObject CloneForNewScene();
|
ISceneObject CloneForNewScene();
|
||||||
string ToXml2();
|
string ToXml2();
|
||||||
string ExtraToXmlString();
|
string ExtraToXmlString();
|
||||||
|
|
|
@ -188,6 +188,18 @@ namespace OpenSim
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Hook up to the watchdog timer
|
||||||
|
Watchdog.OnWatchdogTimeout += WatchdogTimeoutHandler;
|
||||||
|
|
||||||
|
PrintFileToConsole("startuplogo.txt");
|
||||||
|
|
||||||
|
// For now, start at the 'root' level by default
|
||||||
|
if (m_sceneManager.Scenes.Count == 1) // If there is only one region, select it
|
||||||
|
ChangeSelectedRegion("region",
|
||||||
|
new string[] {"change", "region", m_sceneManager.Scenes[0].RegionInfo.RegionName});
|
||||||
|
else
|
||||||
|
ChangeSelectedRegion("region", new string[] {"change", "region", "root"});
|
||||||
|
|
||||||
//Run Startup Commands
|
//Run Startup Commands
|
||||||
if (String.IsNullOrEmpty(m_startupCommandsFile))
|
if (String.IsNullOrEmpty(m_startupCommandsFile))
|
||||||
{
|
{
|
||||||
|
@ -206,18 +218,6 @@ namespace OpenSim
|
||||||
m_scriptTimer.Interval = 1200*1000;
|
m_scriptTimer.Interval = 1200*1000;
|
||||||
m_scriptTimer.Elapsed += RunAutoTimerScript;
|
m_scriptTimer.Elapsed += RunAutoTimerScript;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hook up to the watchdog timer
|
|
||||||
Watchdog.OnWatchdogTimeout += WatchdogTimeoutHandler;
|
|
||||||
|
|
||||||
PrintFileToConsole("startuplogo.txt");
|
|
||||||
|
|
||||||
// For now, start at the 'root' level by default
|
|
||||||
if (m_sceneManager.Scenes.Count == 1) // If there is only one region, select it
|
|
||||||
ChangeSelectedRegion("region",
|
|
||||||
new string[] {"change", "region", m_sceneManager.Scenes[0].RegionInfo.RegionName});
|
|
||||||
else
|
|
||||||
ChangeSelectedRegion("region", new string[] {"change", "region", "root"});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -796,6 +796,7 @@ namespace OpenSim
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "backup":
|
case "backup":
|
||||||
|
MainConsole.Instance.Output("Triggering save of pending object updates to persistent store");
|
||||||
m_sceneManager.BackupCurrentScene();
|
m_sceneManager.BackupCurrentScene();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -806,7 +807,7 @@ namespace OpenSim
|
||||||
if (m_sceneManager.TryGetScene(regRemoveName, out removeScene))
|
if (m_sceneManager.TryGetScene(regRemoveName, out removeScene))
|
||||||
RemoveRegion(removeScene, false);
|
RemoveRegion(removeScene, false);
|
||||||
else
|
else
|
||||||
MainConsole.Instance.Output("no region with that name");
|
MainConsole.Instance.Output("No region with that name");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "delete-region":
|
case "delete-region":
|
||||||
|
|
|
@ -10464,6 +10464,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool HandleGroupRoleMembersRequest(IClientAPI sender, Packet Pack)
|
private bool HandleGroupRoleMembersRequest(IClientAPI sender, Packet Pack)
|
||||||
{
|
{
|
||||||
GroupRoleMembersRequestPacket groupRoleMembersRequest =
|
GroupRoleMembersRequestPacket groupRoleMembersRequest =
|
||||||
|
|
|
@ -1236,7 +1236,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
AgentCircuitData agent = sp.ControllingClient.RequestClientInfo();
|
AgentCircuitData agent = sp.ControllingClient.RequestClientInfo();
|
||||||
agent.BaseFolder = UUID.Zero;
|
agent.BaseFolder = UUID.Zero;
|
||||||
agent.InventoryFolder = UUID.Zero;
|
agent.InventoryFolder = UUID.Zero;
|
||||||
agent.startpos = new Vector3(128, 128, 70);
|
agent.startpos = sp.AbsolutePosition + CalculateOffset(sp, neighbour);
|
||||||
agent.child = true;
|
agent.child = true;
|
||||||
agent.Appearance = sp.Appearance;
|
agent.Appearance = sp.Appearance;
|
||||||
if (currentAgentCircuit != null)
|
if (currentAgentCircuit != null)
|
||||||
|
@ -1329,6 +1329,17 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Vector3 CalculateOffset(ScenePresence sp, GridRegion neighbour)
|
||||||
|
{
|
||||||
|
int rRegionX = (int)sp.Scene.RegionInfo.RegionLocX;
|
||||||
|
int rRegionY = (int)sp.Scene.RegionInfo.RegionLocY;
|
||||||
|
int tRegionX = neighbour.RegionLocX / (int)Constants.RegionSize;
|
||||||
|
int tRegionY = neighbour.RegionLocY / (int)Constants.RegionSize;
|
||||||
|
int shiftx = (rRegionX - tRegionX) * (int)Constants.RegionSize;
|
||||||
|
int shifty = (rRegionY - tRegionY) * (int)Constants.RegionSize;
|
||||||
|
return new Vector3(shiftx, shifty, 0f);
|
||||||
|
}
|
||||||
|
|
||||||
private void InformClientOfNeighbourCompleted(IAsyncResult iar)
|
private void InformClientOfNeighbourCompleted(IAsyncResult iar)
|
||||||
{
|
{
|
||||||
InformClientOfNeighbourDelegate icon = (InformClientOfNeighbourDelegate)iar.AsyncState;
|
InformClientOfNeighbourDelegate icon = (InformClientOfNeighbourDelegate)iar.AsyncState;
|
||||||
|
|
|
@ -123,7 +123,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Destination region {0} is hyperlink", region.RegionID);
|
m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Destination region {0} is hyperlink", region.RegionID);
|
||||||
GridRegion real_destination = m_GatekeeperConnector.GetHyperlinkRegion(region, region.RegionID);
|
GridRegion real_destination = m_GatekeeperConnector.GetHyperlinkRegion(region, region.RegionID);
|
||||||
m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: GetFinalDestination serveruri -> {0}", real_destination.ServerURI);
|
if (real_destination != null)
|
||||||
|
m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: GetFinalDestination serveruri -> {0}", real_destination.ServerURI);
|
||||||
|
else
|
||||||
|
m_log.WarnFormat("[HG ENTITY TRANSFER MODULE]: GetHyperlinkRegion to Gatekeeper {0} failed", region.ServerURI);
|
||||||
return real_destination;
|
return real_destination;
|
||||||
}
|
}
|
||||||
return region;
|
return region;
|
||||||
|
|
|
@ -384,9 +384,15 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
if (m_debugPermissions)
|
if (m_debugPermissions)
|
||||||
m_log.Debug("[PERMISSIONS]: " + permissionCalled + " was called from " + m_scene.RegionInfo.RegionName);
|
m_log.Debug("[PERMISSIONS]: " + permissionCalled + " was called from " + m_scene.RegionInfo.RegionName);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Checks if the given group is active and if the user is a group member
|
/// <summary>
|
||||||
// with the powers requested (powers = 0 for no powers check)
|
/// Checks if the given group is active and if the user is a group member
|
||||||
|
/// with the powers requested (powers = 0 for no powers check)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="groupID"></param>
|
||||||
|
/// <param name="userID"></param>
|
||||||
|
/// <param name="powers"></param>
|
||||||
|
/// <returns></returns>
|
||||||
protected bool IsGroupMember(UUID groupID, UUID userID, ulong powers)
|
protected bool IsGroupMember(UUID groupID, UUID userID, ulong powers)
|
||||||
{
|
{
|
||||||
if (null == m_groupsModule)
|
if (null == m_groupsModule)
|
||||||
|
|
|
@ -1588,6 +1588,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public void TriggerRequestChangeWaterHeight(float height)
|
public void TriggerRequestChangeWaterHeight(float height)
|
||||||
{
|
{
|
||||||
|
if (height < 0)
|
||||||
|
{
|
||||||
|
// ignore negative water height
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
RequestChangeWaterHeight handlerRequestChangeWaterHeight = OnRequestChangeWaterHeight;
|
RequestChangeWaterHeight handlerRequestChangeWaterHeight = OnRequestChangeWaterHeight;
|
||||||
if (handlerRequestChangeWaterHeight != null)
|
if (handlerRequestChangeWaterHeight != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -116,18 +116,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// <param name="remoteClient"></param>
|
/// <param name="remoteClient"></param>
|
||||||
public void RequestPrim(uint primLocalID, IClientAPI remoteClient)
|
public void RequestPrim(uint primLocalID, IClientAPI remoteClient)
|
||||||
{
|
{
|
||||||
EntityBase[] entityList = GetEntities();
|
SceneObjectGroup sog = GetGroupByPrim(primLocalID);
|
||||||
foreach (EntityBase ent in entityList)
|
|
||||||
{
|
if (sog != null)
|
||||||
if (ent is SceneObjectGroup)
|
sog.SendFullUpdateToClient(remoteClient);
|
||||||
{
|
|
||||||
if (((SceneObjectGroup)ent).LocalId == primLocalID)
|
|
||||||
{
|
|
||||||
((SceneObjectGroup)ent).SendFullUpdateToClient(remoteClient);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -137,47 +129,28 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// <param name="remoteClient"></param>
|
/// <param name="remoteClient"></param>
|
||||||
public void SelectPrim(uint primLocalID, IClientAPI remoteClient)
|
public void SelectPrim(uint primLocalID, IClientAPI remoteClient)
|
||||||
{
|
{
|
||||||
EntityBase[] entityList = GetEntities();
|
SceneObjectPart part = GetSceneObjectPart(primLocalID);
|
||||||
foreach (EntityBase ent in entityList)
|
|
||||||
{
|
|
||||||
if (ent is SceneObjectGroup)
|
|
||||||
{
|
|
||||||
if (((SceneObjectGroup) ent).LocalId == primLocalID)
|
|
||||||
{
|
|
||||||
((SceneObjectGroup) ent).SendPropertiesToClient(remoteClient);
|
|
||||||
((SceneObjectGroup) ent).IsSelected = true;
|
|
||||||
// A prim is only tainted if it's allowed to be edited by the person clicking it.
|
|
||||||
if (Permissions.CanEditObject(((SceneObjectGroup)ent).UUID, remoteClient.AgentId)
|
|
||||||
|| Permissions.CanMoveObject(((SceneObjectGroup)ent).UUID, remoteClient.AgentId))
|
|
||||||
{
|
|
||||||
EventManager.TriggerParcelPrimCountTainted();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// We also need to check the children of this prim as they
|
|
||||||
// can be selected as well and send property information
|
|
||||||
bool foundPrim = false;
|
|
||||||
|
|
||||||
SceneObjectGroup sog = ent as SceneObjectGroup;
|
|
||||||
|
|
||||||
SceneObjectPart[] partList = sog.Parts;
|
if (null == part)
|
||||||
foreach (SceneObjectPart part in partList)
|
return;
|
||||||
{
|
|
||||||
if (part.LocalId == primLocalID)
|
if (part.IsRoot)
|
||||||
{
|
{
|
||||||
part.SendPropertiesToClient(remoteClient);
|
SceneObjectGroup sog = part.ParentGroup;
|
||||||
foundPrim = true;
|
sog.SendPropertiesToClient(remoteClient);
|
||||||
break;
|
sog.IsSelected = true;
|
||||||
}
|
|
||||||
}
|
// A prim is only tainted if it's allowed to be edited by the person clicking it.
|
||||||
|
if (Permissions.CanEditObject(sog.UUID, remoteClient.AgentId)
|
||||||
if (foundPrim)
|
|| Permissions.CanMoveObject(sog.UUID, remoteClient.AgentId))
|
||||||
break;
|
{
|
||||||
}
|
EventManager.TriggerParcelPrimCountTainted();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
part.SendPropertiesToClient(remoteClient);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -250,121 +223,81 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public virtual void ProcessObjectGrab(uint localID, Vector3 offsetPos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs)
|
public virtual void ProcessObjectGrab(uint localID, Vector3 offsetPos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs)
|
||||||
{
|
{
|
||||||
EntityBase[] EntityList = GetEntities();
|
SceneObjectPart part = GetSceneObjectPart(localID);
|
||||||
|
|
||||||
|
if (part == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
SceneObjectGroup obj = part.ParentGroup;
|
||||||
|
|
||||||
SurfaceTouchEventArgs surfaceArg = null;
|
SurfaceTouchEventArgs surfaceArg = null;
|
||||||
if (surfaceArgs != null && surfaceArgs.Count > 0)
|
if (surfaceArgs != null && surfaceArgs.Count > 0)
|
||||||
surfaceArg = surfaceArgs[0];
|
surfaceArg = surfaceArgs[0];
|
||||||
|
|
||||||
foreach (EntityBase ent in EntityList)
|
// Currently only grab/touch for the single prim
|
||||||
|
// the client handles rez correctly
|
||||||
|
obj.ObjectGrabHandler(localID, offsetPos, remoteClient);
|
||||||
|
|
||||||
|
// If the touched prim handles touches, deliver it
|
||||||
|
// If not, deliver to root prim
|
||||||
|
if ((part.ScriptEvents & scriptEvents.touch_start) != 0)
|
||||||
|
EventManager.TriggerObjectGrab(part.LocalId, 0, part.OffsetPosition, remoteClient, surfaceArg);
|
||||||
|
|
||||||
|
// Deliver to the root prim if the touched prim doesn't handle touches
|
||||||
|
// or if we're meant to pass on touches anyway. Don't send to root prim
|
||||||
|
// if prim touched is the root prim as we just did it
|
||||||
|
if (((part.ScriptEvents & scriptEvents.touch_start) == 0) ||
|
||||||
|
(part.PassTouches && (part.LocalId != obj.RootPart.LocalId)))
|
||||||
{
|
{
|
||||||
if (ent is SceneObjectGroup)
|
EventManager.TriggerObjectGrab(obj.RootPart.LocalId, part.LocalId, part.OffsetPosition, remoteClient, surfaceArg);
|
||||||
{
|
|
||||||
SceneObjectGroup obj = ent as SceneObjectGroup;
|
|
||||||
if (obj != null)
|
|
||||||
{
|
|
||||||
// Is this prim part of the group
|
|
||||||
if (obj.HasChildPrim(localID))
|
|
||||||
{
|
|
||||||
// Currently only grab/touch for the single prim
|
|
||||||
// the client handles rez correctly
|
|
||||||
obj.ObjectGrabHandler(localID, offsetPos, remoteClient);
|
|
||||||
|
|
||||||
SceneObjectPart part = obj.GetChildPart(localID);
|
|
||||||
|
|
||||||
// If the touched prim handles touches, deliver it
|
|
||||||
// If not, deliver to root prim
|
|
||||||
if ((part.ScriptEvents & scriptEvents.touch_start) != 0)
|
|
||||||
EventManager.TriggerObjectGrab(part.LocalId, 0, part.OffsetPosition, remoteClient, surfaceArg);
|
|
||||||
// Deliver to the root prim if the touched prim doesn't handle touches
|
|
||||||
// or if we're meant to pass on touches anyway. Don't send to root prim
|
|
||||||
// if prim touched is the root prim as we just did it
|
|
||||||
if (((part.ScriptEvents & scriptEvents.touch_start) == 0) ||
|
|
||||||
(part.PassTouches && (part.LocalId != obj.RootPart.LocalId)))
|
|
||||||
{
|
|
||||||
EventManager.TriggerObjectGrab(obj.RootPart.LocalId, part.LocalId, part.OffsetPosition, remoteClient, surfaceArg);
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void ProcessObjectGrabUpdate(UUID objectID, Vector3 offset, Vector3 pos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs)
|
public virtual void ProcessObjectGrabUpdate(
|
||||||
|
UUID objectID, Vector3 offset, Vector3 pos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs)
|
||||||
{
|
{
|
||||||
EntityBase[] EntityList = GetEntities();
|
SceneObjectPart part = GetSceneObjectPart(objectID);
|
||||||
|
if (part == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
SceneObjectGroup obj = part.ParentGroup;
|
||||||
|
|
||||||
SurfaceTouchEventArgs surfaceArg = null;
|
SurfaceTouchEventArgs surfaceArg = null;
|
||||||
if (surfaceArgs != null && surfaceArgs.Count > 0)
|
if (surfaceArgs != null && surfaceArgs.Count > 0)
|
||||||
surfaceArg = surfaceArgs[0];
|
surfaceArg = surfaceArgs[0];
|
||||||
|
|
||||||
foreach (EntityBase ent in EntityList)
|
// If the touched prim handles touches, deliver it
|
||||||
|
// If not, deliver to root prim
|
||||||
|
if ((part.ScriptEvents & scriptEvents.touch) != 0)
|
||||||
|
EventManager.TriggerObjectGrabbing(part.LocalId, 0, part.OffsetPosition, remoteClient, surfaceArg);
|
||||||
|
// Deliver to the root prim if the touched prim doesn't handle touches
|
||||||
|
// or if we're meant to pass on touches anyway. Don't send to root prim
|
||||||
|
// if prim touched is the root prim as we just did it
|
||||||
|
if (((part.ScriptEvents & scriptEvents.touch) == 0) ||
|
||||||
|
(part.PassTouches && (part.LocalId != obj.RootPart.LocalId)))
|
||||||
{
|
{
|
||||||
if (ent is SceneObjectGroup)
|
EventManager.TriggerObjectGrabbing(obj.RootPart.LocalId, part.LocalId, part.OffsetPosition, remoteClient, surfaceArg);
|
||||||
{
|
|
||||||
SceneObjectGroup obj = ent as SceneObjectGroup;
|
|
||||||
if (obj != null)
|
|
||||||
{
|
|
||||||
// Is this prim part of the group
|
|
||||||
if (obj.HasChildPrim(objectID))
|
|
||||||
{
|
|
||||||
SceneObjectPart part = obj.GetChildPart(objectID);
|
|
||||||
|
|
||||||
// If the touched prim handles touches, deliver it
|
|
||||||
// If not, deliver to root prim
|
|
||||||
if ((part.ScriptEvents & scriptEvents.touch) != 0)
|
|
||||||
EventManager.TriggerObjectGrabbing(part.LocalId, 0, part.OffsetPosition, remoteClient, surfaceArg);
|
|
||||||
// Deliver to the root prim if the touched prim doesn't handle touches
|
|
||||||
// or if we're meant to pass on touches anyway. Don't send to root prim
|
|
||||||
// if prim touched is the root prim as we just did it
|
|
||||||
if (((part.ScriptEvents & scriptEvents.touch) == 0) ||
|
|
||||||
(part.PassTouches && (part.LocalId != obj.RootPart.LocalId)))
|
|
||||||
{
|
|
||||||
EventManager.TriggerObjectGrabbing(obj.RootPart.LocalId, part.LocalId, part.OffsetPosition, remoteClient, surfaceArg);
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void ProcessObjectDeGrab(uint localID, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs)
|
public virtual void ProcessObjectDeGrab(uint localID, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs)
|
||||||
{
|
{
|
||||||
EntityBase[] EntityList = GetEntities();
|
SceneObjectPart part = GetSceneObjectPart(localID);
|
||||||
|
if (part == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
SceneObjectGroup obj = part.ParentGroup;
|
||||||
|
|
||||||
SurfaceTouchEventArgs surfaceArg = null;
|
SurfaceTouchEventArgs surfaceArg = null;
|
||||||
if (surfaceArgs != null && surfaceArgs.Count > 0)
|
if (surfaceArgs != null && surfaceArgs.Count > 0)
|
||||||
surfaceArg = surfaceArgs[0];
|
surfaceArg = surfaceArgs[0];
|
||||||
|
|
||||||
foreach (EntityBase ent in EntityList)
|
// If the touched prim handles touches, deliver it
|
||||||
{
|
// If not, deliver to root prim
|
||||||
if (ent is SceneObjectGroup)
|
if ((part.ScriptEvents & scriptEvents.touch_end) != 0)
|
||||||
{
|
EventManager.TriggerObjectDeGrab(part.LocalId, 0, remoteClient, surfaceArg);
|
||||||
SceneObjectGroup obj = ent as SceneObjectGroup;
|
else
|
||||||
|
EventManager.TriggerObjectDeGrab(obj.RootPart.LocalId, part.LocalId, remoteClient, surfaceArg);
|
||||||
// Is this prim part of the group
|
|
||||||
if (obj.HasChildPrim(localID))
|
|
||||||
{
|
|
||||||
SceneObjectPart part=obj.GetChildPart(localID);
|
|
||||||
if (part != null)
|
|
||||||
{
|
|
||||||
// If the touched prim handles touches, deliver it
|
|
||||||
// If not, deliver to root prim
|
|
||||||
if ((part.ScriptEvents & scriptEvents.touch_end) != 0)
|
|
||||||
EventManager.TriggerObjectDeGrab(part.LocalId, 0, remoteClient, surfaceArg);
|
|
||||||
else
|
|
||||||
EventManager.TriggerObjectDeGrab(obj.RootPart.LocalId, part.LocalId, remoteClient, surfaceArg);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ProcessAvatarPickerRequest(IClientAPI client, UUID avatarID, UUID RequestID, string query)
|
public void ProcessAvatarPickerRequest(IClientAPI client, UUID avatarID, UUID RequestID, string query)
|
||||||
|
|
|
@ -2636,7 +2636,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (sp == null)
|
if (sp == null)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat(
|
m_log.DebugFormat(
|
||||||
"[SCENE]: Adding new child scene presence {0} to scene {1}", client.Name, RegionInfo.RegionName);
|
"[SCENE]: Adding new child scene presence {0} to scene {1} at pos {2}", client.Name, RegionInfo.RegionName, client.StartPos);
|
||||||
|
|
||||||
m_clientManager.Add(client);
|
m_clientManager.Add(client);
|
||||||
SubscribeToClientEvents(client);
|
SubscribeToClientEvents(client);
|
||||||
|
@ -2900,7 +2900,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public virtual void SubscribeToClientParcelEvents(IClientAPI client)
|
public virtual void SubscribeToClientParcelEvents(IClientAPI client)
|
||||||
{
|
{
|
||||||
client.OnObjectGroupRequest += m_sceneGraph.HandleObjectGroupUpdate;
|
|
||||||
client.OnParcelReturnObjectsRequest += LandChannel.ReturnObjectsInParcel;
|
client.OnParcelReturnObjectsRequest += LandChannel.ReturnObjectsInParcel;
|
||||||
client.OnParcelSetOtherCleanTime += LandChannel.SetParcelOtherCleanTime;
|
client.OnParcelSetOtherCleanTime += LandChannel.SetParcelOtherCleanTime;
|
||||||
client.OnParcelBuy += ProcessParcelBuy;
|
client.OnParcelBuy += ProcessParcelBuy;
|
||||||
|
@ -3027,7 +3026,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public virtual void UnSubscribeToClientParcelEvents(IClientAPI client)
|
public virtual void UnSubscribeToClientParcelEvents(IClientAPI client)
|
||||||
{
|
{
|
||||||
client.OnObjectGroupRequest -= m_sceneGraph.HandleObjectGroupUpdate;
|
|
||||||
client.OnParcelReturnObjectsRequest -= LandChannel.ReturnObjectsInParcel;
|
client.OnParcelReturnObjectsRequest -= LandChannel.ReturnObjectsInParcel;
|
||||||
client.OnParcelSetOtherCleanTime -= LandChannel.SetParcelOtherCleanTime;
|
client.OnParcelSetOtherCleanTime -= LandChannel.SetParcelOtherCleanTime;
|
||||||
client.OnParcelBuy -= ProcessParcelBuy;
|
client.OnParcelBuy -= ProcessParcelBuy;
|
||||||
|
@ -3386,9 +3384,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
// Don't disable this log message - it's too helpful
|
// Don't disable this log message - it's too helpful
|
||||||
m_log.DebugFormat(
|
m_log.DebugFormat(
|
||||||
"[CONNECTION BEGIN]: Region {0} told of incoming {1} agent {2} {3} {4} (circuit code {5}, teleportflags {6})",
|
"[SCENE]: Region {0} told of incoming {1} agent {2} {3} {4} (circuit code {5}, teleportflags {6}, position {7})",
|
||||||
RegionInfo.RegionName, (agent.child ? "child" : "root"), agent.firstname, agent.lastname,
|
RegionInfo.RegionName, (agent.child ? "child" : "root"), agent.firstname, agent.lastname,
|
||||||
agent.AgentID, agent.circuitcode, teleportFlags);
|
agent.AgentID, agent.circuitcode, teleportFlags, agent.startpos);
|
||||||
|
|
||||||
if (LoginsDisabled)
|
if (LoginsDisabled)
|
||||||
{
|
{
|
||||||
|
@ -3434,7 +3432,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat(
|
m_log.ErrorFormat(
|
||||||
"[CONNECTION BEGIN]: Exception verifying presence {0}{1}", e.Message, e.StackTrace);
|
"[SCENE]: Exception verifying presence {0}{1}", e.Message, e.StackTrace);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3452,12 +3450,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat(
|
m_log.ErrorFormat(
|
||||||
"[CONNECTION BEGIN]: Exception authorizing user {0}{1}", e.Message, e.StackTrace);
|
"[SCENE]: Exception authorizing user {0}{1}", e.Message, e.StackTrace);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_log.InfoFormat(
|
m_log.InfoFormat(
|
||||||
"[CONNECTION BEGIN]: Region {0} authenticated and authorized incoming {1} agent {2} {3} {4} (circuit code {5})",
|
"[SCENE]: Region {0} authenticated and authorized incoming {1} agent {2} {3} {4} (circuit code {5})",
|
||||||
RegionInfo.RegionName, (agent.child ? "child" : "root"), agent.firstname, agent.lastname,
|
RegionInfo.RegionName, (agent.child ? "child" : "root"), agent.firstname, agent.lastname,
|
||||||
agent.AgentID, agent.circuitcode);
|
agent.AgentID, agent.circuitcode);
|
||||||
|
|
||||||
|
@ -4462,7 +4460,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// Get a scene object group that contains the prim with the given local id
|
/// Get a scene object group that contains the prim with the given local id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="localID"></param>
|
/// <param name="localID"></param>
|
||||||
/// <returns>null if no scene object group containing that prim is found</returns>
|
/// <returns>null if no scene object group containing that prim is found</returns>
|
||||||
public SceneObjectGroup GetGroupByPrim(uint localID)
|
public SceneObjectGroup GetGroupByPrim(uint localID)
|
||||||
{
|
{
|
||||||
return m_sceneGraph.GetGroupByPrim(localID);
|
return m_sceneGraph.GetGroupByPrim(localID);
|
||||||
|
|
|
@ -640,20 +640,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected internal void HandleObjectGroupUpdate(
|
|
||||||
IClientAPI remoteClient, UUID GroupID, uint objectLocalID, UUID Garbage)
|
|
||||||
{
|
|
||||||
if (!remoteClient.IsGroupMember(GroupID))
|
|
||||||
return;
|
|
||||||
|
|
||||||
SceneObjectGroup group = GetGroupByPrim(objectLocalID);
|
|
||||||
if (group != null)
|
|
||||||
{
|
|
||||||
if (group.OwnerID == remoteClient.AgentId)
|
|
||||||
group.SetGroup(GroupID, remoteClient);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected internal ScenePresence CreateAndAddChildScenePresence(
|
protected internal ScenePresence CreateAndAddChildScenePresence(
|
||||||
IClientAPI client, AvatarAppearance appearance, PresenceType type)
|
IClientAPI client, AvatarAppearance appearance, PresenceType type)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1724,19 +1724,23 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
// Send the parts of this SOG to a single client
|
/// <summary>
|
||||||
// Used when the client initially connects and when client sends RequestPrim packet
|
/// Send the parts of this SOG to a single client
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Used when the client initially connects and when client sends RequestPrim packet
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="remoteClient"></param>
|
||||||
public void SendFullUpdateToClient(IClientAPI remoteClient)
|
public void SendFullUpdateToClient(IClientAPI remoteClient)
|
||||||
{
|
{
|
||||||
RootPart.SendFullUpdate(
|
RootPart.SendFullUpdate(remoteClient);
|
||||||
remoteClient, m_scene.Permissions.GenerateClientFlags(remoteClient.AgentId, RootPart.UUID));
|
|
||||||
|
|
||||||
SceneObjectPart[] parts = m_parts.GetArray();
|
SceneObjectPart[] parts = m_parts.GetArray();
|
||||||
for (int i = 0; i < parts.Length; i++)
|
for (int i = 0; i < parts.Length; i++)
|
||||||
{
|
{
|
||||||
SceneObjectPart part = parts[i];
|
SceneObjectPart part = parts[i];
|
||||||
if (part != RootPart)
|
if (part != RootPart)
|
||||||
part.SendFullUpdate(remoteClient, m_scene.Permissions.GenerateClientFlags(remoteClient.AgentId, part.UUID));
|
part.SendFullUpdate(remoteClient);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2067,10 +2071,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reset the UUIDs for all the prims that make up this group.
|
/// Reset the UUIDs for all the prims that make up this group.
|
||||||
///
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
/// This is called by methods which want to add a new group to an existing scene, in order
|
/// This is called by methods which want to add a new group to an existing scene, in order
|
||||||
/// to ensure that there are no clashes with groups already present.
|
/// to ensure that there are no clashes with groups already present.
|
||||||
/// </summary>
|
/// </remarks>
|
||||||
public void ResetIDs()
|
public void ResetIDs()
|
||||||
{
|
{
|
||||||
lock (m_parts.SyncRoot)
|
lock (m_parts.SyncRoot)
|
||||||
|
@ -3636,6 +3641,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
part.Inventory.ChangeInventoryGroup(GroupID);
|
part.Inventory.ChangeInventoryGroup(GroupID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HasGroupChanged = true;
|
||||||
|
|
||||||
// Don't trigger the update here - otherwise some client issues occur when multiple updates are scheduled
|
// Don't trigger the update here - otherwise some client issues occur when multiple updates are scheduled
|
||||||
// for the same object with very different properties. The caller must schedule the update.
|
// for the same object with very different properties. The caller must schedule the update.
|
||||||
//ScheduleGroupForFullUpdate();
|
//ScheduleGroupForFullUpdate();
|
||||||
|
|
|
@ -2886,8 +2886,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// Send a full update to the client for the given part
|
/// Send a full update to the client for the given part
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="remoteClient"></param>
|
/// <param name="remoteClient"></param>
|
||||||
/// <param name="clientFlags"></param>
|
protected internal void SendFullUpdate(IClientAPI remoteClient)
|
||||||
protected internal void SendFullUpdate(IClientAPI remoteClient, uint clientFlags)
|
|
||||||
{
|
{
|
||||||
if (ParentGroup == null)
|
if (ParentGroup == null)
|
||||||
return;
|
return;
|
||||||
|
@ -2899,16 +2898,16 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
if (ParentGroup.IsAttachment)
|
if (ParentGroup.IsAttachment)
|
||||||
{
|
{
|
||||||
SendFullUpdateToClient(remoteClient, AttachedPos, clientFlags);
|
SendFullUpdateToClient(remoteClient, AttachedPos);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SendFullUpdateToClient(remoteClient, AbsolutePosition, clientFlags);
|
SendFullUpdateToClient(remoteClient, AbsolutePosition);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SendFullUpdateToClient(remoteClient, clientFlags);
|
SendFullUpdateToClient(remoteClient);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2922,7 +2921,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
|
ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
|
||||||
{
|
{
|
||||||
SendFullUpdate(avatar.ControllingClient, avatar.GenerateClientFlags(UUID));
|
SendFullUpdate(avatar.ControllingClient);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2930,12 +2929,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// Sends a full update to the client
|
/// Sends a full update to the client
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="remoteClient"></param>
|
/// <param name="remoteClient"></param>
|
||||||
/// <param name="clientFlags"></param>
|
public void SendFullUpdateToClient(IClientAPI remoteClient)
|
||||||
public void SendFullUpdateToClient(IClientAPI remoteClient, uint clientflags)
|
|
||||||
{
|
{
|
||||||
Vector3 lPos;
|
SendFullUpdateToClient(remoteClient, OffsetPosition);
|
||||||
lPos = OffsetPosition;
|
|
||||||
SendFullUpdateToClient(remoteClient, lPos, clientflags);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -2943,8 +2939,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="remoteClient"></param>
|
/// <param name="remoteClient"></param>
|
||||||
/// <param name="lPos"></param>
|
/// <param name="lPos"></param>
|
||||||
/// <param name="clientFlags"></param>
|
public void SendFullUpdateToClient(IClientAPI remoteClient, Vector3 lPos)
|
||||||
public void SendFullUpdateToClient(IClientAPI remoteClient, Vector3 lPos, uint clientFlags)
|
|
||||||
{
|
{
|
||||||
if (ParentGroup == null)
|
if (ParentGroup == null)
|
||||||
return;
|
return;
|
||||||
|
@ -2961,15 +2956,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
(ParentGroup.AttachmentPoint >= 31) && (ParentGroup.AttachmentPoint <= 38))
|
(ParentGroup.AttachmentPoint >= 31) && (ParentGroup.AttachmentPoint <= 38))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
clientFlags &= ~(uint) PrimFlags.CreateSelected;
|
|
||||||
|
|
||||||
if (remoteClient.AgentId == OwnerID)
|
if (remoteClient.AgentId == OwnerID)
|
||||||
{
|
{
|
||||||
if ((Flags & PrimFlags.CreateSelected) != 0)
|
if ((Flags & PrimFlags.CreateSelected) != 0)
|
||||||
{
|
|
||||||
clientFlags |= (uint) PrimFlags.CreateSelected;
|
|
||||||
Flags &= ~PrimFlags.CreateSelected;
|
Flags &= ~PrimFlags.CreateSelected;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
//bool isattachment = IsAttachment;
|
//bool isattachment = IsAttachment;
|
||||||
//if (LocalId != ParentGroup.RootPart.LocalId)
|
//if (LocalId != ParentGroup.RootPart.LocalId)
|
||||||
|
@ -3403,6 +3393,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public void SetGroup(UUID groupID, IClientAPI client)
|
public void SetGroup(UUID groupID, IClientAPI client)
|
||||||
{
|
{
|
||||||
|
// Scene.AddNewPrims() calls with client == null so can't use this.
|
||||||
|
// m_log.DebugFormat(
|
||||||
|
// "[SCENE OBJECT PART]: Setting group for {0} to {1} for {2}",
|
||||||
|
// Name, groupID, OwnerID);
|
||||||
|
|
||||||
GroupID = groupID;
|
GroupID = groupID;
|
||||||
if (client != null)
|
if (client != null)
|
||||||
SendPropertiesToClient(client);
|
SendPropertiesToClient(client);
|
||||||
|
|
|
@ -289,16 +289,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
#region Properties
|
#region Properties
|
||||||
|
|
||||||
protected PhysicsActor m_physicsActor;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Physical scene representation of this Avatar.
|
/// Physical scene representation of this Avatar.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public PhysicsActor PhysicsActor
|
public PhysicsActor PhysicsActor { get; private set; }
|
||||||
{
|
|
||||||
set { m_physicsActor = value; }
|
|
||||||
get { return m_physicsActor; }
|
|
||||||
}
|
|
||||||
|
|
||||||
private byte m_movementflag;
|
private byte m_movementflag;
|
||||||
|
|
||||||
|
@ -512,9 +506,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
m_pos = PhysicsActor.Position;
|
m_pos = PhysicsActor.Position;
|
||||||
|
|
||||||
// m_log.DebugFormat(
|
//m_log.DebugFormat(
|
||||||
// "[SCENE PRESENCE]: Set position {0} for {1} in {2} via getting AbsolutePosition!",
|
// "[SCENE PRESENCE]: Set position {0} for {1} in {2} via getting AbsolutePosition!",
|
||||||
// m_pos, Name, Scene.RegionInfo.RegionName);
|
// m_pos, Name, Scene.RegionInfo.RegionName);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -544,7 +538,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return m_pos;
|
return m_pos;
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
|
@ -568,9 +561,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
ParentPosition = Vector3.Zero;
|
ParentPosition = Vector3.Zero;
|
||||||
}
|
}
|
||||||
|
|
||||||
// m_log.DebugFormat(
|
//m_log.DebugFormat(
|
||||||
// "[ENTITY BASE]: In {0} set AbsolutePosition of {1} to {2}",
|
// "[ENTITY BASE]: In {0} set AbsolutePosition of {1} to {2}",
|
||||||
// Scene.RegionInfo.RegionName, Name, m_pos);
|
// Scene.RegionInfo.RegionName, Name, m_pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -806,7 +799,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
public void RegisterToEvents()
|
public void RegisterToEvents()
|
||||||
{
|
{
|
||||||
ControllingClient.OnCompleteMovementToRegion += CompleteMovement;
|
ControllingClient.OnCompleteMovementToRegion += CompleteMovement;
|
||||||
//ControllingClient.OnCompleteMovementToRegion += SendInitialData;
|
|
||||||
ControllingClient.OnAgentUpdate += HandleAgentUpdate;
|
ControllingClient.OnAgentUpdate += HandleAgentUpdate;
|
||||||
ControllingClient.OnAgentRequestSit += HandleAgentRequestSit;
|
ControllingClient.OnAgentRequestSit += HandleAgentRequestSit;
|
||||||
ControllingClient.OnAgentSit += HandleAgentSit;
|
ControllingClient.OnAgentSit += HandleAgentSit;
|
||||||
|
@ -854,11 +846,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public uint GenerateClientFlags(UUID ObjectID)
|
|
||||||
{
|
|
||||||
return m_scene.Permissions.GenerateClientFlags(m_uuid, ObjectID);
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Status Methods
|
#region Status Methods
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1049,18 +1036,19 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
if (PhysicsActor != null)
|
if (PhysicsActor != null)
|
||||||
{
|
{
|
||||||
try
|
// PhysicsActor.OnRequestTerseUpdate -= SendTerseUpdateToAllClients;
|
||||||
{
|
PhysicsActor.OnOutOfBounds -= OutOfBoundsCall;
|
||||||
PhysicsActor.OnRequestTerseUpdate -= SendTerseUpdateToAllClients;
|
m_scene.PhysicsScene.RemoveAvatar(PhysicsActor);
|
||||||
PhysicsActor.OnOutOfBounds -= OutOfBoundsCall;
|
PhysicsActor.UnSubscribeEvents();
|
||||||
m_scene.PhysicsScene.RemoveAvatar(PhysicsActor);
|
PhysicsActor.OnCollisionUpdate -= PhysicsCollisionUpdate;
|
||||||
PhysicsActor.UnSubscribeEvents();
|
PhysicsActor = null;
|
||||||
PhysicsActor.OnCollisionUpdate -= PhysicsCollisionUpdate;
|
|
||||||
PhysicsActor = null;
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{ }
|
|
||||||
}
|
}
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// m_log.ErrorFormat(
|
||||||
|
// "[SCENE PRESENCE]: Attempt to remove physics actor for {0} on {1} but this scene presence has no physics actor",
|
||||||
|
// Name, Scene.RegionInfo.RegionName);
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1173,13 +1161,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets avatar height in the physics plugin
|
/// Sets avatar height in the physics plugin
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="height">New height of avatar</param>
|
||||||
public void SetHeight(float height)
|
public void SetHeight(float height)
|
||||||
{
|
{
|
||||||
if (PhysicsActor != null && !IsChildAgent)
|
if (PhysicsActor != null && !IsChildAgent)
|
||||||
{
|
PhysicsActor.Size = new Vector3(0.45f, 0.6f, height);
|
||||||
Vector3 SetSize = new Vector3(0.45f, 0.6f, height);
|
|
||||||
PhysicsActor.Size = SetSize;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1945,7 +1931,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// m_log.DebugFormat("[SCENE PRESENCE]: {0} {1}", SitTargetisSet, SitTargetUnOccupied);
|
// m_log.DebugFormat("[SCENE PRESENCE]: {0} {1}", SitTargetisSet, SitTargetUnOccupied);
|
||||||
|
|
||||||
if (PhysicsActor != null)
|
if (PhysicsActor != null)
|
||||||
m_sitAvatarHeight = m_physicsActor.Size.Z;
|
m_sitAvatarHeight = PhysicsActor.Size.Z;
|
||||||
|
|
||||||
bool canSit = false;
|
bool canSit = false;
|
||||||
pos = part.AbsolutePosition + offset;
|
pos = part.AbsolutePosition + offset;
|
||||||
|
@ -2592,7 +2578,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// only send update from root agents to other clients; children are only "listening posts"
|
// only send update from root agents to other clients; children are only "listening posts"
|
||||||
if (IsChildAgent)
|
if (IsChildAgent)
|
||||||
{
|
{
|
||||||
m_log.Warn("[SCENE PRESENCE]: Attempt to send avatar data from a child agent");
|
m_log.WarnFormat(
|
||||||
|
"[SCENE PRESENCE]: Attempt to send avatar data from a child agent for {0} in {1}",
|
||||||
|
Name, Scene.RegionInfo.RegionName);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2650,7 +2639,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// only send update from root agents to other clients; children are only "listening posts"
|
// only send update from root agents to other clients; children are only "listening posts"
|
||||||
if (IsChildAgent)
|
if (IsChildAgent)
|
||||||
{
|
{
|
||||||
m_log.Warn("[SCENE PRESENCE]: Attempt to send avatar data from a child agent");
|
m_log.WarnFormat(
|
||||||
|
"[SCENE PRESENCE]: Attempt to send avatar data from a child agent for {0} in {1}",
|
||||||
|
Name, Scene.RegionInfo.RegionName);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3032,6 +3024,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
CopyFrom(cAgentData);
|
CopyFrom(cAgentData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static Vector3 marker = new Vector3(-1f, -1f, -1f);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This updates important decision making data about a child agent
|
/// This updates important decision making data about a child agent
|
||||||
/// The main purpose is to figure out what objects to send to a child agent that's in a neighboring region
|
/// The main purpose is to figure out what objects to send to a child agent that's in a neighboring region
|
||||||
|
@ -3052,8 +3045,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// region's draw distance.
|
// region's draw distance.
|
||||||
// DrawDistance = cAgentData.Far;
|
// DrawDistance = cAgentData.Far;
|
||||||
DrawDistance = Scene.DefaultDrawDistance;
|
DrawDistance = Scene.DefaultDrawDistance;
|
||||||
|
|
||||||
if (cAgentData.Position != new Vector3(-1f, -1f, -1f)) // UGH!!
|
if (cAgentData.Position != marker) // UGH!!
|
||||||
m_pos = cAgentData.Position + offset;
|
m_pos = cAgentData.Position + offset;
|
||||||
|
|
||||||
if (Vector3.Distance(AbsolutePosition, posLastSignificantMove) >= Scene.ChildReprioritizationDistance)
|
if (Vector3.Distance(AbsolutePosition, posLastSignificantMove) >= Scene.ChildReprioritizationDistance)
|
||||||
|
@ -3064,8 +3057,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
CameraPosition = cAgentData.Center + offset;
|
CameraPosition = cAgentData.Center + offset;
|
||||||
|
|
||||||
//SetHeight(cAgentData.AVHeight);
|
|
||||||
|
|
||||||
if ((cAgentData.Throttles != null) && cAgentData.Throttles.Length > 0)
|
if ((cAgentData.Throttles != null) && cAgentData.Throttles.Length > 0)
|
||||||
ControllingClient.SetChildAgentThrottle(cAgentData.Throttles);
|
ControllingClient.SetChildAgentThrottle(cAgentData.Throttles);
|
||||||
|
|
||||||
|
@ -3274,6 +3265,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// "[SCENE PRESENCE]: Adding physics actor for {0}, ifFlying = {1} in {2}",
|
// "[SCENE PRESENCE]: Adding physics actor for {0}, ifFlying = {1} in {2}",
|
||||||
// Name, isFlying, Scene.RegionInfo.RegionName);
|
// Name, isFlying, Scene.RegionInfo.RegionName);
|
||||||
|
|
||||||
|
if (PhysicsActor != null)
|
||||||
|
{
|
||||||
|
m_log.ErrorFormat(
|
||||||
|
"[SCENE PRESENCE]: Adding physics actor for {0} to {1} but this scene presence already has a physics actor",
|
||||||
|
Name, Scene.RegionInfo.RegionName);
|
||||||
|
}
|
||||||
|
|
||||||
if (Appearance.AvatarHeight == 0)
|
if (Appearance.AvatarHeight == 0)
|
||||||
Appearance.SetHeight();
|
Appearance.SetHeight();
|
||||||
|
|
||||||
|
@ -3281,18 +3279,15 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
Vector3 pVec = AbsolutePosition;
|
Vector3 pVec = AbsolutePosition;
|
||||||
|
|
||||||
// Old bug where the height was in centimeters instead of meters
|
PhysicsActor = scene.AddAvatar(
|
||||||
PhysicsActor = scene.AddAvatar(LocalId, Firstname + "." + Lastname, pVec,
|
LocalId, Firstname + "." + Lastname, pVec,
|
||||||
new Vector3(0f, 0f, Appearance.AvatarHeight), isFlying);
|
new Vector3(0f, 0f, Appearance.AvatarHeight), isFlying);
|
||||||
|
|
||||||
scene.AddPhysicsActorTaint(PhysicsActor);
|
|
||||||
//PhysicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients;
|
//PhysicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients;
|
||||||
PhysicsActor.OnCollisionUpdate += PhysicsCollisionUpdate;
|
PhysicsActor.OnCollisionUpdate += PhysicsCollisionUpdate;
|
||||||
PhysicsActor.OnOutOfBounds += OutOfBoundsCall; // Called for PhysicsActors when there's something wrong
|
PhysicsActor.OnOutOfBounds += OutOfBoundsCall; // Called for PhysicsActors when there's something wrong
|
||||||
PhysicsActor.SubscribeEvents(500);
|
PhysicsActor.SubscribeEvents(500);
|
||||||
PhysicsActor.LocalID = LocalId;
|
PhysicsActor.LocalID = LocalId;
|
||||||
|
|
||||||
SetHeight(Appearance.AvatarHeight);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OutOfBoundsCall(Vector3 pos)
|
private void OutOfBoundsCall(Vector3 pos)
|
||||||
|
|
|
@ -29,25 +29,18 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Timers;
|
using System.Timers;
|
||||||
|
|
||||||
using log4net;
|
using log4net;
|
||||||
using Mono.Addins;
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
|
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenMetaverse.StructuredData;
|
using OpenMetaverse.StructuredData;
|
||||||
|
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
using OpenSim.Framework.Communications;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
|
|
||||||
using DirFindFlags = OpenMetaverse.DirectoryManager.DirFindFlags;
|
using DirFindFlags = OpenMetaverse.DirectoryManager.DirFindFlags;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
{
|
{
|
||||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
@ -90,7 +83,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
// Configuration settings
|
// Configuration settings
|
||||||
private bool m_groupsEnabled = false;
|
private bool m_groupsEnabled = false;
|
||||||
private bool m_groupNoticesEnabled = true;
|
private bool m_groupNoticesEnabled = true;
|
||||||
private bool m_debugEnabled = true;
|
private bool m_debugEnabled = false;
|
||||||
|
|
||||||
#region IRegionModuleBase Members
|
#region IRegionModuleBase Members
|
||||||
|
|
||||||
|
@ -225,6 +218,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
|
if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
|
||||||
|
|
||||||
client.OnUUIDGroupNameRequest += HandleUUIDGroupNameRequest;
|
client.OnUUIDGroupNameRequest += HandleUUIDGroupNameRequest;
|
||||||
|
client.OnObjectGroupRequest += HandleObjectGroupUpdate;
|
||||||
client.OnAgentDataUpdateRequest += OnAgentDataUpdateRequest;
|
client.OnAgentDataUpdateRequest += OnAgentDataUpdateRequest;
|
||||||
client.OnDirFindQuery += OnDirFindQuery;
|
client.OnDirFindQuery += OnDirFindQuery;
|
||||||
client.OnRequestAvatarProperties += OnRequestAvatarProperties;
|
client.OnRequestAvatarProperties += OnRequestAvatarProperties;
|
||||||
|
@ -232,7 +226,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
// Used for Notices and Group Invites/Accept/Reject
|
// Used for Notices and Group Invites/Accept/Reject
|
||||||
client.OnInstantMessage += OnInstantMessage;
|
client.OnInstantMessage += OnInstantMessage;
|
||||||
|
|
||||||
// Send client thier groups information.
|
// Send client their groups information.
|
||||||
SendAgentGroupDataUpdate(client, client.AgentId);
|
SendAgentGroupDataUpdate(client, client.AgentId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -335,6 +329,35 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
remoteClient.SendGroupNameReply(GroupID, GroupName);
|
remoteClient.SendGroupNameReply(GroupID, GroupName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void HandleObjectGroupUpdate(
|
||||||
|
IClientAPI remoteClient, UUID GroupID, uint objectLocalID, UUID Garbage)
|
||||||
|
{
|
||||||
|
// XXX: Might be better to get rid of this special casing and have GetMembershipData return something
|
||||||
|
// reasonable for a UUID.Zero group.
|
||||||
|
if (GroupID != UUID.Zero)
|
||||||
|
{
|
||||||
|
GroupMembershipData gmd = GetMembershipData(GroupID, remoteClient.AgentId);
|
||||||
|
|
||||||
|
if (gmd == null)
|
||||||
|
{
|
||||||
|
// m_log.WarnFormat(
|
||||||
|
// "[GROUPS]: User {0} is not a member of group {1} so they can't update {2} to this group",
|
||||||
|
// remoteClient.Name, GroupID, objectLocalID);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SceneObjectGroup so = ((Scene)remoteClient.Scene).GetGroupByPrim(objectLocalID);
|
||||||
|
if (so != null)
|
||||||
|
{
|
||||||
|
if (so.OwnerID == remoteClient.AgentId)
|
||||||
|
{
|
||||||
|
so.SetGroup(GroupID, remoteClient);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void OnInstantMessage(IClientAPI remoteClient, GridInstantMessage im)
|
private void OnInstantMessage(IClientAPI remoteClient, GridInstantMessage im)
|
||||||
{
|
{
|
||||||
if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
|
if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
|
||||||
|
|
|
@ -52,6 +52,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
private bool m_debugEnabled = false;
|
||||||
|
|
||||||
public const GroupPowers m_DefaultEveryonePowers = GroupPowers.AllowSetHome |
|
public const GroupPowers m_DefaultEveryonePowers = GroupPowers.AllowSetHome |
|
||||||
GroupPowers.Accountable |
|
GroupPowers.Accountable |
|
||||||
GroupPowers.JoinChat |
|
GroupPowers.JoinChat |
|
||||||
|
@ -81,7 +83,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
private Dictionary<UUID, List<UUID>> m_groupsAgentsDroppedFromChatSession = new Dictionary<UUID, List<UUID>>();
|
private Dictionary<UUID, List<UUID>> m_groupsAgentsDroppedFromChatSession = new Dictionary<UUID, List<UUID>>();
|
||||||
private Dictionary<UUID, List<UUID>> m_groupsAgentsInvitedToChatSession = new Dictionary<UUID, List<UUID>>();
|
private Dictionary<UUID, List<UUID>> m_groupsAgentsInvitedToChatSession = new Dictionary<UUID, List<UUID>>();
|
||||||
|
|
||||||
|
|
||||||
#region IRegionModuleBase Members
|
#region IRegionModuleBase Members
|
||||||
|
|
||||||
public string Name
|
public string Name
|
||||||
|
@ -115,7 +116,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_log.InfoFormat("[XMLRPC-GROUPS-CONNECTOR]: Initializing {0}", this.Name);
|
m_log.DebugFormat("[XMLRPC-GROUPS-CONNECTOR]: Initializing {0}", this.Name);
|
||||||
|
|
||||||
m_groupsServerURI = groupsConfig.GetString("GroupsServerURI", string.Empty);
|
m_groupsServerURI = groupsConfig.GetString("GroupsServerURI", string.Empty);
|
||||||
if ((m_groupsServerURI == null) ||
|
if ((m_groupsServerURI == null) ||
|
||||||
|
@ -142,6 +143,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
m_log.InfoFormat("[XMLRPC-GROUPS-CONNECTOR]: Groups Cache Timeout set to {0}.", m_cacheTimeout);
|
m_log.InfoFormat("[XMLRPC-GROUPS-CONNECTOR]: Groups Cache Timeout set to {0}.", m_cacheTimeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_debugEnabled = groupsConfig.GetBoolean("DebugEnabled", false);
|
||||||
|
|
||||||
// If we got all the config options we need, lets start'er'up
|
// If we got all the config options we need, lets start'er'up
|
||||||
m_memoryCache = new ExpiringCache<string, XmlRpcResponse>();
|
m_memoryCache = new ExpiringCache<string, XmlRpcResponse>();
|
||||||
m_connectorEnabled = true;
|
m_connectorEnabled = true;
|
||||||
|
@ -150,7 +153,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
m_log.InfoFormat("[XMLRPC-GROUPS-CONNECTOR]: Closing {0}", this.Name);
|
m_log.DebugFormat("[XMLRPC-GROUPS-CONNECTOR]: Closing {0}", this.Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddRegion(OpenSim.Region.Framework.Scenes.Scene scene)
|
public void AddRegion(OpenSim.Region.Framework.Scenes.Scene scene)
|
||||||
|
@ -958,6 +961,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
|
|
||||||
if (resp == null)
|
if (resp == null)
|
||||||
{
|
{
|
||||||
|
if (m_debugEnabled)
|
||||||
|
m_log.DebugFormat("[XMLRPC-GROUPS-CONNECTOR]: Cache miss for key {0}", CacheKey);
|
||||||
|
|
||||||
string UserService;
|
string UserService;
|
||||||
UUID SessionID;
|
UUID SessionID;
|
||||||
GetClientGroupRequestID(requestingAgentID, out UserService, out SessionID);
|
GetClientGroupRequestID(requestingAgentID, out UserService, out SessionID);
|
||||||
|
|
|
@ -44,8 +44,9 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
|
||||||
private bool flying;
|
private bool flying;
|
||||||
private bool iscolliding;
|
private bool iscolliding;
|
||||||
|
|
||||||
public BasicActor()
|
public BasicActor(Vector3 size)
|
||||||
{
|
{
|
||||||
|
Size = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int PhysicsActorType
|
public override int PhysicsActorType
|
||||||
|
|
|
@ -56,7 +56,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
|
||||||
}
|
}
|
||||||
public override PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, bool isFlying)
|
public override PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, bool isFlying)
|
||||||
{
|
{
|
||||||
BasicActor act = new BasicActor();
|
BasicActor act = new BasicActor(size);
|
||||||
act.Position = position;
|
act.Position = position;
|
||||||
act.Flying = isFlying;
|
act.Flying = isFlying;
|
||||||
_actors.Add(act);
|
_actors.Add(act);
|
||||||
|
|
|
@ -137,7 +137,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
internal IntPtr Body = IntPtr.Zero;
|
internal IntPtr Body = IntPtr.Zero;
|
||||||
private OdeScene _parent_scene;
|
private OdeScene _parent_scene;
|
||||||
internal IntPtr Shell = IntPtr.Zero;
|
internal IntPtr Shell = IntPtr.Zero;
|
||||||
internal IntPtr Amotor = IntPtr.Zero;
|
private IntPtr Amotor = IntPtr.Zero;
|
||||||
private d.Mass ShellMass;
|
private d.Mass ShellMass;
|
||||||
|
|
||||||
private int m_eventsubscription = 0;
|
private int m_eventsubscription = 0;
|
||||||
|
@ -195,13 +195,10 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
// new d.Matrix3(0.5f, 0.7071068f, 0.5f, -0.7071068f, 0f, 0.7071068f, 0.5f, -0.7071068f,
|
// new d.Matrix3(0.5f, 0.7071068f, 0.5f, -0.7071068f, 0f, 0.7071068f, 0.5f, -0.7071068f,
|
||||||
// 0.5f);
|
// 0.5f);
|
||||||
|
|
||||||
for (int i = 0; i < 11; i++)
|
// We can set taint and actual to be the same here, since the entire character will be set up when the
|
||||||
{
|
// m_tainted_isPhysical is processed.
|
||||||
m_colliderarr[i] = false;
|
SetTaintedCapsuleLength(size);
|
||||||
}
|
CAPSULE_LENGTH = m_tainted_CAPSULE_LENGTH;
|
||||||
CAPSULE_LENGTH = (size.Z * 1.15f) - CAPSULE_RADIUS * 2.0f;
|
|
||||||
//m_log.Info("[ODE CHARACTER]: " + CAPSULE_LENGTH.ToString());
|
|
||||||
m_tainted_CAPSULE_LENGTH = CAPSULE_LENGTH;
|
|
||||||
|
|
||||||
m_isPhysical = false; // current status: no ODE information exists
|
m_isPhysical = false; // current status: no ODE information exists
|
||||||
m_tainted_isPhysical = true; // new tainted status: need to create ODE information
|
m_tainted_isPhysical = true; // new tainted status: need to create ODE information
|
||||||
|
@ -457,24 +454,28 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
get { return new Vector3(CAPSULE_RADIUS * 2, CAPSULE_RADIUS * 2, CAPSULE_LENGTH); }
|
get { return new Vector3(CAPSULE_RADIUS * 2, CAPSULE_RADIUS * 2, CAPSULE_LENGTH); }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (value.IsFinite())
|
SetTaintedCapsuleLength(value);
|
||||||
{
|
|
||||||
m_pidControllerActive = true;
|
|
||||||
|
|
||||||
Vector3 SetSize = value;
|
|
||||||
m_tainted_CAPSULE_LENGTH = (SetSize.Z * 1.15f) - CAPSULE_RADIUS * 2.0f;
|
|
||||||
// m_log.Info("[ODE CHARACTER]: " + CAPSULE_LENGTH);
|
|
||||||
|
|
||||||
// If we reset velocity here, then an avatar stalls when it crosses a border for the first time
|
// If we reset velocity here, then an avatar stalls when it crosses a border for the first time
|
||||||
// (as the height of the new root agent is set).
|
// (as the height of the new root agent is set).
|
||||||
// Velocity = Vector3.Zero;
|
// Velocity = Vector3.Zero;
|
||||||
|
|
||||||
_parent_scene.AddPhysicsActorTaint(this);
|
_parent_scene.AddPhysicsActorTaint(this);
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
{
|
|
||||||
m_log.WarnFormat("[ODE CHARACTER]: Got a NaN Size from Scene on {0}", Name);
|
private void SetTaintedCapsuleLength(Vector3 size)
|
||||||
}
|
{
|
||||||
|
if (size.IsFinite())
|
||||||
|
{
|
||||||
|
m_pidControllerActive = true;
|
||||||
|
|
||||||
|
m_tainted_CAPSULE_LENGTH = (size.Z * 1.15f) - CAPSULE_RADIUS * 2.0f;
|
||||||
|
// m_log.Info("[ODE CHARACTER]: " + CAPSULE_LENGTH);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_log.WarnFormat("[ODE CHARACTER]: Got a NaN Size for {0} in {1}", Name, _parent_scene.Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -549,8 +550,8 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
float AVvolume = (float) (Math.PI*Math.Pow(CAPSULE_RADIUS, 2)*CAPSULE_LENGTH);
|
float AVvolume = (float)(Math.PI * Math.Pow(CAPSULE_RADIUS, 2) * CAPSULE_LENGTH);
|
||||||
return m_density*AVvolume;
|
return m_density * AVvolume;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1699,7 +1699,10 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
|
|
||||||
public override void RemoveAvatar(PhysicsActor actor)
|
public override void RemoveAvatar(PhysicsActor actor)
|
||||||
{
|
{
|
||||||
//m_log.Debug("[PHYSICS]:ODELOCK");
|
// m_log.DebugFormat(
|
||||||
|
// "[ODE SCENE]: Removing physics character {0} {1} from physics scene {2}",
|
||||||
|
// actor.Name, actor.LocalID, Name);
|
||||||
|
|
||||||
((OdeCharacter) actor).Destroy();
|
((OdeCharacter) actor).Destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1709,6 +1712,10 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
{
|
{
|
||||||
_characters.Add(chr);
|
_characters.Add(chr);
|
||||||
|
|
||||||
|
// m_log.DebugFormat(
|
||||||
|
// "[ODE SCENE]: Adding physics character {0} {1} to physics scene {2}. Count now {3}",
|
||||||
|
// chr.Name, chr.LocalID, Name, _characters.Count);
|
||||||
|
|
||||||
if (chr.bad)
|
if (chr.bad)
|
||||||
m_log.ErrorFormat("[ODE SCENE]: Added BAD actor {0} to characters list", chr.m_uuid);
|
m_log.ErrorFormat("[ODE SCENE]: Added BAD actor {0} to characters list", chr.m_uuid);
|
||||||
}
|
}
|
||||||
|
@ -1723,11 +1730,19 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
internal void RemoveCharacter(OdeCharacter chr)
|
internal void RemoveCharacter(OdeCharacter chr)
|
||||||
{
|
{
|
||||||
if (_characters.Contains(chr))
|
if (_characters.Contains(chr))
|
||||||
|
{
|
||||||
_characters.Remove(chr);
|
_characters.Remove(chr);
|
||||||
|
|
||||||
|
// m_log.DebugFormat(
|
||||||
|
// "[ODE SCENE]: Removing physics character {0} {1} from physics scene {2}. Count now {3}",
|
||||||
|
// chr.Name, chr.LocalID, Name, _characters.Count);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
m_log.ErrorFormat(
|
m_log.ErrorFormat(
|
||||||
"[ODE SCENE]: Tried to remove character {0} {1} but they are not in the list!",
|
"[ODE SCENE]: Tried to remove character {0} {1} but they are not in the list!",
|
||||||
chr.Name, chr.LocalID);
|
chr.Name, chr.LocalID);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private PhysicsActor AddPrim(String name, Vector3 position, Vector3 size, Quaternion rotation,
|
private PhysicsActor AddPrim(String name, Vector3 position, Vector3 size, Quaternion rotation,
|
||||||
|
@ -1765,7 +1780,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
|
public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
|
||||||
Vector3 size, Quaternion rotation, bool isPhysical, uint localid)
|
Vector3 size, Quaternion rotation, bool isPhysical, uint localid)
|
||||||
{
|
{
|
||||||
// m_log.DebugFormat("[ODE SCENE]: Adding physics actor to {0} {1}", primName, localid);
|
// m_log.DebugFormat("[ODE SCENE]: Adding physics prim {0} {1} to physics scene {2}", primName, localid, Name);
|
||||||
|
|
||||||
return AddPrim(primName, position, size, rotation, pbs, isPhysical, localid);
|
return AddPrim(primName, position, size, rotation, pbs, isPhysical, localid);
|
||||||
}
|
}
|
||||||
|
@ -2755,6 +2770,10 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
{
|
{
|
||||||
foreach (OdeCharacter actor in defects)
|
foreach (OdeCharacter actor in defects)
|
||||||
{
|
{
|
||||||
|
m_log.ErrorFormat(
|
||||||
|
"[ODE SCENE]: Removing physics character {0} {1} from physics scene {2} due to defect found when moving",
|
||||||
|
actor.Name, actor.LocalID, Name);
|
||||||
|
|
||||||
RemoveCharacter(actor);
|
RemoveCharacter(actor);
|
||||||
actor.DestroyOdeStructures();
|
actor.DestroyOdeStructures();
|
||||||
}
|
}
|
||||||
|
@ -2825,6 +2844,10 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
{
|
{
|
||||||
foreach (OdeCharacter actor in defects)
|
foreach (OdeCharacter actor in defects)
|
||||||
{
|
{
|
||||||
|
m_log.ErrorFormat(
|
||||||
|
"[ODE SCENE]: Removing physics character {0} {1} from physics scene {2} due to defect found when updating position and velocity",
|
||||||
|
actor.Name, actor.LocalID, Name);
|
||||||
|
|
||||||
RemoveCharacter(actor);
|
RemoveCharacter(actor);
|
||||||
actor.DestroyOdeStructures();
|
actor.DestroyOdeStructures();
|
||||||
}
|
}
|
||||||
|
|
|
@ -333,7 +333,7 @@ namespace OpenSim.Region.RegionCombinerModule
|
||||||
//xxy
|
//xxy
|
||||||
//xxx
|
//xxx
|
||||||
//xxx
|
//xxx
|
||||||
if ((((int)conn.X * (int)Constants.RegionSize) + conn.YEnd
|
if ((((int)conn.X * (int)Constants.RegionSize) + conn.XEnd
|
||||||
>= (regionConnections.X * (int)Constants.RegionSize))
|
>= (regionConnections.X * (int)Constants.RegionSize))
|
||||||
&& (((int)conn.Y * (int)Constants.RegionSize) + conn.YEnd
|
&& (((int)conn.Y * (int)Constants.RegionSize) + conn.YEnd
|
||||||
>= (regionConnections.Y * (int)Constants.RegionSize)))
|
>= (regionConnections.Y * (int)Constants.RegionSize)))
|
||||||
|
|
|
@ -259,6 +259,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Obsolete]
|
||||||
public XmlRpcResponse GetOnlineFriends(XmlRpcRequest request, IPEndPoint remoteClient)
|
public XmlRpcResponse GetOnlineFriends(XmlRpcRequest request, IPEndPoint remoteClient)
|
||||||
{
|
{
|
||||||
Hashtable hash = new Hashtable();
|
Hashtable hash = new Hashtable();
|
||||||
|
|
|
@ -484,6 +484,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
return friendsOnline;
|
return friendsOnline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Obsolete]
|
||||||
public List<UUID> GetOnlineFriends(UUID userID, List<string> friends)
|
public List<UUID> GetOnlineFriends(UUID userID, List<string> friends)
|
||||||
{
|
{
|
||||||
Hashtable hash = new Hashtable();
|
Hashtable hash = new Hashtable();
|
||||||
|
|
|
@ -13,7 +13,10 @@
|
||||||
; Change the connection string to your db details
|
; Change the connection string to your db details
|
||||||
;StorageProvider = "OpenSim.Data.MySQL.dll"
|
;StorageProvider = "OpenSim.Data.MySQL.dll"
|
||||||
;ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=***;Old Guids=true;"
|
;ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=***;Old Guids=true;"
|
||||||
; Uncomment this line if you are using MySQL and want to use a different database for estates
|
|
||||||
|
; Uncomment this line if you are using MySQL and want to use a different database for estates.
|
||||||
|
; The usual application for this is to allow estates to be spread out across multiple simulators by share the same database.
|
||||||
|
; Most people won't need to do this so only uncomment if you know what you're doing.
|
||||||
;EstateConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=***;Old Guids=true;"
|
;EstateConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=***;Old Guids=true;"
|
||||||
|
|
||||||
; MSSQL
|
; MSSQL
|
||||||
|
|
Loading…
Reference in New Issue