aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2012-05-07 12:07:47 +0100
committerMelanie2012-05-07 12:07:47 +0100
commitdf7abbb367ecac2fb09e1af10d3ec2a792ea2ed2 (patch)
tree3e36b8757455c88c3c1f20c14b635e662350aab9 /OpenSim
parentMerge branch 'avination' into careminster (diff)
parentadd a null check for Primitive.Sculpt in PrimitiveBaseShape constructor for O... (diff)
downloadopensim-SC-df7abbb367ecac2fb09e1af10d3ec2a792ea2ed2.zip
opensim-SC-df7abbb367ecac2fb09e1af10d3ec2a792ea2ed2.tar.gz
opensim-SC-df7abbb367ecac2fb09e1af10d3ec2a792ea2ed2.tar.bz2
opensim-SC-df7abbb367ecac2fb09e1af10d3ec2a792ea2ed2.tar.xz
Merge branch 'master' into careminster
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/PrimitiveBaseShape.cs12
-rw-r--r--OpenSim/Region/Framework/Interfaces/INPCModule.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs2
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs3
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs5
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs1
7 files changed, 21 insertions, 12 deletions
diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs
index c6ccc9e..fcc9873 100644
--- a/OpenSim/Framework/PrimitiveBaseShape.cs
+++ b/OpenSim/Framework/PrimitiveBaseShape.cs
@@ -241,10 +241,14 @@ namespace OpenSim.Framework
241 241
242 m_textureEntry = prim.Textures.GetBytes(); 242 m_textureEntry = prim.Textures.GetBytes();
243 243
244 SculptEntry = (prim.Sculpt.Type != OpenMetaverse.SculptType.None); 244 if (prim.Sculpt != null)
245 SculptData = prim.Sculpt.GetBytes(); 245 {
246 SculptTexture = prim.Sculpt.SculptTexture; 246 SculptEntry = (prim.Sculpt.Type != OpenMetaverse.SculptType.None);
247 SculptType = (byte)prim.Sculpt.Type; 247 SculptData = prim.Sculpt.GetBytes();
248 SculptTexture = prim.Sculpt.SculptTexture;
249 SculptType = (byte)prim.Sculpt.Type;
250 }
251 else SculptType = (byte)OpenMetaverse.SculptType.None;
248 } 252 }
249 253
250 [XmlIgnore] 254 [XmlIgnore]
diff --git a/OpenSim/Region/Framework/Interfaces/INPCModule.cs b/OpenSim/Region/Framework/Interfaces/INPCModule.cs
index b4dc3c3..860483d 100644
--- a/OpenSim/Region/Framework/Interfaces/INPCModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/INPCModule.cs
@@ -113,9 +113,11 @@ namespace OpenSim.Region.Framework.Interfaces
113 /// </param> 113 /// </param>
114 /// <param name="landAtTarget"> 114 /// <param name="landAtTarget">
115 /// If true and the avatar is flying when it reaches the target, land. 115 /// If true and the avatar is flying when it reaches the target, land.
116 /// </param> 116 /// </param> name="running">
117 /// If true, NPC moves with running speed.
117 /// <returns>True if the operation succeeded, false if there was no such agent or the agent was not an NPC</returns> 118 /// <returns>True if the operation succeeded, false if there was no such agent or the agent was not an NPC</returns>
118 bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos, bool noFly, bool landAtTarget); 119 ///
120 bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos, bool noFly, bool landAtTarget, bool running);
119 121
120 /// <summary> 122 /// <summary>
121 /// Stop the NPC's current movement. 123 /// Stop the NPC's current movement.
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 468c7ea..72d96d1 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -3515,7 +3515,7 @@ namespace OpenSim.Region.Framework.Scenes
3515 3515
3516 //we need to do a terse update even if the move wasn't allowed 3516 //we need to do a terse update even if the move wasn't allowed
3517 // so that the position is reset in the client (the object snaps back) 3517 // so that the position is reset in the client (the object snaps back)
3518 ScheduleGroupForTerseUpdate(); 3518 RootPart.ScheduleTerseUpdate();
3519 } 3519 }
3520 3520
3521 /// <summary> 3521 /// <summary>
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
index 9c77b59..a32ab2a 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
@@ -170,7 +170,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
170 return npcAvatar.AgentId; 170 return npcAvatar.AgentId;
171 } 171 }
172 172
173 public bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos, bool noFly, bool landAtTarget) 173 public bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos, bool noFly, bool landAtTarget, bool running)
174 { 174 {
175 lock (m_avatars) 175 lock (m_avatars)
176 { 176 {
@@ -184,6 +184,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
184 sp.Name, pos, scene.RegionInfo.RegionName, noFly, landAtTarget); 184 sp.Name, pos, scene.RegionInfo.RegionName, noFly, landAtTarget);
185 185
186 sp.MoveToTarget(pos, noFly, landAtTarget); 186 sp.MoveToTarget(pos, noFly, landAtTarget);
187 sp.SetAlwaysRun = running;
187 188
188 return true; 189 return true;
189 } 190 }
diff --git a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
index a39257e..65dad2d 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
@@ -242,7 +242,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
242 Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos)); 242 Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos));
243 243
244 Vector3 targetPos = startPos + new Vector3(0, 10, 0); 244 Vector3 targetPos = startPos + new Vector3(0, 10, 0);
245 m_npcMod.MoveToTarget(npc.UUID, m_scene, targetPos, false, false); 245 m_npcMod.MoveToTarget(npc.UUID, m_scene, targetPos, false, false, false);
246 246
247 Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos)); 247 Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos));
248 //Assert.That(npc.Rotation, Is.EqualTo(new Quaternion(0, 0, 0.7071068f, 0.7071068f))); 248 //Assert.That(npc.Rotation, Is.EqualTo(new Quaternion(0, 0, 0.7071068f, 0.7071068f)));
@@ -267,7 +267,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
267 // Try a second movement 267 // Try a second movement
268 startPos = npc.AbsolutePosition; 268 startPos = npc.AbsolutePosition;
269 targetPos = startPos + new Vector3(10, 0, 0); 269 targetPos = startPos + new Vector3(10, 0, 0);
270 m_npcMod.MoveToTarget(npc.UUID, m_scene, targetPos, false, false); 270 m_npcMod.MoveToTarget(npc.UUID, m_scene, targetPos, false, false, false);
271 271
272 Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos)); 272 Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos));
273// Assert.That(npc.Rotation, Is.EqualTo(new Quaternion(0, 0, 0, 1))); 273// Assert.That(npc.Rotation, Is.EqualTo(new Quaternion(0, 0, 0, 1)));
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 60568a8..0688916 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -2479,7 +2479,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2479 return; 2479 return;
2480 2480
2481 Vector3 pos = new Vector3((float) position.x, (float) position.y, (float) position.z); 2481 Vector3 pos = new Vector3((float) position.x, (float) position.y, (float) position.z);
2482 module.MoveToTarget(npcId, World, pos, false, true); 2482 module.MoveToTarget(npcId, World, pos, false, true, false);
2483 } 2483 }
2484 } 2484 }
2485 2485
@@ -2504,7 +2504,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2504 World, 2504 World,
2505 pos, 2505 pos,
2506 (options & ScriptBaseClass.OS_NPC_NO_FLY) != 0, 2506 (options & ScriptBaseClass.OS_NPC_NO_FLY) != 0,
2507 (options & ScriptBaseClass.OS_NPC_LAND_AT_TARGET) != 0); 2507 (options & ScriptBaseClass.OS_NPC_LAND_AT_TARGET) != 0,
2508 (options & ScriptBaseClass.OS_NPC_RUNNING) != 0);
2508 } 2509 }
2509 } 2510 }
2510 2511
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
index 23b4336..9d830c8 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
@@ -639,6 +639,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
639 public const int OS_NPC_FLY = 0; 639 public const int OS_NPC_FLY = 0;
640 public const int OS_NPC_NO_FLY = 1; 640 public const int OS_NPC_NO_FLY = 1;
641 public const int OS_NPC_LAND_AT_TARGET = 2; 641 public const int OS_NPC_LAND_AT_TARGET = 2;
642 public const int OS_NPC_RUNNING = 4;
642 643
643 public const int OS_NPC_SIT_NOW = 0; 644 public const int OS_NPC_SIT_NOW = 0;
644 645