get rid of appearance null checks - this is never null
parent
8c703022c1
commit
899d109e82
|
@ -885,11 +885,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
float localAVHeight = 1.56f;
|
float localAVHeight = 1.56f;
|
||||||
if (m_appearance != null)
|
|
||||||
{
|
|
||||||
if (m_appearance.AvatarHeight > 0)
|
if (m_appearance.AvatarHeight > 0)
|
||||||
localAVHeight = m_appearance.AvatarHeight;
|
localAVHeight = m_appearance.AvatarHeight;
|
||||||
}
|
|
||||||
|
|
||||||
float posZLimit = 0;
|
float posZLimit = 0;
|
||||||
|
|
||||||
|
@ -903,26 +900,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
AbsolutePosition = pos;
|
AbsolutePosition = pos;
|
||||||
|
|
||||||
if (m_appearance != null)
|
|
||||||
{
|
|
||||||
if (m_appearance.AvatarHeight > 0)
|
if (m_appearance.AvatarHeight > 0)
|
||||||
SetHeight(m_appearance.AvatarHeight);
|
SetHeight(m_appearance.AvatarHeight);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_log.ErrorFormat("[SCENE PRESENCE]: null appearance in MakeRoot in {0}", Scene.RegionInfo.RegionName);
|
|
||||||
// emergency; this really shouldn't happen
|
|
||||||
m_appearance = new AvatarAppearance();
|
|
||||||
}
|
|
||||||
|
|
||||||
AddToPhysicalScene(isFlying);
|
AddToPhysicalScene(isFlying);
|
||||||
|
|
||||||
if (m_appearance != null)
|
|
||||||
{
|
|
||||||
if (m_appearance.AvatarHeight > 0)
|
|
||||||
SetHeight(m_appearance.AvatarHeight);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_forceFly)
|
if (m_forceFly)
|
||||||
{
|
{
|
||||||
m_physicsActor.Flying = true;
|
m_physicsActor.Flying = true;
|
||||||
|
@ -1053,11 +1035,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
Velocity = Vector3.Zero;
|
Velocity = Vector3.Zero;
|
||||||
AbsolutePosition = pos;
|
AbsolutePosition = pos;
|
||||||
AddToPhysicalScene(isFlying);
|
AddToPhysicalScene(isFlying);
|
||||||
if (m_appearance != null)
|
|
||||||
{
|
// FIXME: Move me into AddToPhysicalScene
|
||||||
if (m_appearance.AvatarHeight > 0)
|
if (m_appearance.AvatarHeight > 0)
|
||||||
SetHeight(m_appearance.AvatarHeight);
|
SetHeight(m_appearance.AvatarHeight);
|
||||||
}
|
|
||||||
|
|
||||||
SendTerseUpdateToAllClients();
|
SendTerseUpdateToAllClients();
|
||||||
}
|
}
|
||||||
|
@ -1071,11 +1052,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
RemoveFromPhysicalScene();
|
RemoveFromPhysicalScene();
|
||||||
AbsolutePosition = pos;
|
AbsolutePosition = pos;
|
||||||
AddToPhysicalScene(isFlying);
|
AddToPhysicalScene(isFlying);
|
||||||
if (m_appearance != null)
|
|
||||||
{
|
|
||||||
if (m_appearance.AvatarHeight > 0)
|
if (m_appearance.AvatarHeight > 0)
|
||||||
SetHeight(m_appearance.AvatarHeight);
|
SetHeight(m_appearance.AvatarHeight);
|
||||||
}
|
|
||||||
|
|
||||||
SendTerseUpdateToAllClients();
|
SendTerseUpdateToAllClients();
|
||||||
}
|
}
|
||||||
|
@ -1129,7 +1108,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
#region Event Handlers
|
#region Event Handlers
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets avatar height in the phyiscs plugin
|
/// Sets avatar height in the physics plugin
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void SetHeight(float height)
|
public void SetHeight(float height)
|
||||||
{
|
{
|
||||||
|
@ -1846,7 +1825,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_parentID = 0;
|
m_parentID = 0;
|
||||||
SendAvatarDataToAllAgents();
|
SendAvatarDataToAllAgents();
|
||||||
m_requestedSitTargetID = 0;
|
m_requestedSitTargetID = 0;
|
||||||
if (m_physicsActor != null && m_appearance != null)
|
|
||||||
|
if (m_physicsActor != null)
|
||||||
{
|
{
|
||||||
if (m_appearance.AvatarHeight > 0)
|
if (m_appearance.AvatarHeight > 0)
|
||||||
SetHeight(m_appearance.AvatarHeight);
|
SetHeight(m_appearance.AvatarHeight);
|
||||||
|
|
|
@ -357,6 +357,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||||
agent.InventoryFolder = UUID.Zero;
|
agent.InventoryFolder = UUID.Zero;
|
||||||
agent.startpos = Vector3.Zero;
|
agent.startpos = Vector3.Zero;
|
||||||
agent.CapsPath = GetRandomCapsObjectPath();
|
agent.CapsPath = GetRandomCapsObjectPath();
|
||||||
|
agent.Appearance = new AvatarAppearance();
|
||||||
|
|
||||||
acd1 = agent;
|
acd1 = agent;
|
||||||
}
|
}
|
||||||
|
|
|
@ -357,6 +357,7 @@ namespace OpenSim.Tests.Common
|
||||||
agentData.startpos = Vector3.Zero;
|
agentData.startpos = Vector3.Zero;
|
||||||
agentData.CapsPath = "http://wibble.com";
|
agentData.CapsPath = "http://wibble.com";
|
||||||
agentData.ServiceURLs = new Dictionary<string, object>();
|
agentData.ServiceURLs = new Dictionary<string, object>();
|
||||||
|
agentData.Appearance = new AvatarAppearance();
|
||||||
|
|
||||||
return agentData;
|
return agentData;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue