From 7f499ff3f386d57bcd81ebb3f58f110011100604 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 10 Aug 2011 23:56:19 +0100
Subject: Add a OS_NPC_LAND_AT_TARGET option to osMoveToTarget()
Default for this function is now not to automatically land.
This allows better control by scripts when an avatar is going to be landing on a prim rather than the ground.
Stopping the avatar involves faking a collision, to avoid the pid controller making it overshoot.
A better approach would be to gradually slow the avatar as we near the target
---
OpenSim/Region/Framework/Interfaces/INPCModule.cs | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region/Framework/Interfaces')
diff --git a/OpenSim/Region/Framework/Interfaces/INPCModule.cs b/OpenSim/Region/Framework/Interfaces/INPCModule.cs
index 06296c9..08b973d 100644
--- a/OpenSim/Region/Framework/Interfaces/INPCModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/INPCModule.cs
@@ -71,8 +71,11 @@ namespace OpenSim.Region.Framework.Interfaces
/// If true, then the avatar will attempt to walk to the location even if it's up in the air.
/// This is to allow walking on prims.
///
+ ///
+ /// If true and the avatar is flying when it reaches the target, land.
+ ///
/// True if the operation succeeded, false if there was no such agent or the agent was not an NPC
- bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos, bool noFly);
+ bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos, bool noFly, bool landAtTarget);
///
/// Stop the NPC's current movement.
--
cgit v1.1