diff options
Diffstat (limited to '')
4 files changed, 9 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/INPCModule.cs b/OpenSim/Region/Framework/Interfaces/INPCModule.cs index b4dc3c3..e071ea3 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 = false); | ||
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/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index 3ac1eb1..541ad7d 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | |||
@@ -169,7 +169,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
169 | } | 169 | } |
170 | } | 170 | } |
171 | 171 | ||
172 | public bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos, bool noFly, bool landAtTarget) | 172 | public bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos, bool noFly, bool landAtTarget, bool running = false) |
173 | { | 173 | { |
174 | lock (m_avatars) | 174 | lock (m_avatars) |
175 | { | 175 | { |
@@ -183,6 +183,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
183 | sp.Name, pos, scene.RegionInfo.RegionName, noFly, landAtTarget); | 183 | sp.Name, pos, scene.RegionInfo.RegionName, noFly, landAtTarget); |
184 | 184 | ||
185 | sp.MoveToTarget(pos, noFly, landAtTarget); | 185 | sp.MoveToTarget(pos, noFly, landAtTarget); |
186 | sp.SetAlwaysRun = running; | ||
186 | 187 | ||
187 | return true; | 188 | return true; |
188 | } | 189 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 0d4ea19..3659687 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -2474,7 +2474,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2474 | World, | 2474 | World, |
2475 | pos, | 2475 | pos, |
2476 | (options & ScriptBaseClass.OS_NPC_NO_FLY) != 0, | 2476 | (options & ScriptBaseClass.OS_NPC_NO_FLY) != 0, |
2477 | (options & ScriptBaseClass.OS_NPC_LAND_AT_TARGET) != 0); | 2477 | (options & ScriptBaseClass.OS_NPC_LAND_AT_TARGET) != 0, |
2478 | (options & ScriptBaseClass.OS_NPC_RUNNING) != 0); | ||
2478 | } | 2479 | } |
2479 | } | 2480 | } |
2480 | 2481 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs index fd7c41e..2a28542 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs | |||
@@ -626,6 +626,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
626 | public const int OS_NPC_FLY = 0; | 626 | public const int OS_NPC_FLY = 0; |
627 | public const int OS_NPC_NO_FLY = 1; | 627 | public const int OS_NPC_NO_FLY = 1; |
628 | public const int OS_NPC_LAND_AT_TARGET = 2; | 628 | public const int OS_NPC_LAND_AT_TARGET = 2; |
629 | public const int OS_NPC_RUNNING = 4; | ||
629 | 630 | ||
630 | public const int OS_NPC_SIT_NOW = 0; | 631 | public const int OS_NPC_SIT_NOW = 0; |
631 | 632 | ||