aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-08-10 01:47:37 +0100
committerJustin Clark-Casey (justincc)2011-08-10 01:47:37 +0100
commit5d6c9644faf6aeac38410af9cff97adfef88d7aa (patch)
tree4913309153fd8b55f7cd5cd27bd449f9eecd41f5 /OpenSim/Region/OptionalModules
parentStop trying to deregister caps or close child agents when an NPC is removed (diff)
downloadopensim-SC_OLD-5d6c9644faf6aeac38410af9cff97adfef88d7aa.zip
opensim-SC_OLD-5d6c9644faf6aeac38410af9cff97adfef88d7aa.tar.gz
opensim-SC_OLD-5d6c9644faf6aeac38410af9cff97adfef88d7aa.tar.bz2
opensim-SC_OLD-5d6c9644faf6aeac38410af9cff97adfef88d7aa.tar.xz
early code to allow scripts to force npcs not to fly when moving to target
this is to allow walking on prims. it will be up to the script writer to be sure that there is a continuous path. currently implemented in osNpcMoveToTarget(), but none of this is final.
Diffstat (limited to 'OpenSim/Region/OptionalModules')
-rw-r--r--OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs2
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs2
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs4
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs4
4 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index 8ebf9cb..15201da 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -806,7 +806,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
806 public event ScriptReset OnScriptReset; 806 public event ScriptReset OnScriptReset;
807 public event GetScriptRunning OnGetScriptRunning; 807 public event GetScriptRunning OnGetScriptRunning;
808 public event SetScriptRunning OnSetScriptRunning; 808 public event SetScriptRunning OnSetScriptRunning;
809 public event Action<Vector3> OnAutoPilotGo; 809 public event Action<Vector3, bool> OnAutoPilotGo;
810 public event TerrainUnacked OnUnackedTerrain; 810 public event TerrainUnacked OnUnackedTerrain;
811 public event ActivateGesture OnActivateGesture; 811 public event ActivateGesture OnActivateGesture;
812 public event DeactivateGesture OnDeactivateGesture; 812 public event DeactivateGesture OnDeactivateGesture;
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index b3e2495..cfd692d 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -328,7 +328,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
328 public event ScriptReset OnScriptReset; 328 public event ScriptReset OnScriptReset;
329 public event GetScriptRunning OnGetScriptRunning; 329 public event GetScriptRunning OnGetScriptRunning;
330 public event SetScriptRunning OnSetScriptRunning; 330 public event SetScriptRunning OnSetScriptRunning;
331 public event Action<Vector3> OnAutoPilotGo; 331 public event Action<Vector3, bool> OnAutoPilotGo;
332 332
333 public event TerrainUnacked OnUnackedTerrain; 333 public event TerrainUnacked OnUnackedTerrain;
334 334
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
index 7b9457a..d0b5a94 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
@@ -217,7 +217,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
217 return npcAvatar.AgentId; 217 return npcAvatar.AgentId;
218 } 218 }
219 219
220 public bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos) 220 public bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos, bool noFly)
221 { 221 {
222 lock (m_avatars) 222 lock (m_avatars)
223 { 223 {
@@ -229,7 +229,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
229 m_log.DebugFormat( 229 m_log.DebugFormat(
230 "[NPC MODULE]: Moving {0} to {1} in {2}", sp.Name, pos, scene.RegionInfo.RegionName); 230 "[NPC MODULE]: Moving {0} to {1} in {2}", sp.Name, pos, scene.RegionInfo.RegionName);
231 231
232 sp.MoveToTarget(pos); 232 sp.MoveToTarget(pos, noFly);
233 233
234 return true; 234 return true;
235 } 235 }
diff --git a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
index 2ec354f..81497d5 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
@@ -113,7 +113,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
113 Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos)); 113 Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos));
114 114
115 Vector3 targetPos = startPos + new Vector3(0, 0, 10); 115 Vector3 targetPos = startPos + new Vector3(0, 0, 10);
116 npcModule.MoveToTarget(npc.UUID, scene, targetPos); 116 npcModule.MoveToTarget(npc.UUID, scene, targetPos, false);
117 117
118 Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos)); 118 Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos));
119 119
@@ -135,7 +135,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
135 // Try a second movement 135 // Try a second movement
136 startPos = npc.AbsolutePosition; 136 startPos = npc.AbsolutePosition;
137 targetPos = startPos + new Vector3(10, 0, 0); 137 targetPos = startPos + new Vector3(10, 0, 0);
138 npcModule.MoveToTarget(npc.UUID, scene, targetPos); 138 npcModule.MoveToTarget(npc.UUID, scene, targetPos, false);
139 139
140 scene.Update(); 140 scene.Update();
141 141