Merge branch 'master' into httptests
commit
3b141e6e6f
|
@ -2587,10 +2587,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
bool update_movementflag = false;
|
bool update_movementflag = false;
|
||||||
|
bool mvToTarget = MovingToTarget;
|
||||||
if (agentData.UseClientAgentPosition)
|
if (agentData.UseClientAgentPosition)
|
||||||
{
|
{
|
||||||
MovingToTarget = (agentData.ClientAgentPosition - AbsolutePosition).Length() > 0.2f;
|
MovingToTarget = (agentData.ClientAgentPosition - AbsolutePosition).LengthSquared() > 0.04f;
|
||||||
MoveToPositionTarget = agentData.ClientAgentPosition;
|
MoveToPositionTarget = agentData.ClientAgentPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2604,6 +2604,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
newFlying = true;
|
newFlying = true;
|
||||||
else if (FlyDisabled)
|
else if (FlyDisabled)
|
||||||
newFlying = false;
|
newFlying = false;
|
||||||
|
else if(mvToTarget)
|
||||||
|
newFlying = actor.Flying;
|
||||||
else
|
else
|
||||||
newFlying = ((flags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0);
|
newFlying = ((flags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0);
|
||||||
|
|
||||||
|
@ -3071,24 +3073,25 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// "[SCENE PRESENCE]: Avatar {0} set move to target {1} (terrain height {2}) in {3}",
|
// "[SCENE PRESENCE]: Avatar {0} set move to target {1} (terrain height {2}) in {3}",
|
||||||
// Name, pos, terrainHeight, m_scene.RegionInfo.RegionName);
|
// Name, pos, terrainHeight, m_scene.RegionInfo.RegionName);
|
||||||
|
|
||||||
|
bool shouldfly = Flying;
|
||||||
if (noFly)
|
if (noFly)
|
||||||
Flying = false;
|
shouldfly = false;
|
||||||
else if (pos.Z > terrainHeight || Flying)
|
else if (pos.Z > terrainHeight || Flying)
|
||||||
Flying = true;
|
shouldfly = true;
|
||||||
|
|
||||||
LandAtTarget = landAtTarget;
|
LandAtTarget = landAtTarget;
|
||||||
MovingToTarget = true;
|
MovingToTarget = true;
|
||||||
MoveToPositionTarget = pos;
|
MoveToPositionTarget = pos;
|
||||||
|
Flying = shouldfly;
|
||||||
|
|
||||||
// Rotate presence around the z-axis to point in same direction as movement.
|
// Rotate presence around the z-axis to point in same direction as movement.
|
||||||
// Ignore z component of vector
|
// Ignore z component of vector
|
||||||
Vector3 localVectorToTarget3D = pos - AbsolutePosition;
|
Vector3 localVectorToTarget3D = pos - AbsolutePosition;
|
||||||
Vector3 localVectorToTarget2D = new Vector3((float)(localVectorToTarget3D.X), (float)(localVectorToTarget3D.Y), 0f);
|
|
||||||
|
|
||||||
// m_log.DebugFormat("[SCENE PRESENCE]: Local vector to target is {0}", localVectorToTarget2D);
|
// m_log.DebugFormat("[SCENE PRESENCE]: Local vector to target is {0},[1}", localVectorToTarget3D.X,localVectorToTarget3D.Y);
|
||||||
|
|
||||||
// Calculate the yaw.
|
// Calculate the yaw.
|
||||||
Vector3 angle = new Vector3(0, 0, (float)(Math.Atan2(localVectorToTarget2D.Y, localVectorToTarget2D.X)));
|
Vector3 angle = new Vector3(0, 0, (float)(Math.Atan2(localVectorToTarget3D.Y, localVectorToTarget3D.X)));
|
||||||
|
|
||||||
// m_log.DebugFormat("[SCENE PRESENCE]: Angle is {0}", angle);
|
// m_log.DebugFormat("[SCENE PRESENCE]: Angle is {0}", angle);
|
||||||
|
|
||||||
|
|
|
@ -340,7 +340,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
|
||||||
faces = new List<Face>();
|
faces = new List<Face>();
|
||||||
OSD meshOsd = null;
|
OSD meshOsd = null;
|
||||||
|
|
||||||
if (primShape.SculptData.Length <= 0)
|
if (primShape.SculptData == null || primShape.SculptData.Length <= 0)
|
||||||
{
|
{
|
||||||
// m_log.InfoFormat("[MESH]: asset data for {0} is zero length", primName);
|
// m_log.InfoFormat("[MESH]: asset data for {0} is zero length", primName);
|
||||||
return false;
|
return false;
|
||||||
|
@ -363,6 +363,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.Error("[MESH]: Exception deserializing mesh asset header:" + e.ToString());
|
m_log.Error("[MESH]: Exception deserializing mesh asset header:" + e.ToString());
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
start = data.Position;
|
start = data.Position;
|
||||||
|
|
|
@ -1,8 +1,26 @@
|
||||||
<Regions>
|
<Nini>
|
||||||
<Root>
|
<Section Name="OpenSim Test">
|
||||||
<Config sim_UUID="18fb66dbf6274279885228f1c4064f8c" sim_name="OpenSim Test" sim_location_x="1000" sim_location_y="1000" datastore="OpenSim.db" internal_ip_address="0.0.0.0" internal_ip_port="9000" external_host_name="127.0.0.1" master_avatar_first="Test" master_avatar_last="User" master_avatar_pass="test" />
|
<Key Name="RegionUUID" Value="e3be865f-35b6-4f7c-9aea-9ab017b07635"/>
|
||||||
</Root>
|
<Key Name="InternalAddress" Value="0.0.0.0"/>
|
||||||
<Root>
|
<Key Name="InternalPort" Value="9000"/>
|
||||||
<Config sim_UUID="111111dbf6274219881228f1c1061f8c" sim_name="OpenSim Test2" sim_location_x="1001" sim_location_y="1000" datastore="OpenSim2.db" internal_ip_address="0.0.0.0" internal_ip_port="9001" external_host_name="127.0.0.1" master_avatar_first="Test" master_avatar_last="User" master_avatar_pass="test" />
|
<Key Name="AllowAlternatePorts" Value="False"/>
|
||||||
</Root>
|
<Key Name="ExternalHostName" Value="127.0.0.1"/>
|
||||||
</Regions>
|
<Key Name="ResolveAddress" Value="False"/>
|
||||||
|
<Key Name="Location" Value="1000,1000"/>
|
||||||
|
<Key Name="SizeX" Value="256"/>
|
||||||
|
<Key Name="SizeY" Value="256"/>
|
||||||
|
<Key Name="ClampPrimSize" Value="False"/>
|
||||||
|
</Section>
|
||||||
|
<Section Name="OpenSim Test2">
|
||||||
|
<Key Name="RegionUUID" Value="e3be865f-35b6-4f7c-9aea-9ab017b07636"/>
|
||||||
|
<Key Name="InternalAddress" Value="0.0.0.0"/>
|
||||||
|
<Key Name="InternalPort" Value="9001"/>
|
||||||
|
<Key Name="AllowAlternatePorts" Value="False"/>
|
||||||
|
<Key Name="ExternalHostName" Value="127.0.0.1"/>
|
||||||
|
<Key Name="ResolveAddress" Value="False"/>
|
||||||
|
<Key Name="Location" Value="1000,1001"/>
|
||||||
|
<Key Name="SizeX" Value="256"/>
|
||||||
|
<Key Name="SizeY" Value="256"/>
|
||||||
|
<Key Name="ClampPrimSize" Value="False"/>
|
||||||
|
</Section>
|
||||||
|
</Nini>
|
Loading…
Reference in New Issue