Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim

viewer-2-initial-appearance
Melanie 2010-09-13 23:35:27 +01:00
commit b2e50474dc
9 changed files with 45 additions and 52 deletions

View File

@ -5199,11 +5199,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
catch (Exception e) catch (Exception e)
{ {
m_log.Error("[GENERICMESSAGE] " + e); m_log.ErrorFormat(
"[LLCLIENTVIEW]: Exeception when handling generic message {0}{1}", e.Message, e.StackTrace);
} }
} }
} }
m_log.Error("[GENERICMESSAGE] Not handling GenericMessage with method-type of: " + method);
//m_log.Debug("[LLCLIENTVIEW]: Not handling GenericMessage with method-type of: " + method);
return false; return false;
} }

View File

@ -695,9 +695,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (packet.Header.Reliable && !udpClient.PacketArchive.TryEnqueue(packet.Header.Sequence)) if (packet.Header.Reliable && !udpClient.PacketArchive.TryEnqueue(packet.Header.Sequence))
{ {
if (packet.Header.Resent) if (packet.Header.Resent)
m_log.Debug("[LLUDPSERVER]: Received a resend of already processed packet #" + packet.Header.Sequence + ", type: " + packet.Type); m_log.DebugFormat(
else "[LLUDPSERVER]: Received a resend of already processed packet #{0}, type {1} from {2}",
m_log.Warn("[LLUDPSERVER]: Received a duplicate (not marked as resend) of packet #" + packet.Header.Sequence + ", type: " + packet.Type); packet.Header.Sequence, packet.Type, client.Name);
else
m_log.WarnFormat(
"[LLUDPSERVER]: Received a duplicate (not marked as resend) of packet #{0}, type {1} from {2}",
packet.Header.Sequence, packet.Type, client.Name);
// Avoid firing a callback twice for the same packet // Avoid firing a callback twice for the same packet
return; return;

View File

@ -190,7 +190,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
itemID = group.GetFromItemID(); itemID = group.GetFromItemID();
} }
SetAttachmentInventoryStatus(remoteClient, AttachmentPt, itemID, group); ShowAttachInUserInventory(remoteClient, AttachmentPt, itemID, group);
AttachToAgent(sp, group, AttachmentPt, attachPos, silent); AttachToAgent(sp, group, AttachmentPt, attachPos, silent);
} }
@ -218,24 +218,24 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
public UUID RezSingleAttachmentFromInventory(IClientAPI remoteClient, UUID itemID, uint AttachmentPt) public UUID RezSingleAttachmentFromInventory(IClientAPI remoteClient, UUID itemID, uint AttachmentPt)
{ {
m_log.DebugFormat("[ATTACHMENTS MODULE]: Rezzing single attachment from item {0} for {1}", itemID, remoteClient.Name);
return RezSingleAttachmentFromInventory(remoteClient, itemID, AttachmentPt, true); return RezSingleAttachmentFromInventory(remoteClient, itemID, AttachmentPt, true);
} }
public UUID RezSingleAttachmentFromInventory( public UUID RezSingleAttachmentFromInventory(
IClientAPI remoteClient, UUID itemID, uint AttachmentPt, bool updateInventoryStatus) IClientAPI remoteClient, UUID itemID, uint AttachmentPt, bool updateInventoryStatus)
{ {
m_log.DebugFormat(
"[ATTACHMENTS MODULE]: Rezzing attachment to point {0} from item {1} for {2}",
(AttachmentPoint)AttachmentPt, itemID, remoteClient.Name);
SceneObjectGroup att = RezSingleAttachmentFromInventoryInternal(remoteClient, itemID, AttachmentPt); SceneObjectGroup att = RezSingleAttachmentFromInventoryInternal(remoteClient, itemID, AttachmentPt);
if (updateInventoryStatus) if (updateInventoryStatus)
{ {
if (att == null) if (att == null)
{
ShowDetachInUserInventory(itemID, remoteClient); ShowDetachInUserInventory(itemID, remoteClient);
} else
ShowAttachInUserInventory(att, remoteClient, itemID, AttachmentPt);
SetAttachmentInventoryStatus(att, remoteClient, itemID, AttachmentPt);
} }
if (null == att) if (null == att)
@ -300,12 +300,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
return null; return null;
} }
public UUID SetAttachmentInventoryStatus( /// <summary>
/// Update the user inventory to the attachment of an item
/// </summary>
/// <param name="att"></param>
/// <param name="remoteClient"></param>
/// <param name="itemID"></param>
/// <param name="AttachmentPt"></param>
/// <returns></returns>
protected UUID ShowAttachInUserInventory(
SceneObjectGroup att, IClientAPI remoteClient, UUID itemID, uint AttachmentPt) SceneObjectGroup att, IClientAPI remoteClient, UUID itemID, uint AttachmentPt)
{ {
m_log.DebugFormat( // m_log.DebugFormat(
"[ATTACHMENTS MODULE]: Updating inventory of {0} to show attachment of {1} (item ID {2})", // "[ATTACHMENTS MODULE]: Updating inventory of {0} to show attachment of {1} (item ID {2})",
remoteClient.Name, att.Name, itemID); // remoteClient.Name, att.Name, itemID);
if (!att.IsDeleted) if (!att.IsDeleted)
AttachmentPt = att.RootPart.AttachmentPoint; AttachmentPt = att.RootPart.AttachmentPoint;
@ -329,7 +337,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
/// <param name="AttachmentPt"></param> /// <param name="AttachmentPt"></param>
/// <param name="itemID"></param> /// <param name="itemID"></param>
/// <param name="att"></param> /// <param name="att"></param>
public void SetAttachmentInventoryStatus( protected void ShowAttachInUserInventory(
IClientAPI remoteClient, uint AttachmentPt, UUID itemID, SceneObjectGroup att) IClientAPI remoteClient, uint AttachmentPt, UUID itemID, SceneObjectGroup att)
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
@ -387,7 +395,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
// Save avatar attachment information // Save avatar attachment information
if (m_scene.AvatarFactory != null) if (m_scene.AvatarFactory != null)
{ {
m_log.Debug("[ATTACHMENTS MODULE]: Dettaching from UserID: " + remoteClient.AgentId + ", ItemID: " + itemID); m_log.Debug("[ATTACHMENTS MODULE]: Detaching from UserID: " + remoteClient.AgentId + ", ItemID: " + itemID);
m_scene.AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance); m_scene.AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance);
} }
} }

View File

@ -198,7 +198,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
public void UpdateDatabase(UUID user, AvatarAppearance appearance) public void UpdateDatabase(UUID user, AvatarAppearance appearance)
{ {
m_log.DebugFormat("[APPEARANCE]: UpdateDatabase"); //m_log.DebugFormat("[APPEARANCE]: UpdateDatabase");
AvatarData adata = new AvatarData(appearance); AvatarData adata = new AvatarData(appearance);
m_scene.AvatarService.SetAvatar(user, adata); m_scene.AvatarService.SetAvatar(user, adata);
} }

View File

@ -109,17 +109,6 @@ namespace OpenSim.Region.Framework.Interfaces
/// <param name="itemID"></param> /// <param name="itemID"></param>
/// <param name="remoteClient"></param> /// <param name="remoteClient"></param>
void DetachSingleAttachmentToGround(UUID itemID, IClientAPI remoteClient); void DetachSingleAttachmentToGround(UUID itemID, IClientAPI remoteClient);
/// <summary>
/// Update the user inventory to the attachment of an item
/// </summary>
/// <param name="att"></param>
/// <param name="remoteClient"></param>
/// <param name="itemID"></param>
/// <param name="AttachmentPt"></param>
/// <returns></returns>
UUID SetAttachmentInventoryStatus(
SceneObjectGroup att, IClientAPI remoteClient, UUID itemID, uint AttachmentPt);
/// <summary> /// <summary>
/// Update the user inventory to show a detach. /// Update the user inventory to show a detach.

View File

@ -1319,6 +1319,7 @@ namespace OpenSim.Region.Framework.Scenes
if (m_frame % m_update_presences == 0) if (m_frame % m_update_presences == 0)
m_sceneGraph.UpdatePresences(); m_sceneGraph.UpdatePresences();
// Coarse locations relate to positions of green dots on the mini-map (on a SecondLife client)
if (m_frame % m_update_coarse_locations == 0) if (m_frame % m_update_coarse_locations == 0)
{ {
List<Vector3> coarseLocations; List<Vector3> coarseLocations;
@ -1336,9 +1337,12 @@ namespace OpenSim.Region.Framework.Scenes
m_sceneGraph.UpdatePreparePhysics(); m_sceneGraph.UpdatePreparePhysics();
physicsMS2 = Util.EnvironmentTickCountSubtract(tmpPhysicsMS2); physicsMS2 = Util.EnvironmentTickCountSubtract(tmpPhysicsMS2);
// Apply any pending avatar force input to the avatar's velocity
if (m_frame % m_update_entitymovement == 0) if (m_frame % m_update_entitymovement == 0)
m_sceneGraph.UpdateScenePresenceMovement(); m_sceneGraph.UpdateScenePresenceMovement();
// Perform the main physics update. This will do the actual work of moving objects and avatars according to their
// velocity
int tmpPhysicsMS = Util.EnvironmentTickCount(); int tmpPhysicsMS = Util.EnvironmentTickCount();
if (m_frame % m_update_physics == 0) if (m_frame % m_update_physics == 0)
{ {

View File

@ -522,16 +522,6 @@ namespace OpenSim.Region.Framework.Scenes
m_parentScene.AttachmentsModule.DetachSingleAttachmentToGround(group.UUID, remoteClient); m_parentScene.AttachmentsModule.DetachSingleAttachmentToGround(group.UUID, remoteClient);
} }
protected internal void DetachObject(uint objectLocalID, IClientAPI remoteClient)
{
SceneObjectGroup group = GetGroupByPrim(objectLocalID);
if (group != null)
{
//group.DetachToGround();
m_parentScene.AttachmentsModule.ShowDetachInUserInventory(group.GetFromItemID(), remoteClient);
}
}
protected internal void HandleUndo(IClientAPI remoteClient, UUID primId) protected internal void HandleUndo(IClientAPI remoteClient, UUID primId)
{ {
if (primId != UUID.Zero) if (primId != UUID.Zero)

View File

@ -1430,9 +1430,9 @@ namespace OpenSim.Region.Framework.Scenes
// don't backup while it's selected or you're asking for changes mid stream. // don't backup while it's selected or you're asking for changes mid stream.
if (isTimeToPersist() || forcedBackup) if (isTimeToPersist() || forcedBackup)
{ {
m_log.DebugFormat( // m_log.DebugFormat(
"[SCENE]: Storing {0}, {1} in {2}", // "[SCENE]: Storing {0}, {1} in {2}",
Name, UUID, m_scene.RegionInfo.RegionName); // Name, UUID, m_scene.RegionInfo.RegionName);
SceneObjectGroup backup_group = Copy(false); SceneObjectGroup backup_group = Copy(false);
backup_group.RootPart.Velocity = RootPart.Velocity; backup_group.RootPart.Velocity = RootPart.Velocity;

View File

@ -1522,6 +1522,8 @@ namespace OpenSim.Region.Framework.Scenes
} }
} }
// If the agent update does move the avatar, then calculate the force ready for the velocity update,
// which occurs later in the main scene loop
if (update_movementflag || (update_rotation && DCFlagKeyPressed)) if (update_movementflag || (update_rotation && DCFlagKeyPressed))
{ {
// m_log.DebugFormat("{0} {1}", update_movementflag, (update_rotation && DCFlagKeyPressed)); // m_log.DebugFormat("{0} {1}", update_movementflag, (update_rotation && DCFlagKeyPressed));
@ -3727,8 +3729,8 @@ namespace OpenSim.Region.Framework.Scenes
return; return;
UUID itemID = m_appearance.GetAttachedItem(p); UUID itemID = m_appearance.GetAttachedItem(p);
UUID assetID = m_appearance.GetAttachedAsset(p);
//UUID assetID = m_appearance.GetAttachedAsset(p);
// For some reason assetIDs are being written as Zero's in the DB -- need to track tat down // For some reason assetIDs are being written as Zero's in the DB -- need to track tat down
// But they're not used anyway, the item is being looked up for now, so let's proceed. // But they're not used anyway, the item is being looked up for now, so let's proceed.
//if (UUID.Zero == assetID) //if (UUID.Zero == assetID)
@ -3739,17 +3741,11 @@ namespace OpenSim.Region.Framework.Scenes
try try
{ {
// Rez from inventory m_scene.AttachmentsModule.RezSingleAttachmentFromInventory(ControllingClient, itemID, (uint)p);
UUID asset
= m_scene.AttachmentsModule.RezSingleAttachmentFromInventory(ControllingClient, itemID, (uint)p);
m_log.InfoFormat(
"[ATTACHMENT]: Rezzed attachment in point {0} from item {1} and asset {2} ({3})",
p, itemID, assetID, asset);
} }
catch (Exception e) catch (Exception e)
{ {
m_log.ErrorFormat("[ATTACHMENT]: Unable to rez attachment: {0}", e.ToString()); m_log.ErrorFormat("[ATTACHMENT]: Unable to rez attachment: {0}{1}", e.Message, e.StackTrace);
} }
} }
} }