Merge branch 'master' into careminster

avinationmerge
Melanie 2012-05-07 12:07:47 +01:00
commit df7abbb367
9 changed files with 22 additions and 12 deletions

View File

@ -205,3 +205,4 @@ In addition, we would like to thank:
* The Mono Project * The Mono Project
* The NANT Developers * The NANT Developers
* Microsoft (.NET, MSSQL-Adapters) * Microsoft (.NET, MSSQL-Adapters)
*x

View File

@ -241,10 +241,14 @@ namespace OpenSim.Framework
m_textureEntry = prim.Textures.GetBytes(); m_textureEntry = prim.Textures.GetBytes();
SculptEntry = (prim.Sculpt.Type != OpenMetaverse.SculptType.None); if (prim.Sculpt != null)
SculptData = prim.Sculpt.GetBytes(); {
SculptTexture = prim.Sculpt.SculptTexture; SculptEntry = (prim.Sculpt.Type != OpenMetaverse.SculptType.None);
SculptType = (byte)prim.Sculpt.Type; SculptData = prim.Sculpt.GetBytes();
SculptTexture = prim.Sculpt.SculptTexture;
SculptType = (byte)prim.Sculpt.Type;
}
else SculptType = (byte)OpenMetaverse.SculptType.None;
} }
[XmlIgnore] [XmlIgnore]

View File

@ -113,9 +113,11 @@ namespace OpenSim.Region.Framework.Interfaces
/// </param> /// </param>
/// <param name="landAtTarget"> /// <param name="landAtTarget">
/// If true and the avatar is flying when it reaches the target, land. /// If true and the avatar is flying when it reaches the target, land.
/// </param> /// </param> name="running">
/// If true, NPC moves with running speed.
/// <returns>True if the operation succeeded, false if there was no such agent or the agent was not an NPC</returns> /// <returns>True if the operation succeeded, false if there was no such agent or the agent was not an NPC</returns>
bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos, bool noFly, bool landAtTarget); ///
bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos, bool noFly, bool landAtTarget, bool running);
/// <summary> /// <summary>
/// Stop the NPC's current movement. /// Stop the NPC's current movement.

View File

@ -3515,7 +3515,7 @@ namespace OpenSim.Region.Framework.Scenes
//we need to do a terse update even if the move wasn't allowed //we need to do a terse update even if the move wasn't allowed
// so that the position is reset in the client (the object snaps back) // so that the position is reset in the client (the object snaps back)
ScheduleGroupForTerseUpdate(); RootPart.ScheduleTerseUpdate();
} }
/// <summary> /// <summary>

View File

@ -170,7 +170,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
return npcAvatar.AgentId; return npcAvatar.AgentId;
} }
public bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos, bool noFly, bool landAtTarget) public bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos, bool noFly, bool landAtTarget, bool running)
{ {
lock (m_avatars) lock (m_avatars)
{ {
@ -184,6 +184,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
sp.Name, pos, scene.RegionInfo.RegionName, noFly, landAtTarget); sp.Name, pos, scene.RegionInfo.RegionName, noFly, landAtTarget);
sp.MoveToTarget(pos, noFly, landAtTarget); sp.MoveToTarget(pos, noFly, landAtTarget);
sp.SetAlwaysRun = running;
return true; return true;
} }

View File

@ -242,7 +242,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos)); Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos));
Vector3 targetPos = startPos + new Vector3(0, 10, 0); Vector3 targetPos = startPos + new Vector3(0, 10, 0);
m_npcMod.MoveToTarget(npc.UUID, m_scene, targetPos, false, false); m_npcMod.MoveToTarget(npc.UUID, m_scene, targetPos, false, false, false);
Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos)); Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos));
//Assert.That(npc.Rotation, Is.EqualTo(new Quaternion(0, 0, 0.7071068f, 0.7071068f))); //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
// Try a second movement // Try a second movement
startPos = npc.AbsolutePosition; startPos = npc.AbsolutePosition;
targetPos = startPos + new Vector3(10, 0, 0); targetPos = startPos + new Vector3(10, 0, 0);
m_npcMod.MoveToTarget(npc.UUID, m_scene, targetPos, false, false); m_npcMod.MoveToTarget(npc.UUID, m_scene, targetPos, false, false, false);
Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos)); Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos));
// Assert.That(npc.Rotation, Is.EqualTo(new Quaternion(0, 0, 0, 1))); // Assert.That(npc.Rotation, Is.EqualTo(new Quaternion(0, 0, 0, 1)));

View File

@ -2479,7 +2479,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return; return;
Vector3 pos = new Vector3((float) position.x, (float) position.y, (float) position.z); Vector3 pos = new Vector3((float) position.x, (float) position.y, (float) position.z);
module.MoveToTarget(npcId, World, pos, false, true); module.MoveToTarget(npcId, World, pos, false, true, false);
} }
} }
@ -2504,7 +2504,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
World, World,
pos, pos,
(options & ScriptBaseClass.OS_NPC_NO_FLY) != 0, (options & ScriptBaseClass.OS_NPC_NO_FLY) != 0,
(options & ScriptBaseClass.OS_NPC_LAND_AT_TARGET) != 0); (options & ScriptBaseClass.OS_NPC_LAND_AT_TARGET) != 0,
(options & ScriptBaseClass.OS_NPC_RUNNING) != 0);
} }
} }

View File

@ -639,6 +639,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
public const int OS_NPC_FLY = 0; public const int OS_NPC_FLY = 0;
public const int OS_NPC_NO_FLY = 1; public const int OS_NPC_NO_FLY = 1;
public const int OS_NPC_LAND_AT_TARGET = 2; public const int OS_NPC_LAND_AT_TARGET = 2;
public const int OS_NPC_RUNNING = 4;
public const int OS_NPC_SIT_NOW = 0; public const int OS_NPC_SIT_NOW = 0;

Binary file not shown.