diff options
author | Melanie | 2012-06-29 22:11:49 +0100 |
---|---|---|
committer | Melanie | 2012-06-29 22:11:49 +0100 |
commit | 05cf51cbbdb3f33bb4c532eefc24eb0a194ed378 (patch) | |
tree | 5514845e589587a84a621bb6e576136d4869ad29 | |
parent | Revert "Mantis 5977 Corrections to llRegionSayTo" (diff) | |
parent | Fix llRegionSayTo the right way (diff) | |
download | opensim-SC_OLD-05cf51cbbdb3f33bb4c532eefc24eb0a194ed378.zip opensim-SC_OLD-05cf51cbbdb3f33bb4c532eefc24eb0a194ed378.tar.gz opensim-SC_OLD-05cf51cbbdb3f33bb4c532eefc24eb0a194ed378.tar.bz2 opensim-SC_OLD-05cf51cbbdb3f33bb4c532eefc24eb0a194ed378.tar.xz |
Merge branch 'avination' into careminster
Conflicts:
OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs
11 files changed, 94 insertions, 46 deletions
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs index 4e7c8af..31c80c1 100644 --- a/OpenSim/Data/MySQL/MySQLSimulationData.cs +++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs | |||
@@ -1331,32 +1331,40 @@ namespace OpenSim.Data.MySQL | |||
1331 | /// <returns></returns> | 1331 | /// <returns></returns> |
1332 | private static TaskInventoryItem BuildItem(IDataReader row) | 1332 | private static TaskInventoryItem BuildItem(IDataReader row) |
1333 | { | 1333 | { |
1334 | TaskInventoryItem taskItem = new TaskInventoryItem(); | 1334 | try |
1335 | 1335 | { | |
1336 | taskItem.ItemID = DBGuid.FromDB(row["itemID"]); | 1336 | TaskInventoryItem taskItem = new TaskInventoryItem(); |
1337 | taskItem.ParentPartID = DBGuid.FromDB(row["primID"]); | 1337 | |
1338 | taskItem.AssetID = DBGuid.FromDB(row["assetID"]); | 1338 | taskItem.ItemID = DBGuid.FromDB(row["itemID"]); |
1339 | taskItem.ParentID = DBGuid.FromDB(row["parentFolderID"]); | 1339 | taskItem.ParentPartID = DBGuid.FromDB(row["primID"]); |
1340 | 1340 | taskItem.AssetID = DBGuid.FromDB(row["assetID"]); | |
1341 | taskItem.InvType = Convert.ToInt32(row["invType"]); | 1341 | taskItem.ParentID = DBGuid.FromDB(row["parentFolderID"]); |
1342 | taskItem.Type = Convert.ToInt32(row["assetType"]); | 1342 | |
1343 | 1343 | taskItem.InvType = Convert.ToInt32(row["invType"]); | |
1344 | taskItem.Name = (String)row["name"]; | 1344 | taskItem.Type = Convert.ToInt32(row["assetType"]); |
1345 | taskItem.Description = (String)row["description"]; | 1345 | |
1346 | taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); | 1346 | taskItem.Name = (String)row["name"]; |
1347 | taskItem.CreatorIdentification = (String)row["creatorID"]; | 1347 | taskItem.Description = (String)row["description"]; |
1348 | taskItem.OwnerID = DBGuid.FromDB(row["ownerID"]); | 1348 | taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); |
1349 | taskItem.LastOwnerID = DBGuid.FromDB(row["lastOwnerID"]); | 1349 | taskItem.CreatorIdentification = (String)row["creatorID"]; |
1350 | taskItem.GroupID = DBGuid.FromDB(row["groupID"]); | 1350 | taskItem.OwnerID = DBGuid.FromDB(row["ownerID"]); |
1351 | 1351 | taskItem.LastOwnerID = DBGuid.FromDB(row["lastOwnerID"]); | |
1352 | taskItem.NextPermissions = Convert.ToUInt32(row["nextPermissions"]); | 1352 | taskItem.GroupID = DBGuid.FromDB(row["groupID"]); |
1353 | taskItem.CurrentPermissions = Convert.ToUInt32(row["currentPermissions"]); | 1353 | |
1354 | taskItem.BasePermissions = Convert.ToUInt32(row["basePermissions"]); | 1354 | taskItem.NextPermissions = Convert.ToUInt32(row["nextPermissions"]); |
1355 | taskItem.EveryonePermissions = Convert.ToUInt32(row["everyonePermissions"]); | 1355 | taskItem.CurrentPermissions = Convert.ToUInt32(row["currentPermissions"]); |
1356 | taskItem.GroupPermissions = Convert.ToUInt32(row["groupPermissions"]); | 1356 | taskItem.BasePermissions = Convert.ToUInt32(row["basePermissions"]); |
1357 | taskItem.Flags = Convert.ToUInt32(row["flags"]); | 1357 | taskItem.EveryonePermissions = Convert.ToUInt32(row["everyonePermissions"]); |
1358 | 1358 | taskItem.GroupPermissions = Convert.ToUInt32(row["groupPermissions"]); | |
1359 | return taskItem; | 1359 | taskItem.Flags = Convert.ToUInt32(row["flags"]); |
1360 | |||
1361 | return taskItem; | ||
1362 | } | ||
1363 | catch | ||
1364 | { | ||
1365 | m_log.ErrorFormat("[MYSQL DB]: Error reading task inventory: itemID was {0}, primID was {1}", row["itemID"].ToString(), row["primID"].ToString()); | ||
1366 | throw; | ||
1367 | } | ||
1360 | } | 1368 | } |
1361 | 1369 | ||
1362 | private static RegionSettings BuildRegionSettings(IDataReader row) | 1370 | private static RegionSettings BuildRegionSettings(IDataReader row) |
diff --git a/OpenSim/Framework/OSChatMessage.cs b/OpenSim/Framework/OSChatMessage.cs index 54fa275..7450be2 100644 --- a/OpenSim/Framework/OSChatMessage.cs +++ b/OpenSim/Framework/OSChatMessage.cs | |||
@@ -51,6 +51,7 @@ namespace OpenSim.Framework | |||
51 | protected object m_senderObject; | 51 | protected object m_senderObject; |
52 | protected ChatTypeEnum m_type; | 52 | protected ChatTypeEnum m_type; |
53 | protected UUID m_fromID; | 53 | protected UUID m_fromID; |
54 | protected UUID m_destination = UUID.Zero; | ||
54 | 55 | ||
55 | public OSChatMessage() | 56 | public OSChatMessage() |
56 | { | 57 | { |
@@ -131,6 +132,12 @@ namespace OpenSim.Framework | |||
131 | set { m_fromID = value; } | 132 | set { m_fromID = value; } |
132 | } | 133 | } |
133 | 134 | ||
135 | public UUID Destination | ||
136 | { | ||
137 | get { return m_destination; } | ||
138 | set { m_destination = value; } | ||
139 | } | ||
140 | |||
134 | /// <summary> | 141 | /// <summary> |
135 | /// | 142 | /// |
136 | /// </summary> | 143 | /// </summary> |
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs index 3252251..5bc85ff 100644 --- a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs +++ b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs | |||
@@ -41,6 +41,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
41 | 41 | ||
42 | private readonly BaseHttpServer m_server; | 42 | private readonly BaseHttpServer m_server; |
43 | private static Queue m_requests = Queue.Synchronized(new Queue()); | 43 | private static Queue m_requests = Queue.Synchronized(new Queue()); |
44 | private static ManualResetEvent m_ev = new ManualResetEvent(false); | ||
44 | private uint m_WorkerThreadCount = 0; | 45 | private uint m_WorkerThreadCount = 0; |
45 | private Thread[] m_workerThreads; | 46 | private Thread[] m_workerThreads; |
46 | private PollServiceWorkerThread[] m_PollServiceWorkerThreads; | 47 | private PollServiceWorkerThread[] m_PollServiceWorkerThreads; |
@@ -90,15 +91,17 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
90 | { | 91 | { |
91 | lock (m_requests) | 92 | lock (m_requests) |
92 | m_requests.Enqueue(req); | 93 | m_requests.Enqueue(req); |
94 | m_ev.Set(); | ||
93 | } | 95 | } |
94 | 96 | ||
95 | public void ThreadStart() | 97 | public void ThreadStart() |
96 | { | 98 | { |
97 | while (m_running) | 99 | while (m_running) |
98 | { | 100 | { |
101 | m_ev.WaitOne(1000); | ||
102 | m_ev.Reset(); | ||
99 | Watchdog.UpdateThread(); | 103 | Watchdog.UpdateThread(); |
100 | ProcessQueuedRequests(); | 104 | ProcessQueuedRequests(); |
101 | Thread.Sleep(1000); | ||
102 | } | 105 | } |
103 | } | 106 | } |
104 | 107 | ||
@@ -154,4 +157,4 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
154 | m_running = false; | 157 | m_running = false; |
155 | } | 158 | } |
156 | } | 159 | } |
157 | } \ No newline at end of file | 160 | } |
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs index 35a8dee..d305782 100644 --- a/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs +++ b/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs | |||
@@ -89,8 +89,15 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
89 | continue; | 89 | continue; |
90 | } | 90 | } |
91 | 91 | ||
92 | Hashtable responsedata = req.PollServiceArgs.GetEvents(req.RequestID, req.PollServiceArgs.Id, str.ReadToEnd()); | 92 | try |
93 | DoHTTPGruntWork(m_server, req, responsedata); | 93 | { |
94 | Hashtable responsedata = req.PollServiceArgs.GetEvents(req.RequestID, req.PollServiceArgs.Id, str.ReadToEnd()); | ||
95 | DoHTTPGruntWork(m_server, req, responsedata); | ||
96 | } | ||
97 | catch (ObjectDisposedException) // Browser aborted before we could read body, server closed the stream | ||
98 | { | ||
99 | // Ignore it, no need to reply | ||
100 | } | ||
94 | } | 101 | } |
95 | else | 102 | else |
96 | { | 103 | { |
@@ -161,4 +168,4 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
161 | } | 168 | } |
162 | } | 169 | } |
163 | } | 170 | } |
164 | } \ No newline at end of file | 171 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs index 5649855..bc42fd1 100644 --- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | |||
@@ -199,6 +199,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
199 | UUID fromID = UUID.Zero; | 199 | UUID fromID = UUID.Zero; |
200 | string message = c.Message; | 200 | string message = c.Message; |
201 | IScene scene = c.Scene; | 201 | IScene scene = c.Scene; |
202 | UUID destination = c.Destination; | ||
202 | Vector3 fromPos = c.Position; | 203 | Vector3 fromPos = c.Position; |
203 | Vector3 regionPos = new Vector3(scene.RegionInfo.RegionLocX * Constants.RegionSize, | 204 | Vector3 regionPos = new Vector3(scene.RegionInfo.RegionLocX * Constants.RegionSize, |
204 | scene.RegionInfo.RegionLocY * Constants.RegionSize, 0); | 205 | scene.RegionInfo.RegionLocY * Constants.RegionSize, 0); |
@@ -222,6 +223,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
222 | { | 223 | { |
223 | fromNamePrefix = m_adminPrefix; | 224 | fromNamePrefix = m_adminPrefix; |
224 | } | 225 | } |
226 | destination = UUID.Zero; // Avatars cant "SayTo" | ||
225 | break; | 227 | break; |
226 | 228 | ||
227 | case ChatSourceType.Object: | 229 | case ChatSourceType.Object: |
@@ -244,9 +246,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
244 | { | 246 | { |
245 | // This should use ForEachClient, but clients don't have a position. | 247 | // This should use ForEachClient, but clients don't have a position. |
246 | // If camera is moved into client, then camera position can be used | 248 | // If camera is moved into client, then camera position can be used |
249 | // MT: No, it can't, as chat is heard from the avatar position, not | ||
250 | // the camera position. | ||
247 | s.ForEachRootScenePresence( | 251 | s.ForEachRootScenePresence( |
248 | delegate(ScenePresence presence) | 252 | delegate(ScenePresence presence) |
249 | { | 253 | { |
254 | if (destination != UUID.Zero && presence.UUID != destination) | ||
255 | return; | ||
250 | ILandObject Presencecheck = s.LandChannel.GetLandObject(presence.AbsolutePosition.X, presence.AbsolutePosition.Y); | 256 | ILandObject Presencecheck = s.LandChannel.GetLandObject(presence.AbsolutePosition.X, presence.AbsolutePosition.Y); |
251 | if (Presencecheck != null) | 257 | if (Presencecheck != null) |
252 | { | 258 | { |
@@ -345,8 +351,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
345 | UUID fromAgentID, string fromName, ChatTypeEnum type, | 351 | UUID fromAgentID, string fromName, ChatTypeEnum type, |
346 | string message, ChatSourceType src) | 352 | string message, ChatSourceType src) |
347 | { | 353 | { |
348 | // don't send stuff to child agents | 354 | // don't send llRegionSay to child agents. Send normal chat because you |
349 | if (presence.IsChildAgent) return false; | 355 | // can't talk across sim borders if it's not done |
356 | if (type == ChatTypeEnum.Broadcast && presence.IsChildAgent) return false; | ||
350 | 357 | ||
351 | Vector3 fromRegionPos = fromPos + regionPos; | 358 | Vector3 fromRegionPos = fromPos + regionPos; |
352 | Vector3 toRegionPos = presence.AbsolutePosition + | 359 | Vector3 toRegionPos = presence.AbsolutePosition + |
diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs index 56c3c7d..192b4f6 100644 --- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs | |||
@@ -532,7 +532,8 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
532 | } | 532 | } |
533 | else | 533 | else |
534 | { | 534 | { |
535 | m_log.Warn("[HttpRequestHandler]: http-in request failed; no such url: "+urlkey.ToString()); | 535 | //m_log.Warn("[HttpRequestHandler]: http-in request failed; no such url: "+urlkey.ToString()); |
536 | return; | ||
536 | } | 537 | } |
537 | 538 | ||
538 | //for llGetHttpHeader support we need to store original URI here | 539 | //for llGetHttpHeader support we need to store original URI here |
diff --git a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs index 176c86d..07bb291 100644 --- a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs | |||
@@ -90,6 +90,8 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm | |||
90 | // private static readonly ILog m_log = | 90 | // private static readonly ILog m_log = |
91 | // LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 91 | // LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
92 | 92 | ||
93 | private const int DEBUG_CHANNEL = 2147483647; | ||
94 | |||
93 | private ListenerManager m_listenerManager; | 95 | private ListenerManager m_listenerManager; |
94 | private Queue m_pending; | 96 | private Queue m_pending; |
95 | private Queue m_pendingQ; | 97 | private Queue m_pendingQ; |
@@ -311,6 +313,10 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm | |||
311 | public bool DeliverMessageTo(UUID target, int channel, Vector3 pos, string name, UUID id, string msg, out string error) | 313 | public bool DeliverMessageTo(UUID target, int channel, Vector3 pos, string name, UUID id, string msg, out string error) |
312 | { | 314 | { |
313 | error = null; | 315 | error = null; |
316 | |||
317 | if (channel == DEBUG_CHANNEL) | ||
318 | return true; | ||
319 | |||
314 | // Is id an avatar? | 320 | // Is id an avatar? |
315 | ScenePresence sp = m_scene.GetScenePresence(target); | 321 | ScenePresence sp = m_scene.GetScenePresence(target); |
316 | 322 | ||
@@ -319,7 +325,9 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm | |||
319 | // Send message to avatar | 325 | // Send message to avatar |
320 | if (channel == 0) | 326 | if (channel == 0) |
321 | { | 327 | { |
322 | m_scene.SimChatBroadcast(Utils.StringToBytes(msg), ChatTypeEnum.Broadcast, 0, pos, name, id, false); | 328 | // Channel 0 goes to viewer ONLY |
329 | m_scene.SimChat(Utils.StringToBytes(msg), ChatTypeEnum.Broadcast, 0, pos, name, id, false, false, target); | ||
330 | return true; | ||
323 | } | 331 | } |
324 | 332 | ||
325 | List<SceneObjectGroup> attachments = sp.GetAttachments(); | 333 | List<SceneObjectGroup> attachments = sp.GetAttachments(); |
@@ -351,12 +359,9 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm | |||
351 | return true; | 359 | return true; |
352 | } | 360 | } |
353 | 361 | ||
354 | // Need to toss an error here | 362 | SceneObjectPart part = m_scene.GetSceneObjectPart(target); |
355 | if (channel == 0) | 363 | if (part == null) // Not even an object |
356 | { | 364 | return true; // No error |
357 | error = "Cannot use llRegionSayTo to message objects on channel 0"; | ||
358 | return false; | ||
359 | } | ||
360 | 365 | ||
361 | foreach (ListenerInfo li in m_listenerManager.GetListeners(UUID.Zero, channel, name, id, msg)) | 366 | foreach (ListenerInfo li in m_listenerManager.GetListeners(UUID.Zero, channel, name, id, msg)) |
362 | { | 367 | { |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index 3ef1e29..431b903 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | |||
@@ -38,8 +38,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
38 | { | 38 | { |
39 | public partial class Scene | 39 | public partial class Scene |
40 | { | 40 | { |
41 | protected void SimChat(byte[] message, ChatTypeEnum type, int channel, Vector3 fromPos, string fromName, | 41 | public void SimChat(byte[] message, ChatTypeEnum type, int channel, Vector3 fromPos, string fromName, |
42 | UUID fromID, bool fromAgent, bool broadcast) | 42 | UUID fromID, bool fromAgent, bool broadcast, UUID destination) |
43 | { | 43 | { |
44 | OSChatMessage args = new OSChatMessage(); | 44 | OSChatMessage args = new OSChatMessage(); |
45 | 45 | ||
@@ -49,6 +49,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
49 | args.Position = fromPos; | 49 | args.Position = fromPos; |
50 | args.SenderUUID = fromID; | 50 | args.SenderUUID = fromID; |
51 | args.Scene = this; | 51 | args.Scene = this; |
52 | args.Destination = destination; | ||
52 | 53 | ||
53 | if (fromAgent) | 54 | if (fromAgent) |
54 | { | 55 | { |
@@ -71,6 +72,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
71 | EventManager.TriggerOnChatFromWorld(this, args); | 72 | EventManager.TriggerOnChatFromWorld(this, args); |
72 | } | 73 | } |
73 | 74 | ||
75 | protected void SimChat(byte[] message, ChatTypeEnum type, int channel, Vector3 fromPos, string fromName, | ||
76 | UUID fromID, bool fromAgent, bool broadcast) | ||
77 | { | ||
78 | SimChat(message, type, channel, fromPos, fromName, fromID, fromAgent, broadcast, UUID.Zero); | ||
79 | } | ||
80 | |||
74 | /// <summary> | 81 | /// <summary> |
75 | /// | 82 | /// |
76 | /// </summary> | 83 | /// </summary> |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index ffa19d9..389980e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -12164,9 +12164,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12164 | 12164 | ||
12165 | ContactResult result = new ContactResult (); | 12165 | ContactResult result = new ContactResult (); |
12166 | result.ConsumerID = group.LocalId; | 12166 | result.ConsumerID = group.LocalId; |
12167 | result.Depth = intersection.distance; | 12167 | // result.Depth = intersection.distance; |
12168 | result.Normal = intersection.normal; | 12168 | result.Normal = intersection.normal; |
12169 | result.Pos = intersection.ipoint; | 12169 | result.Pos = intersection.ipoint; |
12170 | result.Depth = Vector3.Mag(rayStart - result.Pos); | ||
12170 | 12171 | ||
12171 | contacts.Add(result); | 12172 | contacts.Add(result); |
12172 | }); | 12173 | }); |
@@ -12361,7 +12362,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12361 | bool checkPhysical = !((rejectTypes & ScriptBaseClass.RC_REJECT_PHYSICAL) == ScriptBaseClass.RC_REJECT_PHYSICAL); | 12362 | bool checkPhysical = !((rejectTypes & ScriptBaseClass.RC_REJECT_PHYSICAL) == ScriptBaseClass.RC_REJECT_PHYSICAL); |
12362 | 12363 | ||
12363 | 12364 | ||
12364 | if (World.SuportsRayCastFiltered()) | 12365 | if (false)// World.SuportsRayCastFiltered()) |
12365 | { | 12366 | { |
12366 | if (dist == 0) | 12367 | if (dist == 0) |
12367 | return list; | 12368 | return list; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs index 5c6ad8a..a08cc42 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs | |||
@@ -671,7 +671,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
671 | 671 | ||
672 | public static readonly LSLInteger RCERR_UNKNOWN = -1; | 672 | public static readonly LSLInteger RCERR_UNKNOWN = -1; |
673 | public static readonly LSLInteger RCERR_SIM_PERF_LOW = -2; | 673 | public static readonly LSLInteger RCERR_SIM_PERF_LOW = -2; |
674 | public static readonly LSLInteger RCERR_CAST_TIME_EXCEEDED = 3; | 674 | public static readonly LSLInteger RCERR_CAST_TIME_EXCEEDED = -3; |
675 | 675 | ||
676 | public const int KFM_MODE = 1; | 676 | public const int KFM_MODE = 1; |
677 | public const int KFM_LOOP = 1; | 677 | public const int KFM_LOOP = 1; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs index 7e7e278..5c9d30f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs | |||
@@ -197,6 +197,8 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
197 | presence.Velocity.Z); | 197 | presence.Velocity.Z); |
198 | 198 | ||
199 | Type = 0x01; // Avatar | 199 | Type = 0x01; // Avatar |
200 | if (presence.PresenceType == PresenceType.Npc) | ||
201 | Type = 0x20; | ||
200 | if (presence.Velocity != Vector3.Zero) | 202 | if (presence.Velocity != Vector3.Zero) |
201 | Type |= 0x02; // Active | 203 | Type |= 0x02; // Active |
202 | 204 | ||