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/Scenes/ScenePresence.cs | |
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/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 22 |
1 files changed, 16 insertions, 6 deletions
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> |