Merge branch 'master' into careminster
Conflicts: OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.csavinationmerge
commit
3f42183797
|
@ -311,7 +311,7 @@ namespace OpenSim.Framework
|
|||
if (args.ContainsKey("packed_appearance") && (args["packed_appearance"].Type == OSDType.Map))
|
||||
{
|
||||
Appearance.Unpack((OSDMap)args["packed_appearance"]);
|
||||
m_log.InfoFormat("[AGENTCIRCUITDATA] unpacked appearance");
|
||||
// m_log.InfoFormat("[AGENTCIRCUITDATA] unpacked appearance");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -335,7 +335,7 @@ namespace OpenSim.Framework
|
|||
|
||||
public virtual OSDMap Pack()
|
||||
{
|
||||
m_log.InfoFormat("[CHILDAGENTDATAUPDATE] Pack data");
|
||||
// m_log.InfoFormat("[CHILDAGENTDATAUPDATE] Pack data");
|
||||
|
||||
OSDMap args = new OSDMap();
|
||||
args["message_type"] = OSD.FromString("AgentData");
|
||||
|
|
|
@ -89,19 +89,6 @@ namespace OpenSim.Framework
|
|||
|
||||
string GetSimulatorVersion();
|
||||
|
||||
/// <summary>
|
||||
/// Is the agent denoted by the given agentID a child presence in this scene?
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Used by ClientView when a 'kick everyone' or 'estate message' occurs
|
||||
/// </remarks>
|
||||
/// <param name="avatarID">AvatarID to lookup</param>
|
||||
/// <returns>true if the presence is a child agent, false if the presence is a root exception</returns>
|
||||
/// <exception cref="System.NullReferenceException">
|
||||
/// Thrown if the agent does not exist.
|
||||
/// </exception>
|
||||
bool PresenceChildStatus(UUID agentId);
|
||||
|
||||
bool TryGetScenePresence(UUID agentID, out object scenePresence);
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -47,6 +47,13 @@ namespace OpenSim.Framework
|
|||
/// </summary>
|
||||
PresenceType PresenceType { get; }
|
||||
|
||||
/// <summary>
|
||||
/// If true, then the agent has no avatar in the scene.
|
||||
/// The agent exists to relay data from a region that neighbours the current position of the user's avatar.
|
||||
/// Occasionally data is relayed, such as which a user clicks an item in a neighbouring region.
|
||||
/// </summary>
|
||||
bool IsChildAgent { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Avatar appearance data.
|
||||
/// </summary>
|
||||
|
|
|
@ -548,7 +548,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
|
||||
public void Kick(string message)
|
||||
{
|
||||
if (!ChildAgentStatus())
|
||||
if (!SceneAgent.IsChildAgent)
|
||||
{
|
||||
KickUserPacket kupack = (KickUserPacket)PacketPool.Instance.GetPacket(PacketType.KickUser);
|
||||
kupack.UserInfo.AgentID = AgentId;
|
||||
|
@ -2465,7 +2465,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
/// <param name="Message"></param>
|
||||
public void SendBlueBoxMessage(UUID FromAvatarID, String FromAvatarName, String Message)
|
||||
{
|
||||
if (!ChildAgentStatus())
|
||||
if (!SceneAgent.IsChildAgent)
|
||||
SendInstantMessage(new GridInstantMessage(null, FromAvatarID, FromAvatarName, AgentId, 1, Message, false, new Vector3()));
|
||||
|
||||
//SendInstantMessage(FromAvatarID, fromSessionID, Message, AgentId, SessionId, FromAvatarName, (byte)21,(uint) Util.UnixTimeSinceEpoch());
|
||||
|
@ -5112,14 +5112,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
return 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This is a utility method used by single states to not duplicate kicks and blue card of death messages.
|
||||
/// </summary>
|
||||
public bool ChildAgentStatus()
|
||||
{
|
||||
return m_scene.PresenceChildStatus(AgentId);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
|
@ -11750,7 +11742,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
if (logPacket)
|
||||
m_log.DebugFormat(
|
||||
"[CLIENT]: PACKET OUT to {0} ({1}) in {2} - {3}",
|
||||
Name, ChildAgentStatus() ? "child" : "root ", m_scene.RegionInfo.RegionName, packet.Type);
|
||||
Name, SceneAgent.IsChildAgent ? "child" : "root ", m_scene.RegionInfo.RegionName, packet.Type);
|
||||
}
|
||||
|
||||
m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting, method);
|
||||
|
@ -11807,7 +11799,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
if (logPacket)
|
||||
m_log.DebugFormat(
|
||||
"[CLIENT]: PACKET IN from {0} ({1}) in {2} - {3}",
|
||||
Name, ChildAgentStatus() ? "child" : "root ", m_scene.RegionInfo.RegionName, packet.Type);
|
||||
Name, SceneAgent.IsChildAgent ? "child" : "root ", m_scene.RegionInfo.RegionName, packet.Type);
|
||||
}
|
||||
|
||||
if (!ProcessPacketMethod(packet))
|
||||
|
|
|
@ -320,10 +320,8 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
|||
|
||||
defonly = false; // found a non-default texture reference
|
||||
|
||||
if (!CheckBakedTextureAsset(sp, face.TextureID, idx))
|
||||
if (m_scene.AssetService.Get(face.TextureID.ToString()) == null)
|
||||
{
|
||||
// the asset didn't exist if we are only checking, then we found a bad
|
||||
// one and we're done otherwise, ask for a rebake
|
||||
if (checkonly)
|
||||
return false;
|
||||
|
||||
|
@ -337,24 +335,6 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
|||
return (defonly ? false : true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks for the existance of a baked texture asset and
|
||||
/// requests the viewer rebake if the asset is not found
|
||||
/// </summary>
|
||||
/// <param name="sp"></param>
|
||||
/// <param name="textureID"></param>
|
||||
/// <param name="idx"></param>
|
||||
private bool CheckBakedTextureAsset(IScenePresence sp, UUID textureID, int idx)
|
||||
{
|
||||
if (m_scene.AssetService.Get(textureID.ToString()) == null)
|
||||
{
|
||||
m_log.InfoFormat("[AVFACTORY]: Missing baked texture {0} ({1}) for avatar {2}",
|
||||
textureID, idx, sp.Name);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private Dictionary<BakeType, Primitive.TextureEntryFace> GetBakedTextureFaces(ScenePresence sp)
|
||||
{
|
||||
if (sp.IsChildAgent)
|
||||
|
|
|
@ -787,7 +787,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
}
|
||||
|
||||
m_log.Info("[SCENE]: Using the " + m_priorityScheme + " prioritization scheme");
|
||||
m_log.InfoFormat("[SCENE]: Using the {0} prioritization scheme", m_priorityScheme);
|
||||
|
||||
#endregion Interest Management
|
||||
|
||||
|
@ -918,9 +918,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
else
|
||||
{
|
||||
m_log.Info("[INTERGRID]: Got notice about far away Region: " + otherRegion.RegionName.ToString() +
|
||||
" at (" + otherRegion.RegionLocX.ToString() + ", " +
|
||||
otherRegion.RegionLocY.ToString() + ")");
|
||||
m_log.InfoFormat(
|
||||
"[INTERGRID]: Got notice about far away Region: {0} at ({1}, {2})",
|
||||
otherRegion.RegionName, otherRegion.RegionLocX, otherRegion.RegionLocY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1414,7 +1414,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
catch (AccessViolationException e)
|
||||
{
|
||||
m_log.Error("[REGION]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName);
|
||||
m_log.ErrorFormat(
|
||||
"[REGION]: Failed on region {0} with exception {1}{2}",
|
||||
RegionInfo.RegionName, e.Message, e.StackTrace);
|
||||
}
|
||||
//catch (NullReferenceException e)
|
||||
//{
|
||||
|
@ -1422,11 +1424,15 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
//}
|
||||
catch (InvalidOperationException e)
|
||||
{
|
||||
m_log.Error("[REGION]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName);
|
||||
m_log.ErrorFormat(
|
||||
"[REGION]: Failed on region {0} with exception {1}{2}",
|
||||
RegionInfo.RegionName, e.Message, e.StackTrace);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Error("[REGION]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName);
|
||||
m_log.ErrorFormat(
|
||||
"[REGION]: Failed on region {0} with exception {1}{2}",
|
||||
RegionInfo.RegionName, e.Message, e.StackTrace);
|
||||
}
|
||||
|
||||
maintc = Util.EnvironmentTickCountSubtract(maintc);
|
||||
|
@ -1652,7 +1658,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
m_log.Warn("[TERRAIN]: Scene.cs: LoadWorldMap() - Failed with exception " + e.ToString() + " Regenerating");
|
||||
m_log.WarnFormat(
|
||||
"[TERRAIN]: Scene.cs: LoadWorldMap() - Regenerating as failed with exception {0}{1}",
|
||||
e.Message, e.StackTrace);
|
||||
|
||||
// Non standard region size. If there's an old terrain in the database, it might read past the buffer
|
||||
#pragma warning disable 0162
|
||||
|
@ -1665,7 +1673,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Warn("[TERRAIN]: Scene.cs: LoadWorldMap() - Failed with exception " + e.ToString());
|
||||
m_log.WarnFormat(
|
||||
"[TERRAIN]: Scene.cs: LoadWorldMap() - Failed with exception {0}{1}", e.Message, e.StackTrace);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1739,7 +1748,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
List<SceneObjectGroup> PrimsFromDB = SimulationDataService.LoadObjects(regionID);
|
||||
|
||||
m_log.Info("[SCENE]: Loaded " + PrimsFromDB.Count + " objects from the datastore");
|
||||
m_log.InfoFormat("[SCENE]: Loaded {0} objects from the datastore", PrimsFromDB.Count);
|
||||
|
||||
foreach (SceneObjectGroup group in PrimsFromDB)
|
||||
{
|
||||
|
@ -1753,7 +1762,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
// group.CheckSculptAndLoad();
|
||||
}
|
||||
|
||||
m_log.Info("[SCENE]: Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)");
|
||||
LoadingPrims = false;
|
||||
EventManager.TriggerPrimsLoaded(this);
|
||||
}
|
||||
|
@ -2413,7 +2421,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.WarnFormat("[SCENE]: Problem casting object: " + e.ToString());
|
||||
m_log.WarnFormat("[SCENE]: Problem casting object, exception {0}{1}", e.Message, e.StackTrace);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -2496,8 +2504,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
int flags = GetUserFlags(sceneObject.OwnerID);
|
||||
if (m_regInfo.EstateSettings.IsBanned(sceneObject.OwnerID, flags))
|
||||
{
|
||||
m_log.Info("[INTERREGION]: Denied prim crossing for " +
|
||||
"banned avatar");
|
||||
m_log.InfoFormat("[INTERREGION]: Denied prim crossing for banned avatar {0}", sceneObject.OwnerID);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -2565,8 +2572,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
// Deny non attachments based on parcel settings
|
||||
//
|
||||
m_log.Info("[INTERREGION]: Denied prim crossing " +
|
||||
"because of parcel settings");
|
||||
m_log.Info("[INTERREGION]: Denied prim crossing because of parcel settings");
|
||||
|
||||
DeleteSceneObject(sceneObject, false);
|
||||
|
||||
|
@ -2629,7 +2635,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
// connected.
|
||||
if (sp == null)
|
||||
{
|
||||
m_log.Debug("[SCENE]: Adding new child scene presence " + client.Name + " to scene " + RegionInfo.RegionName);
|
||||
m_log.DebugFormat(
|
||||
"[SCENE]: Adding new child scene presence {0} to scene {1}", client.Name, RegionInfo.RegionName);
|
||||
|
||||
m_clientManager.Add(client);
|
||||
SubscribeToClientEvents(client);
|
||||
|
@ -3277,7 +3284,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Error("[SCENE] Scene.cs:RemoveClient exception: " + e.ToString());
|
||||
m_log.ErrorFormat("[SCENE] Scene.cs:RemoveClient exception {0}{1}", e.Message, e.StackTrace);
|
||||
}
|
||||
m_log.Debug("[Scene] Done. Firing RemoveCircuit");
|
||||
m_authenticateHandler.RemoveCircuit(avatar.ControllingClient.CircuitCode);
|
||||
|
@ -3426,7 +3433,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("[CONNECTION BEGIN]: Exception verifying presence " + e.ToString());
|
||||
m_log.ErrorFormat(
|
||||
"[CONNECTION BEGIN]: Exception verifying presence {0}{1}", e.Message, e.StackTrace);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -3443,7 +3451,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("[CONNECTION BEGIN]: Exception authorizing user " + e.ToString());
|
||||
m_log.ErrorFormat(
|
||||
"[CONNECTION BEGIN]: Exception authorizing user {0}{1}", e.Message, e.StackTrace);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -3664,7 +3673,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.ErrorFormat("[CONNECTION BEGIN]: Estate Settings is null!");
|
||||
}
|
||||
|
||||
IGroupsModule groupsModule =
|
||||
RequestModuleInterface<IGroupsModule>();
|
||||
|
@ -3682,7 +3693,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
agentGroups.Add(GroupMembership[i].GroupID);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.ErrorFormat("[CONNECTION BEGIN]: GroupMembership is null!");
|
||||
}
|
||||
}
|
||||
|
||||
bool groupAccess = false;
|
||||
|
@ -3700,7 +3713,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.ErrorFormat("[CONNECTION BEGIN]: EstateGroups is null!");
|
||||
}
|
||||
|
||||
if (!m_regInfo.EstateSettings.PublicAccess &&
|
||||
!m_regInfo.EstateSettings.HasAccess(agent.AgentID) &&
|
||||
|
@ -3817,7 +3832,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("[SCENE]: Unable to do agent crossing, exception {0}", e);
|
||||
m_log.ErrorFormat("[SCENE]: Unable to do agent crossing, exception {0}{1}", e.Message, e.StackTrace);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -4143,7 +4158,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// <param name="cmdparams"></param>
|
||||
public void HandleEditCommand(string[] cmdparams)
|
||||
{
|
||||
m_log.Debug("Searching for Primitive: '" + cmdparams[2] + "'");
|
||||
m_log.DebugFormat("Searching for Primitive: '{0}'", cmdparams[2]);
|
||||
|
||||
EntityBase[] entityList = GetEntities();
|
||||
foreach (EntityBase ent in entityList)
|
||||
|
@ -4159,7 +4174,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
new Vector3(Convert.ToSingle(cmdparams[3]), Convert.ToSingle(cmdparams[4]),
|
||||
Convert.ToSingle(cmdparams[5])));
|
||||
|
||||
m_log.Debug("Edited scale of Primitive: " + part.Name);
|
||||
m_log.DebugFormat("Edited scale of Primitive: {0}", part.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4188,7 +4203,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
return LandChannel.GetLandObject((int)x, (int)y).LandData;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region Script Engine
|
||||
|
@ -4367,17 +4381,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
return m_sceneGraph.GetScenePresence(localID);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if scene presence is a child (no avatar in this scene)
|
||||
/// </summary>
|
||||
/// <param name="avatarID"></param>
|
||||
/// <returns></returns>
|
||||
public override bool PresenceChildStatus(UUID avatarID)
|
||||
{
|
||||
ScenePresence sp;
|
||||
return TryGetScenePresence(avatarID, out sp) && sp.IsChildAgent;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Performs action on all avatars in the scene (root scene presences)
|
||||
/// Avatars may be an NPC or a 'real' client.
|
||||
|
|
|
@ -213,11 +213,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
|
||||
#region admin stuff
|
||||
|
||||
public virtual bool PresenceChildStatus(UUID avatarID)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public abstract void OtherRegionUp(GridRegion otherRegion);
|
||||
|
||||
|
|
|
@ -624,19 +624,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// If this is true, agent doesn't have a representation in this scene.
|
||||
/// this is an agent 'looking into' this scene from a nearby scene(region)
|
||||
///
|
||||
/// if False, this agent has a representation in this scene
|
||||
/// </summary>
|
||||
private bool m_isChildAgent = true;
|
||||
|
||||
public bool IsChildAgent
|
||||
{
|
||||
get { return m_isChildAgent; }
|
||||
set { m_isChildAgent = value; }
|
||||
}
|
||||
public bool IsChildAgent { get; set; }
|
||||
|
||||
public uint ParentID
|
||||
{
|
||||
|
@ -753,6 +741,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
AttachmentsSyncLock = new Object();
|
||||
|
||||
IsChildAgent = true;
|
||||
m_sendCourseLocationsMethod = SendCoarseLocationsDefault;
|
||||
Animator = new ScenePresenceAnimator(this);
|
||||
PresenceType = type;
|
||||
|
|
|
@ -219,7 +219,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden
|
|||
{
|
||||
if (client is LLClientView)
|
||||
{
|
||||
bool isChild = scene.PresenceChildStatus(client.AgentId);
|
||||
bool isChild = client.SceneAgent.IsChildAgent;
|
||||
if (isChild && !showChildren)
|
||||
return;
|
||||
|
||||
|
@ -308,7 +308,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden
|
|||
{
|
||||
if (client is IStatsCollector)
|
||||
{
|
||||
bool isChild = scene.PresenceChildStatus(client.AgentId);
|
||||
bool isChild = client.SceneAgent.IsChildAgent;
|
||||
if (isChild && !showChildren)
|
||||
return;
|
||||
|
||||
|
@ -404,7 +404,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden
|
|||
firstClient = false;
|
||||
}
|
||||
|
||||
bool isChild = scene.PresenceChildStatus(client.AgentId);
|
||||
bool isChild = client.SceneAgent.IsChildAgent;
|
||||
if (isChild && !showChildren)
|
||||
return;
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
|
|||
public const string SHOW_APPEARANCE_FORMAT = "{0,-9} {1}";
|
||||
|
||||
private Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>();
|
||||
private IAvatarFactoryModule m_avatarFactory;
|
||||
// private IAvatarFactoryModule m_avatarFactory;
|
||||
|
||||
public string Name { get { return "Appearance Information Module"; } }
|
||||
|
||||
|
|
Loading…
Reference in New Issue