diff options
author | Sean Dague | 2008-05-17 12:45:43 +0000 |
---|---|---|
committer | Sean Dague | 2008-05-17 12:45:43 +0000 |
commit | 06b1535ec5054068e65a085fabd25680d145594c (patch) | |
tree | 96f364dc52f998d90592276ee0b93b8f80665a4b /OpenSim/Region/Environment | |
parent | 0001303: [PATCH] Make prim owner and data show for prims not owned. From Mel... (diff) | |
download | opensim-SC-06b1535ec5054068e65a085fabd25680d145594c.zip opensim-SC-06b1535ec5054068e65a085fabd25680d145594c.tar.gz opensim-SC-06b1535ec5054068e65a085fabd25680d145594c.tar.bz2 opensim-SC-06b1535ec5054068e65a085fabd25680d145594c.tar.xz |
while this doesn't fix the initial no pants issue in grid (which still baffles me)
it does make setting appearance in grid stick.
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 33 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 22 |
2 files changed, 32 insertions, 23 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index bc80915..a798f40 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -1779,29 +1779,28 @@ namespace OpenSim.Region.Environment.Scenes | |||
1779 | 1779 | ||
1780 | protected virtual ScenePresence CreateAndAddScenePresence(IClientAPI client, bool child) | 1780 | protected virtual ScenePresence CreateAndAddScenePresence(IClientAPI client, bool child) |
1781 | { | 1781 | { |
1782 | AvatarAppearance appearance; | 1782 | AvatarAppearance appearance = CommsManager.UserService.GetUserAppearance(client.AgentId); |
1783 | GetAvatarAppearance(client, out appearance); | ||
1784 | 1783 | ||
1785 | ScenePresence avatar = m_innerScene.CreateAndAddScenePresence(client, child, appearance); | 1784 | ScenePresence avatar = m_innerScene.CreateAndAddScenePresence(client, child, appearance); |
1786 | 1785 | ||
1787 | return avatar; | 1786 | return avatar; |
1788 | } | 1787 | } |
1789 | 1788 | ||
1790 | protected void GetAvatarAppearance(IClientAPI client, out AvatarAppearance appearance) | 1789 | // protected void GetAvatarAppearance(IClientAPI client, out AvatarAppearance appearance) |
1791 | { | 1790 | // { |
1792 | appearance = CommsManager.UserService.GetUserAppearance(client.AgentId); | 1791 | // appearance = CommsManager.UserService.GetUserAppearance(client.AgentId); |
1793 | 1792 | ||
1794 | // if (m_AvatarFactory == null || | 1793 | // // if (m_AvatarFactory == null || |
1795 | // !m_AvatarFactory.TryGetAvatarAppearance(client.AgentId, out appearance)) | 1794 | // // !m_AvatarFactory.TryGetAvatarAppearance(client.AgentId, out appearance)) |
1796 | // { | 1795 | // // { |
1797 | // //not found Appearance | 1796 | // // //not found Appearance |
1798 | // m_log.Warn("[AVATAR DEBUGGING]: Couldn't fetch avatar appearance from factory, please report this to the opensim mantis"); | 1797 | // // m_log.Warn("[AVATAR DEBUGGING]: Couldn't fetch avatar appearance from factory, please report this to the opensim mantis"); |
1799 | // byte[] visualParams; | 1798 | // // byte[] visualParams; |
1800 | // AvatarWearable[] wearables; | 1799 | // // AvatarWearable[] wearables; |
1801 | // GetDefaultAvatarAppearance(out wearables, out visualParams); | 1800 | // // GetDefaultAvatarAppearance(out wearables, out visualParams); |
1802 | // appearance = new AvatarAppearance(client.AgentId, wearables, visualParams); | 1801 | // // appearance = new AvatarAppearance(client.AgentId, wearables, visualParams); |
1803 | // } | 1802 | // // } |
1804 | } | 1803 | // } |
1805 | 1804 | ||
1806 | /// <summary> | 1805 | /// <summary> |
1807 | /// Remove the given client from the scene. | 1806 | /// Remove the given client from the scene. |
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 6977083..5221914 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -1452,13 +1452,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1452 | /// </summary> | 1452 | /// </summary> |
1453 | public void SendInitialData() | 1453 | public void SendInitialData() |
1454 | { | 1454 | { |
1455 | // justincc - very temporary fix for the fact that m_apperance appears to be null at this point in grid mode | ||
1456 | LLObject.TextureEntry texture = AvatarAppearance.GetDefaultTexture(); | ||
1457 | if (null != m_appearance) | ||
1458 | texture = m_appearance.Texture; | ||
1459 | |||
1460 | m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid, LocalId, | 1455 | m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid, LocalId, |
1461 | m_pos, texture.ToBytes(), m_parentID); | 1456 | m_pos, m_appearance.Texture.ToBytes(), m_parentID); |
1462 | 1457 | ||
1463 | if (!m_isChildAgent) | 1458 | if (!m_isChildAgent) |
1464 | { | 1459 | { |
@@ -1467,11 +1462,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
1467 | 1462 | ||
1468 | SendFullUpdateToAllClients(); | 1463 | SendFullUpdateToAllClients(); |
1469 | SendAppearanceToAllOtherAgents(); | 1464 | SendAppearanceToAllOtherAgents(); |
1465 | // This is probably egregious | ||
1466 | m_controllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++); | ||
1470 | } | 1467 | } |
1471 | 1468 | ||
1472 | 1469 | ||
1473 | public void SetWearable(IClientAPI client, int wearableId, AvatarWearable wearable) | 1470 | public void SetWearable(IClientAPI client, int wearableId, AvatarWearable wearable) |
1474 | { | 1471 | { |
1472 | m_log.Info("[APPEARANCE] Setting wearable with client, wearableid, wearable"); | ||
1475 | m_appearance.SetWearable(wearableId, wearable); | 1473 | m_appearance.SetWearable(wearableId, wearable); |
1476 | m_scene.CommsManager.UserService.UpdateUserAppearance(client.AgentId, m_appearance); | 1474 | m_scene.CommsManager.UserService.UpdateUserAppearance(client.AgentId, m_appearance); |
1477 | client.SendWearables(m_appearance.Wearables, m_appearance.Serial++); | 1475 | client.SendWearables(m_appearance.Wearables, m_appearance.Serial++); |
@@ -1483,6 +1481,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1483 | /// <param name="client"></param> | 1481 | /// <param name="client"></param> |
1484 | public void SendOwnAppearance() | 1482 | public void SendOwnAppearance() |
1485 | { | 1483 | { |
1484 | m_log.Info("[APPEARANCE] Sending Own Appearace"); | ||
1486 | ControllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++); | 1485 | ControllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++); |
1487 | } | 1486 | } |
1488 | 1487 | ||
@@ -1514,19 +1513,30 @@ namespace OpenSim.Region.Environment.Scenes | |||
1514 | 1513 | ||
1515 | public void SetAppearance(byte[] texture, List<byte> visualParam) | 1514 | public void SetAppearance(byte[] texture, List<byte> visualParam) |
1516 | { | 1515 | { |
1516 | m_log.Warn("[APPEARANCE] Setting Appearance"); | ||
1517 | m_appearance.SetAppearance(texture, visualParam); | 1517 | m_appearance.SetAppearance(texture, visualParam); |
1518 | SetHeight(m_appearance.AvatarHeight); | 1518 | SetHeight(m_appearance.AvatarHeight); |
1519 | m_scene.CommsManager.UserService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance); | 1519 | m_scene.CommsManager.UserService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance); |
1520 | 1520 | ||
1521 | SendAppearanceToAllOtherAgents(); | 1521 | SendAppearanceToAllOtherAgents(); |
1522 | SendOwnAppearance(); | ||
1522 | } | 1523 | } |
1523 | 1524 | ||
1524 | public void SetWearable(int wearableId, AvatarWearable wearable) | 1525 | public void SetWearable(int wearableId, AvatarWearable wearable) |
1525 | { | 1526 | { |
1527 | m_log.Warn("[APPEARANCE] Setting Wearable"); | ||
1526 | m_appearance.SetWearable(wearableId, wearable); | 1528 | m_appearance.SetWearable(wearableId, wearable); |
1527 | m_scene.CommsManager.UserService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance); | 1529 | m_scene.CommsManager.UserService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance); |
1528 | } | 1530 | } |
1529 | 1531 | ||
1532 | // Because appearance setting is in a module, we actually need | ||
1533 | // to give it access to our appearance directly, otherwise we | ||
1534 | // get a synchronization issue. | ||
1535 | public AvatarAppearance Appearance { | ||
1536 | get { return m_appearance; } | ||
1537 | set { m_appearance = value; } | ||
1538 | } | ||
1539 | |||
1530 | /// <summary> | 1540 | /// <summary> |
1531 | /// | 1541 | /// |
1532 | /// </summary> | 1542 | /// </summary> |