diff options
author | UbitUmarov | 2017-12-14 05:37:07 +0000 |
---|---|---|
committer | UbitUmarov | 2017-12-14 05:37:07 +0000 |
commit | 3b141e6e6f4f9c24aea99d3bd1624b96ff93147a (patch) | |
tree | 087fcf1e8233529fc32db7823f9ec0a3f5cb4e4c | |
parent | Merge branch 'master' into httptests (diff) | |
parent | add a missing return on a mesh decode error in ubOdemeshmerizer (diff) | |
download | opensim-SC-3b141e6e6f4f9c24aea99d3bd1624b96ff93147a.zip opensim-SC-3b141e6e6f4f9c24aea99d3bd1624b96ff93147a.tar.gz opensim-SC-3b141e6e6f4f9c24aea99d3bd1624b96ff93147a.tar.bz2 opensim-SC-3b141e6e6f4f9c24aea99d3bd1624b96ff93147a.tar.xz |
Merge branch 'master' into httptests
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 17 | ||||
-rw-r--r-- | OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs | 3 | ||||
-rw-r--r-- | share/RegionLoading/example_web.xml | 34 |
3 files changed, 38 insertions, 16 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 018c2e2..6bce406 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2587,10 +2587,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
2587 | } | 2587 | } |
2588 | 2588 | ||
2589 | bool update_movementflag = false; | 2589 | bool update_movementflag = false; |
2590 | 2590 | bool mvToTarget = MovingToTarget; | |
2591 | if (agentData.UseClientAgentPosition) | 2591 | if (agentData.UseClientAgentPosition) |
2592 | { | 2592 | { |
2593 | MovingToTarget = (agentData.ClientAgentPosition - AbsolutePosition).Length() > 0.2f; | 2593 | MovingToTarget = (agentData.ClientAgentPosition - AbsolutePosition).LengthSquared() > 0.04f; |
2594 | MoveToPositionTarget = agentData.ClientAgentPosition; | 2594 | MoveToPositionTarget = agentData.ClientAgentPosition; |
2595 | } | 2595 | } |
2596 | 2596 | ||
@@ -2604,6 +2604,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2604 | newFlying = true; | 2604 | newFlying = true; |
2605 | else if (FlyDisabled) | 2605 | else if (FlyDisabled) |
2606 | newFlying = false; | 2606 | newFlying = false; |
2607 | else if(mvToTarget) | ||
2608 | newFlying = actor.Flying; | ||
2607 | else | 2609 | else |
2608 | newFlying = ((flags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0); | 2610 | newFlying = ((flags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0); |
2609 | 2611 | ||
@@ -3071,24 +3073,25 @@ namespace OpenSim.Region.Framework.Scenes | |||
3071 | // "[SCENE PRESENCE]: Avatar {0} set move to target {1} (terrain height {2}) in {3}", | 3073 | // "[SCENE PRESENCE]: Avatar {0} set move to target {1} (terrain height {2}) in {3}", |
3072 | // Name, pos, terrainHeight, m_scene.RegionInfo.RegionName); | 3074 | // Name, pos, terrainHeight, m_scene.RegionInfo.RegionName); |
3073 | 3075 | ||
3076 | bool shouldfly = Flying; | ||
3074 | if (noFly) | 3077 | if (noFly) |
3075 | Flying = false; | 3078 | shouldfly = false; |
3076 | else if (pos.Z > terrainHeight || Flying) | 3079 | else if (pos.Z > terrainHeight || Flying) |
3077 | Flying = true; | 3080 | shouldfly = true; |
3078 | 3081 | ||
3079 | LandAtTarget = landAtTarget; | 3082 | LandAtTarget = landAtTarget; |
3080 | MovingToTarget = true; | 3083 | MovingToTarget = true; |
3081 | MoveToPositionTarget = pos; | 3084 | MoveToPositionTarget = pos; |
3085 | Flying = shouldfly; | ||
3082 | 3086 | ||
3083 | // Rotate presence around the z-axis to point in same direction as movement. | 3087 | // Rotate presence around the z-axis to point in same direction as movement. |
3084 | // Ignore z component of vector | 3088 | // Ignore z component of vector |
3085 | Vector3 localVectorToTarget3D = pos - AbsolutePosition; | 3089 | Vector3 localVectorToTarget3D = pos - AbsolutePosition; |
3086 | Vector3 localVectorToTarget2D = new Vector3((float)(localVectorToTarget3D.X), (float)(localVectorToTarget3D.Y), 0f); | ||
3087 | 3090 | ||
3088 | // m_log.DebugFormat("[SCENE PRESENCE]: Local vector to target is {0}", localVectorToTarget2D); | 3091 | // m_log.DebugFormat("[SCENE PRESENCE]: Local vector to target is {0},[1}", localVectorToTarget3D.X,localVectorToTarget3D.Y); |
3089 | 3092 | ||
3090 | // Calculate the yaw. | 3093 | // Calculate the yaw. |
3091 | Vector3 angle = new Vector3(0, 0, (float)(Math.Atan2(localVectorToTarget2D.Y, localVectorToTarget2D.X))); | 3094 | Vector3 angle = new Vector3(0, 0, (float)(Math.Atan2(localVectorToTarget3D.Y, localVectorToTarget3D.X))); |
3092 | 3095 | ||
3093 | // m_log.DebugFormat("[SCENE PRESENCE]: Angle is {0}", angle); | 3096 | // m_log.DebugFormat("[SCENE PRESENCE]: Angle is {0}", angle); |
3094 | 3097 | ||
diff --git a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs index a2a3f79..032d4ed 100644 --- a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs +++ b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs | |||
@@ -340,7 +340,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing | |||
340 | faces = new List<Face>(); | 340 | faces = new List<Face>(); |
341 | OSD meshOsd = null; | 341 | OSD meshOsd = null; |
342 | 342 | ||
343 | if (primShape.SculptData.Length <= 0) | 343 | if (primShape.SculptData == null || primShape.SculptData.Length <= 0) |
344 | { | 344 | { |
345 | // m_log.InfoFormat("[MESH]: asset data for {0} is zero length", primName); | 345 | // m_log.InfoFormat("[MESH]: asset data for {0} is zero length", primName); |
346 | return false; | 346 | return false; |
@@ -363,6 +363,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing | |||
363 | catch (Exception e) | 363 | catch (Exception e) |
364 | { | 364 | { |
365 | m_log.Error("[MESH]: Exception deserializing mesh asset header:" + e.ToString()); | 365 | m_log.Error("[MESH]: Exception deserializing mesh asset header:" + e.ToString()); |
366 | return false; | ||
366 | } | 367 | } |
367 | 368 | ||
368 | start = data.Position; | 369 | start = data.Position; |
diff --git a/share/RegionLoading/example_web.xml b/share/RegionLoading/example_web.xml index f7ed25e..39e8023 100644 --- a/share/RegionLoading/example_web.xml +++ b/share/RegionLoading/example_web.xml | |||
@@ -1,8 +1,26 @@ | |||
1 | <Regions> | 1 | <Nini> |
2 | <Root> | 2 | <Section Name="OpenSim Test"> |
3 | <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" /> | 3 | <Key Name="RegionUUID" Value="e3be865f-35b6-4f7c-9aea-9ab017b07635"/> |
4 | </Root> | 4 | <Key Name="InternalAddress" Value="0.0.0.0"/> |
5 | <Root> | 5 | <Key Name="InternalPort" Value="9000"/> |
6 | <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" /> | 6 | <Key Name="AllowAlternatePorts" Value="False"/> |
7 | </Root> | 7 | <Key Name="ExternalHostName" Value="127.0.0.1"/> |
8 | </Regions> \ No newline at end of file | 8 | <Key Name="ResolveAddress" Value="False"/> |
9 | <Key Name="Location" Value="1000,1000"/> | ||
10 | <Key Name="SizeX" Value="256"/> | ||
11 | <Key Name="SizeY" Value="256"/> | ||
12 | <Key Name="ClampPrimSize" Value="False"/> | ||
13 | </Section> | ||
14 | <Section Name="OpenSim Test2"> | ||
15 | <Key Name="RegionUUID" Value="e3be865f-35b6-4f7c-9aea-9ab017b07636"/> | ||
16 | <Key Name="InternalAddress" Value="0.0.0.0"/> | ||
17 | <Key Name="InternalPort" Value="9001"/> | ||
18 | <Key Name="AllowAlternatePorts" Value="False"/> | ||
19 | <Key Name="ExternalHostName" Value="127.0.0.1"/> | ||
20 | <Key Name="ResolveAddress" Value="False"/> | ||
21 | <Key Name="Location" Value="1000,1001"/> | ||
22 | <Key Name="SizeX" Value="256"/> | ||
23 | <Key Name="SizeY" Value="256"/> | ||
24 | <Key Name="ClampPrimSize" Value="False"/> | ||
25 | </Section> | ||
26 | </Nini> \ No newline at end of file | ||