diff options
author | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
---|---|---|
committer | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
commit | b16abc8166c29585cb76cc55c3bdd76e5833cb4f (patch) | |
tree | 6a34f465a74b7a3a6dc00a3d7aa8dcc25ac3e3a5 /OpenSim/Region/Framework/Scenes | |
parent | Make it possible to disable the bakes module in the way it is described in co... (diff) | |
download | opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.zip opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.gz opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.bz2 opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.xz |
Massive tab and trailing space cleanup
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
54 files changed, 1118 insertions, 1118 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs index eb1a970..4d350dd 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs | |||
@@ -48,16 +48,16 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
48 | private OpenSim.Framework.Animation m_defaultAnimation = new OpenSim.Framework.Animation(); | 48 | private OpenSim.Framework.Animation m_defaultAnimation = new OpenSim.Framework.Animation(); |
49 | private List<OpenSim.Framework.Animation> m_animations = new List<OpenSim.Framework.Animation>(); | 49 | private List<OpenSim.Framework.Animation> m_animations = new List<OpenSim.Framework.Animation>(); |
50 | 50 | ||
51 | public OpenSim.Framework.Animation DefaultAnimation | 51 | public OpenSim.Framework.Animation DefaultAnimation |
52 | { | 52 | { |
53 | get { return m_defaultAnimation; } | 53 | get { return m_defaultAnimation; } |
54 | } | 54 | } |
55 | 55 | ||
56 | public OpenSim.Framework.Animation ImplicitDefaultAnimation | 56 | public OpenSim.Framework.Animation ImplicitDefaultAnimation |
57 | { | 57 | { |
58 | get { return m_implicitDefaultAnimation; } | 58 | get { return m_implicitDefaultAnimation; } |
59 | } | 59 | } |
60 | 60 | ||
61 | public AnimationSet() | 61 | public AnimationSet() |
62 | { | 62 | { |
63 | ResetDefaultAnimation(); | 63 | ResetDefaultAnimation(); |
@@ -101,7 +101,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
101 | /// </summary> | 101 | /// </summary> |
102 | /// <param name='animID'></param> | 102 | /// <param name='animID'></param> |
103 | /// <param name='allowNoDefault'> | 103 | /// <param name='allowNoDefault'> |
104 | /// If true, then the default animation can be entirely removed. | 104 | /// If true, then the default animation can be entirely removed. |
105 | /// If false, then removing the default animation will reset it to the simulator default (currently STAND). | 105 | /// If false, then removing the default animation will reset it to the simulator default (currently STAND). |
106 | /// </param> | 106 | /// </param> |
107 | public bool Remove(UUID animID, bool allowNoDefault) | 107 | public bool Remove(UUID animID, bool allowNoDefault) |
@@ -215,9 +215,9 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
215 | foreach (OpenSim.Framework.Animation anim in m_animations) | 215 | foreach (OpenSim.Framework.Animation anim in m_animations) |
216 | theArray[i++] = anim; | 216 | theArray[i++] = anim; |
217 | } | 217 | } |
218 | catch | 218 | catch |
219 | { | 219 | { |
220 | /* S%^t happens. Ignore. */ | 220 | /* S%^t happens. Ignore. */ |
221 | } | 221 | } |
222 | return theArray; | 222 | return theArray; |
223 | } | 223 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Animation/BinBVHAnimation.cs b/OpenSim/Region/Framework/Scenes/Animation/BinBVHAnimation.cs index b3b38b2..def993f 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/BinBVHAnimation.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/BinBVHAnimation.cs | |||
@@ -33,8 +33,8 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
33 | { | 33 | { |
34 | /// <summary> | 34 | /// <summary> |
35 | /// Written to decode and encode a binary animation asset. | 35 | /// Written to decode and encode a binary animation asset. |
36 | /// The SecondLife Client reads in a BVH file and converts | 36 | /// The SecondLife Client reads in a BVH file and converts |
37 | /// it to the format described here. This isn't | 37 | /// it to the format described here. This isn't |
38 | /// </summary> | 38 | /// </summary> |
39 | public class BinBVHAnimation | 39 | public class BinBVHAnimation |
40 | { | 40 | { |
@@ -109,7 +109,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
109 | /// Contains an array of joints | 109 | /// Contains an array of joints |
110 | /// </summary> | 110 | /// </summary> |
111 | public binBVHJoint[] Joints; | 111 | public binBVHJoint[] Joints; |
112 | 112 | ||
113 | 113 | ||
114 | public byte[] ToBytes() | 114 | public byte[] ToBytes() |
115 | { | 115 | { |
@@ -136,14 +136,14 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
136 | Joints[i].WriteBytesToStream(iostream, InPoint, OutPoint); | 136 | Joints[i].WriteBytesToStream(iostream, InPoint, OutPoint); |
137 | } | 137 | } |
138 | iostream.Write(BinBVHUtil.ES(Utils.IntToBytes(0))); | 138 | iostream.Write(BinBVHUtil.ES(Utils.IntToBytes(0))); |
139 | 139 | ||
140 | using (MemoryStream ms2 = (MemoryStream)iostream.BaseStream) | 140 | using (MemoryStream ms2 = (MemoryStream)iostream.BaseStream) |
141 | outputbytes = ms2.ToArray(); | 141 | outputbytes = ms2.ToArray(); |
142 | } | 142 | } |
143 | 143 | ||
144 | return outputbytes; | 144 | return outputbytes; |
145 | } | 145 | } |
146 | 146 | ||
147 | public BinBVHAnimation() | 147 | public BinBVHAnimation() |
148 | { | 148 | { |
149 | rotationkeys = 0; | 149 | rotationkeys = 0; |
@@ -160,7 +160,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
160 | EaseOutTime = 0; | 160 | EaseOutTime = 0; |
161 | HandPose = 1; | 161 | HandPose = 1; |
162 | m_jointCount = 0; | 162 | m_jointCount = 0; |
163 | 163 | ||
164 | Joints = new binBVHJoint[1]; | 164 | Joints = new binBVHJoint[1]; |
165 | Joints[0] = new binBVHJoint(); | 165 | Joints[0] = new binBVHJoint(); |
166 | Joints[0].Name = "mPelvis"; | 166 | Joints[0].Name = "mPelvis"; |
@@ -180,7 +180,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
180 | Joints[0].positionkeys[0].key_element.X = ((float)rnd.NextDouble() * 2 - 1); | 180 | Joints[0].positionkeys[0].key_element.X = ((float)rnd.NextDouble() * 2 - 1); |
181 | Joints[0].positionkeys[0].key_element.Y = ((float)rnd.NextDouble() * 2 - 1); | 181 | Joints[0].positionkeys[0].key_element.Y = ((float)rnd.NextDouble() * 2 - 1); |
182 | Joints[0].positionkeys[0].key_element.Z = ((float)rnd.NextDouble() * 2 - 1); | 182 | Joints[0].positionkeys[0].key_element.Z = ((float)rnd.NextDouble() * 2 - 1); |
183 | 183 | ||
184 | 184 | ||
185 | } | 185 | } |
186 | 186 | ||
@@ -235,7 +235,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
235 | } | 235 | } |
236 | } | 236 | } |
237 | 237 | ||
238 | 238 | ||
239 | /// <summary> | 239 | /// <summary> |
240 | /// Variable length strings seem to be null terminated in the animation asset.. but.. | 240 | /// Variable length strings seem to be null terminated in the animation asset.. but.. |
241 | /// use with caution, home grown. | 241 | /// use with caution, home grown. |
@@ -294,7 +294,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
294 | /// <returns>The Joint data serialized into the binBVHJoint structure</returns> | 294 | /// <returns>The Joint data serialized into the binBVHJoint structure</returns> |
295 | private binBVHJoint readJoint(byte[] data, ref int i) | 295 | private binBVHJoint readJoint(byte[] data, ref int i) |
296 | { | 296 | { |
297 | 297 | ||
298 | binBVHJointKey[] positions; | 298 | binBVHJointKey[] positions; |
299 | binBVHJointKey[] rotations; | 299 | binBVHJointKey[] rotations; |
300 | 300 | ||
@@ -312,14 +312,14 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
312 | 312 | ||
313 | pJoint.Name = ReadBytesUntilNull(data, ref i); // Joint name | 313 | pJoint.Name = ReadBytesUntilNull(data, ref i); // Joint name |
314 | 314 | ||
315 | /* | 315 | /* |
316 | 2 <- Priority Revisited | 316 | 2 <- Priority Revisited |
317 | 0 | 317 | 0 |
318 | 0 | 318 | 0 |
319 | 0 | 319 | 0 |
320 | */ | 320 | */ |
321 | 321 | ||
322 | /* | 322 | /* |
323 | 5 <-- 5 keyframes | 323 | 5 <-- 5 keyframes |
324 | 0 | 324 | 0 |
325 | 0 | 325 | 0 |
@@ -327,7 +327,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
327 | ... 5 Keyframe data blocks | 327 | ... 5 Keyframe data blocks |
328 | */ | 328 | */ |
329 | 329 | ||
330 | /* | 330 | /* |
331 | 2 <-- 2 keyframes | 331 | 2 <-- 2 keyframes |
332 | 0 | 332 | 0 |
333 | 0 | 333 | 0 |
@@ -428,8 +428,8 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
428 | } | 428 | } |
429 | return m_keys; | 429 | return m_keys; |
430 | } | 430 | } |
431 | 431 | ||
432 | 432 | ||
433 | 433 | ||
434 | } | 434 | } |
435 | /// <summary> | 435 | /// <summary> |
@@ -443,7 +443,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
443 | public string Name; | 443 | public string Name; |
444 | 444 | ||
445 | /// <summary> | 445 | /// <summary> |
446 | /// Joint Animation Override? Was the same as the Priority in testing.. | 446 | /// Joint Animation Override? Was the same as the Priority in testing.. |
447 | /// </summary> | 447 | /// </summary> |
448 | public int Priority; | 448 | public int Priority; |
449 | 449 | ||
@@ -523,7 +523,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
523 | public static class BinBVHUtil | 523 | public static class BinBVHUtil |
524 | { | 524 | { |
525 | public const float ONE_OVER_U16_MAX = 1.0f / UInt16.MaxValue; | 525 | public const float ONE_OVER_U16_MAX = 1.0f / UInt16.MaxValue; |
526 | 526 | ||
527 | public static UInt16 FloatToUInt16(float val, float lower, float upper) | 527 | public static UInt16 FloatToUInt16(float val, float lower, float upper) |
528 | { | 528 | { |
529 | UInt16 uival = 0; | 529 | UInt16 uival = 0; |
@@ -536,7 +536,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
536 | { | 536 | { |
537 | upper -= lower; | 537 | upper -= lower; |
538 | val = val - lower; | 538 | val = val - lower; |
539 | 539 | ||
540 | // start with 500 upper and 200 lower.. subtract 200 from the upper and the value | 540 | // start with 500 upper and 200 lower.. subtract 200 from the upper and the value |
541 | } | 541 | } |
542 | else //if (lower < 0 && upper > 0) | 542 | else //if (lower < 0 && upper > 0) |
@@ -558,8 +558,8 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
558 | 558 | ||
559 | return uival; | 559 | return uival; |
560 | } | 560 | } |
561 | 561 | ||
562 | 562 | ||
563 | /// <summary> | 563 | /// <summary> |
564 | /// Endian Swap | 564 | /// Endian Swap |
565 | /// Swaps endianness if necessary | 565 | /// Swaps endianness if necessary |
@@ -590,7 +590,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
590 | output[i] = Convert.ToByte(chr[i]); | 590 | output[i] = Convert.ToByte(chr[i]); |
591 | 591 | ||
592 | } | 592 | } |
593 | 593 | ||
594 | output[i] = Convert.ToByte('\0'); | 594 | output[i] = Convert.ToByte('\0'); |
595 | return output; | 595 | return output; |
596 | } | 596 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs b/OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs index b79dd8f..b8db3a9 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs | |||
@@ -55,7 +55,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
55 | private static void LoadAnimations(string path) | 55 | private static void LoadAnimations(string path) |
56 | { | 56 | { |
57 | // Dictionary<string, UUID> animations = new Dictionary<string, UUID>(); | 57 | // Dictionary<string, UUID> animations = new Dictionary<string, UUID>(); |
58 | 58 | ||
59 | using (XmlTextReader reader = new XmlTextReader(path)) | 59 | using (XmlTextReader reader = new XmlTextReader(path)) |
60 | { | 60 | { |
61 | XmlDocument doc = new XmlDocument(); | 61 | XmlDocument doc = new XmlDocument(); |
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs index 13d4562..6b31555 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs | |||
@@ -123,7 +123,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
123 | /// </summary> | 123 | /// </summary> |
124 | /// <param name='animID'></param> | 124 | /// <param name='animID'></param> |
125 | /// <param name='allowNoDefault'> | 125 | /// <param name='allowNoDefault'> |
126 | /// If true, then the default animation can be entirely removed. | 126 | /// If true, then the default animation can be entirely removed. |
127 | /// If false, then removing the default animation will reset it to the simulator default (currently STAND). | 127 | /// If false, then removing the default animation will reset it to the simulator default (currently STAND). |
128 | /// </param> | 128 | /// </param> |
129 | public void RemoveAnimation(UUID animID, bool allowNoDefault) | 129 | public void RemoveAnimation(UUID animID, bool allowNoDefault) |
@@ -192,7 +192,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
192 | /// that are mutually exclusive, e.g. flying and sitting. | 192 | /// that are mutually exclusive, e.g. flying and sitting. |
193 | /// </summary> | 193 | /// </summary> |
194 | /// <returns>'true' if the animation was updated</returns> | 194 | /// <returns>'true' if the animation was updated</returns> |
195 | /// | 195 | /// |
196 | 196 | ||
197 | 197 | ||
198 | 198 | ||
@@ -488,7 +488,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
488 | m_animTickLand = Environment.TickCount; | 488 | m_animTickLand = Environment.TickCount; |
489 | // TODO: SOFT_LAND support | 489 | // TODO: SOFT_LAND support |
490 | float fallVsq = m_lastFallVelocity * m_lastFallVelocity; | 490 | float fallVsq = m_lastFallVelocity * m_lastFallVelocity; |
491 | if (fallVsq > 300f) // aprox 20*h | 491 | if (fallVsq > 300f) // aprox 20*h |
492 | return "STANDUP"; | 492 | return "STANDUP"; |
493 | else if (fallVsq > 160f) | 493 | else if (fallVsq > 160f) |
494 | return "SOFT_LAND"; | 494 | return "SOFT_LAND"; |
diff --git a/OpenSim/Region/Framework/Scenes/AsyncInventorySender.cs b/OpenSim/Region/Framework/Scenes/AsyncInventorySender.cs index 4362e28..c874fdb 100644 --- a/OpenSim/Region/Framework/Scenes/AsyncInventorySender.cs +++ b/OpenSim/Region/Framework/Scenes/AsyncInventorySender.cs | |||
@@ -144,10 +144,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
144 | // "[ASYNC INVENTORY SENDER]: Handling request from {0} for {1} on queue", fh.Client.Name, fh.ItemID); | 144 | // "[ASYNC INVENTORY SENDER]: Handling request from {0} for {1} on queue", fh.Client.Name, fh.ItemID); |
145 | 145 | ||
146 | InventoryItemBase item = m_scene.InventoryService.GetItem(fh.Client.AgentId, fh.ItemID); | 146 | InventoryItemBase item = m_scene.InventoryService.GetItem(fh.Client.AgentId, fh.ItemID); |
147 | 147 | ||
148 | if (item != null) | 148 | if (item != null) |
149 | fh.Client.SendInventoryItemDetails(item.Owner, item); | 149 | fh.Client.SendInventoryItemDetails(item.Owner, item); |
150 | 150 | ||
151 | // TODO: Possibly log any failure | 151 | // TODO: Possibly log any failure |
152 | } | 152 | } |
153 | } | 153 | } |
diff --git a/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs b/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs index 11a0146..7509686 100644 --- a/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs +++ b/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs | |||
@@ -44,29 +44,29 @@ namespace OpenSim.Region.Framework.Scenes | |||
44 | public UUID folderID; | 44 | public UUID folderID; |
45 | public bool permissionToDelete; | 45 | public bool permissionToDelete; |
46 | } | 46 | } |
47 | 47 | ||
48 | /// <summary> | 48 | /// <summary> |
49 | /// Asynchronously derez objects. This is used to derez large number of objects to inventory without holding | 49 | /// Asynchronously derez objects. This is used to derez large number of objects to inventory without holding |
50 | /// up the main client thread. | 50 | /// up the main client thread. |
51 | /// </summary> | 51 | /// </summary> |
52 | public class AsyncSceneObjectGroupDeleter | 52 | public class AsyncSceneObjectGroupDeleter |
53 | { | 53 | { |
54 | private static readonly ILog m_log | 54 | private static readonly ILog m_log |
55 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 55 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
56 | 56 | ||
57 | /// <value> | 57 | /// <value> |
58 | /// Is the deleter currently enabled? | 58 | /// Is the deleter currently enabled? |
59 | /// </value> | 59 | /// </value> |
60 | public bool Enabled; | 60 | public bool Enabled; |
61 | 61 | ||
62 | private Timer m_inventoryTicker = new Timer(2000); | 62 | private Timer m_inventoryTicker = new Timer(2000); |
63 | private readonly Queue<DeleteToInventoryHolder> m_inventoryDeletes = new Queue<DeleteToInventoryHolder>(); | 63 | private readonly Queue<DeleteToInventoryHolder> m_inventoryDeletes = new Queue<DeleteToInventoryHolder>(); |
64 | private Scene m_scene; | 64 | private Scene m_scene; |
65 | 65 | ||
66 | public AsyncSceneObjectGroupDeleter(Scene scene) | 66 | public AsyncSceneObjectGroupDeleter(Scene scene) |
67 | { | 67 | { |
68 | m_scene = scene; | 68 | m_scene = scene; |
69 | 69 | ||
70 | m_inventoryTicker.AutoReset = false; | 70 | m_inventoryTicker.AutoReset = false; |
71 | m_inventoryTicker.Elapsed += InventoryRunDeleteTimer; | 71 | m_inventoryTicker.Elapsed += InventoryRunDeleteTimer; |
72 | } | 72 | } |
@@ -75,7 +75,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
75 | /// Delete the given object from the scene | 75 | /// Delete the given object from the scene |
76 | /// </summary> | 76 | /// </summary> |
77 | public void DeleteToInventory(DeRezAction action, UUID folderID, | 77 | public void DeleteToInventory(DeRezAction action, UUID folderID, |
78 | List<SceneObjectGroup> objectGroups, IClientAPI remoteClient, | 78 | List<SceneObjectGroup> objectGroups, IClientAPI remoteClient, |
79 | bool permissionToDelete) | 79 | bool permissionToDelete) |
80 | { | 80 | { |
81 | if (Enabled) | 81 | if (Enabled) |
@@ -97,7 +97,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
97 | if (Enabled) | 97 | if (Enabled) |
98 | lock (m_inventoryTicker) | 98 | lock (m_inventoryTicker) |
99 | m_inventoryTicker.Start(); | 99 | m_inventoryTicker.Start(); |
100 | 100 | ||
101 | // Visually remove it, even if it isnt really gone yet. This means that if we crash before the object | 101 | // Visually remove it, even if it isnt really gone yet. This means that if we crash before the object |
102 | // has gone to inventory, it will reappear in the region again on restart instead of being lost. | 102 | // has gone to inventory, it will reappear in the region again on restart instead of being lost. |
103 | // This is not ideal since the object will still be available for manipulation when it should be, but it's | 103 | // This is not ideal since the object will still be available for manipulation when it should be, but it's |
@@ -108,7 +108,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
108 | g.DeleteGroupFromScene(false); | 108 | g.DeleteGroupFromScene(false); |
109 | } | 109 | } |
110 | } | 110 | } |
111 | 111 | ||
112 | private void InventoryRunDeleteTimer(object sender, ElapsedEventArgs e) | 112 | private void InventoryRunDeleteTimer(object sender, ElapsedEventArgs e) |
113 | { | 113 | { |
114 | // m_log.Debug("[ASYNC DELETER]: Starting send to inventory loop"); | 114 | // m_log.Debug("[ASYNC DELETER]: Starting send to inventory loop"); |
@@ -116,8 +116,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
116 | // We must set appearance parameters in the en_US culture in order to avoid issues where values are saved | 116 | // We must set appearance parameters in the en_US culture in order to avoid issues where values are saved |
117 | // in a culture where decimal points are commas and then reloaded in a culture which just treats them as | 117 | // in a culture where decimal points are commas and then reloaded in a culture which just treats them as |
118 | // number seperators. | 118 | // number seperators. |
119 | Culture.SetCurrentCulture(); | 119 | Culture.SetCurrentCulture(); |
120 | 120 | ||
121 | while (InventoryDeQueueAndDelete()) | 121 | while (InventoryDeQueueAndDelete()) |
122 | { | 122 | { |
123 | //m_log.Debug("[ASYNC DELETER]: Sent item successfully to inventory, continuing..."); | 123 | //m_log.Debug("[ASYNC DELETER]: Sent item successfully to inventory, continuing..."); |
@@ -131,7 +131,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
131 | public bool InventoryDeQueueAndDelete() | 131 | public bool InventoryDeQueueAndDelete() |
132 | { | 132 | { |
133 | DeleteToInventoryHolder x = null; | 133 | DeleteToInventoryHolder x = null; |
134 | 134 | ||
135 | try | 135 | try |
136 | { | 136 | { |
137 | lock (m_inventoryDeletes) | 137 | lock (m_inventoryDeletes) |
@@ -144,13 +144,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
144 | // m_log.DebugFormat( | 144 | // m_log.DebugFormat( |
145 | // "[ASYNC DELETER]: Sending object to user's inventory, action {1}, count {2}, {0} item(s) remaining.", | 145 | // "[ASYNC DELETER]: Sending object to user's inventory, action {1}, count {2}, {0} item(s) remaining.", |
146 | // left, x.action, x.objectGroups.Count); | 146 | // left, x.action, x.objectGroups.Count); |
147 | 147 | ||
148 | try | 148 | try |
149 | { | 149 | { |
150 | IInventoryAccessModule invAccess = m_scene.RequestModuleInterface<IInventoryAccessModule>(); | 150 | IInventoryAccessModule invAccess = m_scene.RequestModuleInterface<IInventoryAccessModule>(); |
151 | if (invAccess != null) | 151 | if (invAccess != null) |
152 | invAccess.CopyToInventory(x.action, x.folderID, x.objectGroups, x.remoteClient, false); | 152 | invAccess.CopyToInventory(x.action, x.folderID, x.objectGroups, x.remoteClient, false); |
153 | 153 | ||
154 | if (x.permissionToDelete) | 154 | if (x.permissionToDelete) |
155 | { | 155 | { |
156 | foreach (SceneObjectGroup g in x.objectGroups) | 156 | foreach (SceneObjectGroup g in x.objectGroups) |
@@ -162,7 +162,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
162 | m_log.ErrorFormat( | 162 | m_log.ErrorFormat( |
163 | "[ASYNC DELETER]: Exception background sending object: {0}{1}", e.Message, e.StackTrace); | 163 | "[ASYNC DELETER]: Exception background sending object: {0}{1}", e.Message, e.StackTrace); |
164 | } | 164 | } |
165 | 165 | ||
166 | return true; | 166 | return true; |
167 | } | 167 | } |
168 | } | 168 | } |
@@ -173,14 +173,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
173 | // FIXME: This needs to be fixed. | 173 | // FIXME: This needs to be fixed. |
174 | m_log.ErrorFormat( | 174 | m_log.ErrorFormat( |
175 | "[ASYNC DELETER]: Queued sending of scene object to agent {0} {1} failed: {2} {3}", | 175 | "[ASYNC DELETER]: Queued sending of scene object to agent {0} {1} failed: {2} {3}", |
176 | (x != null ? x.remoteClient.Name : "unavailable"), | 176 | (x != null ? x.remoteClient.Name : "unavailable"), |
177 | (x != null ? x.remoteClient.AgentId.ToString() : "unavailable"), | 177 | (x != null ? x.remoteClient.AgentId.ToString() : "unavailable"), |
178 | e.Message, | 178 | e.Message, |
179 | e.StackTrace); | 179 | e.StackTrace); |
180 | } | 180 | } |
181 | 181 | ||
182 | // m_log.Debug("[ASYNC DELETER]: No objects left in inventory send queue."); | 182 | // m_log.Debug("[ASYNC DELETER]: No objects left in inventory send queue."); |
183 | 183 | ||
184 | return false; | 184 | return false; |
185 | } | 185 | } |
186 | } | 186 | } |
diff --git a/OpenSim/Region/Framework/Scenes/CoalescedSceneObjects.cs b/OpenSim/Region/Framework/Scenes/CoalescedSceneObjects.cs index af8ccda..8831764 100644 --- a/OpenSim/Region/Framework/Scenes/CoalescedSceneObjects.cs +++ b/OpenSim/Region/Framework/Scenes/CoalescedSceneObjects.cs | |||
@@ -37,12 +37,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
37 | /// are grouped together. | 37 | /// are grouped together. |
38 | /// </summary> | 38 | /// </summary> |
39 | public class CoalescedSceneObjects | 39 | public class CoalescedSceneObjects |
40 | { | 40 | { |
41 | /// <summary> | 41 | /// <summary> |
42 | /// The creator of this coalesence, though not necessarily the objects within it. | 42 | /// The creator of this coalesence, though not necessarily the objects within it. |
43 | /// </summary> | 43 | /// </summary> |
44 | public UUID CreatorId { get; set; } | 44 | public UUID CreatorId { get; set; } |
45 | 45 | ||
46 | /// <summary> | 46 | /// <summary> |
47 | /// The number of objects in this coalesence | 47 | /// The number of objects in this coalesence |
48 | /// </summary> | 48 | /// </summary> |
@@ -54,12 +54,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
54 | return m_memberObjects.Count; | 54 | return m_memberObjects.Count; |
55 | } | 55 | } |
56 | } | 56 | } |
57 | 57 | ||
58 | /// <summary> | 58 | /// <summary> |
59 | /// Does this coalesence have any member objects? | 59 | /// Does this coalesence have any member objects? |
60 | /// </summary> | 60 | /// </summary> |
61 | public bool HasObjects { get { return Count > 0; } } | 61 | public bool HasObjects { get { return Count > 0; } } |
62 | 62 | ||
63 | /// <summary> | 63 | /// <summary> |
64 | /// Get the objects currently in this coalescence | 64 | /// Get the objects currently in this coalescence |
65 | /// </summary> | 65 | /// </summary> |
@@ -70,13 +70,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
70 | lock (m_memberObjects) | 70 | lock (m_memberObjects) |
71 | return new List<SceneObjectGroup>(m_memberObjects); | 71 | return new List<SceneObjectGroup>(m_memberObjects); |
72 | } | 72 | } |
73 | } | 73 | } |
74 | 74 | ||
75 | /// <summary> | 75 | /// <summary> |
76 | /// Get the scene that contains the objects in this coalescence. If there are no objects then null is returned. | 76 | /// Get the scene that contains the objects in this coalescence. If there are no objects then null is returned. |
77 | /// </summary> | 77 | /// </summary> |
78 | public Scene Scene | 78 | public Scene Scene |
79 | { | 79 | { |
80 | get | 80 | get |
81 | { | 81 | { |
82 | if (!HasObjects) | 82 | if (!HasObjects) |
@@ -85,24 +85,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
85 | return Objects[0].Scene; | 85 | return Objects[0].Scene; |
86 | } | 86 | } |
87 | } | 87 | } |
88 | 88 | ||
89 | /// <summary> | 89 | /// <summary> |
90 | /// At this point, we need to preserve the order of objects added to the coalescence, since the first | 90 | /// At this point, we need to preserve the order of objects added to the coalescence, since the first |
91 | /// one will end up matching the item name when rerezzed. | 91 | /// one will end up matching the item name when rerezzed. |
92 | /// </summary> | 92 | /// </summary> |
93 | protected List<SceneObjectGroup> m_memberObjects = new List<SceneObjectGroup>(); | 93 | protected List<SceneObjectGroup> m_memberObjects = new List<SceneObjectGroup>(); |
94 | 94 | ||
95 | public CoalescedSceneObjects(UUID creatorId) | 95 | public CoalescedSceneObjects(UUID creatorId) |
96 | { | 96 | { |
97 | CreatorId = creatorId; | 97 | CreatorId = creatorId; |
98 | } | 98 | } |
99 | 99 | ||
100 | public CoalescedSceneObjects(UUID creatorId, params SceneObjectGroup[] objs) : this(creatorId) | 100 | public CoalescedSceneObjects(UUID creatorId, params SceneObjectGroup[] objs) : this(creatorId) |
101 | { | 101 | { |
102 | foreach (SceneObjectGroup obj in objs) | 102 | foreach (SceneObjectGroup obj in objs) |
103 | Add(obj); | 103 | Add(obj); |
104 | } | 104 | } |
105 | 105 | ||
106 | /// <summary> | 106 | /// <summary> |
107 | /// Add an object to the coalescence. | 107 | /// Add an object to the coalescence. |
108 | /// </summary> | 108 | /// </summary> |
@@ -113,7 +113,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
113 | lock (m_memberObjects) | 113 | lock (m_memberObjects) |
114 | m_memberObjects.Add(obj); | 114 | m_memberObjects.Add(obj); |
115 | } | 115 | } |
116 | 116 | ||
117 | /// <summary> | 117 | /// <summary> |
118 | /// Removes a scene object from the coalescene | 118 | /// Removes a scene object from the coalescene |
119 | /// </summary> | 119 | /// </summary> |
@@ -124,7 +124,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
124 | lock (m_memberObjects) | 124 | lock (m_memberObjects) |
125 | return m_memberObjects.Remove(obj); | 125 | return m_memberObjects.Remove(obj); |
126 | } | 126 | } |
127 | 127 | ||
128 | /// <summary> | 128 | /// <summary> |
129 | /// Get the total size of the coalescence (the size required to cover all the objects within it) and the | 129 | /// Get the total size of the coalescence (the size required to cover all the objects within it) and the |
130 | /// offsets of each of those objects. | 130 | /// offsets of each of those objects. |
@@ -138,16 +138,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
138 | float minX, minY, minZ; | 138 | float minX, minY, minZ; |
139 | float maxX, maxY, maxZ; | 139 | float maxX, maxY, maxZ; |
140 | 140 | ||
141 | Vector3[] offsets | 141 | Vector3[] offsets |
142 | = Scene.GetCombinedBoundingBox( | 142 | = Scene.GetCombinedBoundingBox( |
143 | Objects, out minX, out maxX, out minY, out maxY, out minZ, out maxZ); | 143 | Objects, out minX, out maxX, out minY, out maxY, out minZ, out maxZ); |
144 | 144 | ||
145 | float sizeX = maxX - minX; | 145 | float sizeX = maxX - minX; |
146 | float sizeY = maxY - minY; | 146 | float sizeY = maxY - minY; |
147 | float sizeZ = maxZ - minZ; | 147 | float sizeZ = maxZ - minZ; |
148 | 148 | ||
149 | size = new Vector3(sizeX, sizeY, sizeZ); | 149 | size = new Vector3(sizeX, sizeY, sizeZ); |
150 | 150 | ||
151 | return offsets; | 151 | return offsets; |
152 | } | 152 | } |
153 | } | 153 | } |
diff --git a/OpenSim/Region/Framework/Scenes/CollisionSounds.cs b/OpenSim/Region/Framework/Scenes/CollisionSounds.cs index 84817a0..e76fef4 100644 --- a/OpenSim/Region/Framework/Scenes/CollisionSounds.cs +++ b/OpenSim/Region/Framework/Scenes/CollisionSounds.cs | |||
@@ -113,7 +113,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
113 | snd_StonePlastic, snd_MetalPlastic, snd_GlassPlastic, snd_WoodPlastic, snd_FleshPlastic, snd_PlasticPlastic, snd_PlasticRubber, | 113 | snd_StonePlastic, snd_MetalPlastic, snd_GlassPlastic, snd_WoodPlastic, snd_FleshPlastic, snd_PlasticPlastic, snd_PlasticRubber, |
114 | snd_StoneRubber, snd_MetalRubber, snd_GlassRubber, snd_WoodRubber, snd_FleshRubber, snd_PlasticRubber, snd_RubberRubber | 114 | snd_StoneRubber, snd_MetalRubber, snd_GlassRubber, snd_WoodRubber, snd_FleshRubber, snd_PlasticRubber, snd_RubberRubber |
115 | }; | 115 | }; |
116 | 116 | ||
117 | public static void PartCollisionSound(SceneObjectPart part, List<CollisionForSoundInfo> collidersinfolist) | 117 | public static void PartCollisionSound(SceneObjectPart part, List<CollisionForSoundInfo> collidersinfolist) |
118 | { | 118 | { |
119 | if (collidersinfolist.Count == 0 || part == null) | 119 | if (collidersinfolist.Count == 0 || part == null) |
diff --git a/OpenSim/Region/Framework/Scenes/EntityManager.cs b/OpenSim/Region/Framework/Scenes/EntityManager.cs index 7181313..4654efe 100644 --- a/OpenSim/Region/Framework/Scenes/EntityManager.cs +++ b/OpenSim/Region/Framework/Scenes/EntityManager.cs | |||
@@ -38,8 +38,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
38 | public class EntityManager | 38 | public class EntityManager |
39 | { | 39 | { |
40 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 40 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
41 | 41 | ||
42 | private readonly DoubleDictionaryThreadAbortSafe<UUID, uint, EntityBase> m_entities | 42 | private readonly DoubleDictionaryThreadAbortSafe<UUID, uint, EntityBase> m_entities |
43 | = new DoubleDictionaryThreadAbortSafe<UUID, uint, EntityBase>(); | 43 | = new DoubleDictionaryThreadAbortSafe<UUID, uint, EntityBase>(); |
44 | 44 | ||
45 | public int Count | 45 | public int Count |
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 6ff3049..1e9711d 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -44,7 +44,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
44 | public class EventManager | 44 | public class EventManager |
45 | { | 45 | { |
46 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 46 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
47 | 47 | ||
48 | public delegate void OnFrameDelegate(); | 48 | public delegate void OnFrameDelegate(); |
49 | 49 | ||
50 | /// <summary> | 50 | /// <summary> |
@@ -121,7 +121,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
121 | public event OnClientConnectCoreDelegate OnClientConnect; | 121 | public event OnClientConnectCoreDelegate OnClientConnect; |
122 | 122 | ||
123 | public delegate void OnNewClientDelegate(IClientAPI client); | 123 | public delegate void OnNewClientDelegate(IClientAPI client); |
124 | 124 | ||
125 | /// <summary> | 125 | /// <summary> |
126 | /// Triggered when a new client is added to the scene. | 126 | /// Triggered when a new client is added to the scene. |
127 | /// </summary> | 127 | /// </summary> |
@@ -163,7 +163,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
163 | /// <remarks> | 163 | /// <remarks> |
164 | /// Triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.AddNewAgent"/> which is used by both | 164 | /// Triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.AddNewAgent"/> which is used by both |
165 | /// <see cref="OpenSim.Framework.PresenceType.User">users</see> and <see cref="OpenSim.Framework.PresenceType.Npc">NPCs</see> | 165 | /// <see cref="OpenSim.Framework.PresenceType.User">users</see> and <see cref="OpenSim.Framework.PresenceType.Npc">NPCs</see> |
166 | /// | 166 | /// |
167 | /// Triggered under per-agent lock. So if you want to perform any long-running operations, please | 167 | /// Triggered under per-agent lock. So if you want to perform any long-running operations, please |
168 | /// do this on a separate thread. | 168 | /// do this on a separate thread. |
169 | /// </remarks> | 169 | /// </remarks> |
@@ -223,7 +223,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
223 | /// Triggered when the entire simulator is shutdown. | 223 | /// Triggered when the entire simulator is shutdown. |
224 | /// </summary> | 224 | /// </summary> |
225 | public event Action OnShutdown; | 225 | public event Action OnShutdown; |
226 | 226 | ||
227 | public delegate void ObjectDeGrabDelegate(uint localID, uint originalID, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs); | 227 | public delegate void ObjectDeGrabDelegate(uint localID, uint originalID, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs); |
228 | public delegate void ScriptResetDelegate(uint localID, UUID itemID); | 228 | public delegate void ScriptResetDelegate(uint localID, UUID itemID); |
229 | 229 | ||
@@ -276,7 +276,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
276 | /// </remarks> | 276 | /// </remarks> |
277 | public event ObjectGrabDelegate OnObjectGrab; | 277 | public event ObjectGrabDelegate OnObjectGrab; |
278 | public delegate void ObjectGrabDelegate(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs); | 278 | public delegate void ObjectGrabDelegate(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs); |
279 | 279 | ||
280 | /// <summary> | 280 | /// <summary> |
281 | /// Triggered when an object is being touched/grabbed continuously. | 281 | /// Triggered when an object is being touched/grabbed continuously. |
282 | /// </summary> | 282 | /// </summary> |
@@ -503,7 +503,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
503 | /// via <see cref="OpenSim.Region.ClientStack.Linden.TaskInventoryScriptUpdater.uploaderCaps"/> | 503 | /// via <see cref="OpenSim.Region.ClientStack.Linden.TaskInventoryScriptUpdater.uploaderCaps"/> |
504 | /// </remarks> | 504 | /// </remarks> |
505 | public event UpdateScript OnUpdateScript; | 505 | public event UpdateScript OnUpdateScript; |
506 | 506 | ||
507 | public virtual void TriggerUpdateScript(UUID clientId, UUID itemId, UUID primId, bool isScriptRunning, UUID newAssetID) | 507 | public virtual void TriggerUpdateScript(UUID clientId, UUID itemId, UUID primId, bool isScriptRunning, UUID newAssetID) |
508 | { | 508 | { |
509 | UpdateScript handlerUpdateScript = OnUpdateScript; | 509 | UpdateScript handlerUpdateScript = OnUpdateScript; |
@@ -523,16 +523,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
523 | } | 523 | } |
524 | } | 524 | } |
525 | } | 525 | } |
526 | } | 526 | } |
527 | 527 | ||
528 | /// <summary> | 528 | /// <summary> |
529 | /// Triggered when some scene object properties change. | 529 | /// Triggered when some scene object properties change. |
530 | /// </summary> | 530 | /// </summary> |
531 | /// <remarks> | 531 | /// <remarks> |
532 | /// ScriptChangedEvent is fired when a scene object property that a script might be interested | 532 | /// ScriptChangedEvent is fired when a scene object property that a script might be interested |
533 | /// in (such as color, scale or inventory) changes. Only enough information sent is for the LSL changed event. | 533 | /// in (such as color, scale or inventory) changes. Only enough information sent is for the LSL changed event. |
534 | /// This is not an indication that the script has changed (see OnUpdateScript for that). | 534 | /// This is not an indication that the script has changed (see OnUpdateScript for that). |
535 | /// This event is sent to a script to tell it that some property changed on | 535 | /// This event is sent to a script to tell it that some property changed on |
536 | /// the object the script is in. See http://lslwiki.net/lslwiki/wakka.php?wakka=changed . | 536 | /// the object the script is in. See http://lslwiki.net/lslwiki/wakka.php?wakka=changed . |
537 | /// Triggered by <see cref="TriggerOnScriptChangedEvent"/> | 537 | /// Triggered by <see cref="TriggerOnScriptChangedEvent"/> |
538 | /// in <see cref="OpenSim.Region.CoreModules.Framework.EntityTransfer.EntityTransferModule.TeleportAgentWithinRegion"/>, | 538 | /// in <see cref="OpenSim.Region.CoreModules.Framework.EntityTransfer.EntityTransferModule.TeleportAgentWithinRegion"/>, |
@@ -561,7 +561,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
561 | /// TODO: Should be triggered when a physics object starts moving. | 561 | /// TODO: Should be triggered when a physics object starts moving. |
562 | /// </summary> | 562 | /// </summary> |
563 | public event ScriptMovingStartEvent OnScriptMovingStartEvent; | 563 | public event ScriptMovingStartEvent OnScriptMovingStartEvent; |
564 | 564 | ||
565 | public delegate void ScriptMovingEndEvent(uint localID); | 565 | public delegate void ScriptMovingEndEvent(uint localID); |
566 | 566 | ||
567 | /// <summary> | 567 | /// <summary> |
@@ -738,7 +738,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
738 | /// and <see cref="ScenePresence.CompleteMovement"/> | 738 | /// and <see cref="ScenePresence.CompleteMovement"/> |
739 | /// </remarks> | 739 | /// </remarks> |
740 | public event Action<ScenePresence> OnMakeRootAgent; | 740 | public event Action<ScenePresence> OnMakeRootAgent; |
741 | 741 | ||
742 | public event OnSendNewWindlightProfileTargetedDelegate OnSendNewWindlightProfileTargeted; | 742 | public event OnSendNewWindlightProfileTargetedDelegate OnSendNewWindlightProfileTargeted; |
743 | public event OnSaveNewWindlightProfileDelegate OnSaveNewWindlightProfile; | 743 | public event OnSaveNewWindlightProfileDelegate OnSaveNewWindlightProfile; |
744 | 744 | ||
@@ -755,7 +755,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
755 | public delegate void RequestChangeWaterHeight(float height); | 755 | public delegate void RequestChangeWaterHeight(float height); |
756 | 756 | ||
757 | public event RequestChangeWaterHeight OnRequestChangeWaterHeight; | 757 | public event RequestChangeWaterHeight OnRequestChangeWaterHeight; |
758 | 758 | ||
759 | /// <summary> | 759 | /// <summary> |
760 | /// Fired if any avatar is 'killed' due to its health falling to zero | 760 | /// Fired if any avatar is 'killed' due to its health falling to zero |
761 | /// </summary> | 761 | /// </summary> |
@@ -778,7 +778,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
778 | public delegate void GetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID); | 778 | public delegate void GetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID); |
779 | 779 | ||
780 | public event EstateToolsSunUpdate OnEstateToolsSunUpdate; | 780 | public event EstateToolsSunUpdate OnEstateToolsSunUpdate; |
781 | 781 | ||
782 | /// <summary> | 782 | /// <summary> |
783 | /// Triggered when an object is added to the scene. | 783 | /// Triggered when an object is added to the scene. |
784 | /// </summary> | 784 | /// </summary> |
@@ -789,7 +789,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
789 | /// <see cref="Scene.doObjectDuplicateOnRay"/> | 789 | /// <see cref="Scene.doObjectDuplicateOnRay"/> |
790 | /// </remarks> | 790 | /// </remarks> |
791 | public event Action<SceneObjectGroup> OnObjectAddedToScene; | 791 | public event Action<SceneObjectGroup> OnObjectAddedToScene; |
792 | 792 | ||
793 | /// <summary> | 793 | /// <summary> |
794 | /// When a client sends a derez request for an object inworld | 794 | /// When a client sends a derez request for an object inworld |
795 | /// but before the object is deleted | 795 | /// but before the object is deleted |
@@ -872,21 +872,21 @@ namespace OpenSim.Region.Framework.Scenes | |||
872 | /// </summary> | 872 | /// </summary> |
873 | public delegate void RegisterCapsEvent(UUID agentID, Caps caps); | 873 | public delegate void RegisterCapsEvent(UUID agentID, Caps caps); |
874 | public event RegisterCapsEvent OnRegisterCaps; | 874 | public event RegisterCapsEvent OnRegisterCaps; |
875 | 875 | ||
876 | /// <summary> | 876 | /// <summary> |
877 | /// DeregisterCapsEvent is called by Scene when the caps | 877 | /// DeregisterCapsEvent is called by Scene when the caps |
878 | /// handler for an agent are removed. | 878 | /// handler for an agent are removed. |
879 | /// </summary> | 879 | /// </summary> |
880 | public delegate void DeregisterCapsEvent(UUID agentID, Caps caps); | 880 | public delegate void DeregisterCapsEvent(UUID agentID, Caps caps); |
881 | public event DeregisterCapsEvent OnDeregisterCaps; | 881 | public event DeregisterCapsEvent OnDeregisterCaps; |
882 | 882 | ||
883 | /// <summary> | 883 | /// <summary> |
884 | /// ChatFromWorldEvent is called via Scene when a chat message | 884 | /// ChatFromWorldEvent is called via Scene when a chat message |
885 | /// from world comes in. | 885 | /// from world comes in. |
886 | /// </summary> | 886 | /// </summary> |
887 | public delegate void ChatFromWorldEvent(Object sender, OSChatMessage chat); | 887 | public delegate void ChatFromWorldEvent(Object sender, OSChatMessage chat); |
888 | public event ChatFromWorldEvent OnChatFromWorld; | 888 | public event ChatFromWorldEvent OnChatFromWorld; |
889 | 889 | ||
890 | /// <summary> | 890 | /// <summary> |
891 | /// ChatFromClientEvent is triggered via ChatModule (or | 891 | /// ChatFromClientEvent is triggered via ChatModule (or |
892 | /// substitutes thereof) when a chat message | 892 | /// substitutes thereof) when a chat message |
@@ -894,18 +894,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
894 | /// </summary> | 894 | /// </summary> |
895 | public delegate void ChatFromClientEvent(Object sender, OSChatMessage chat); | 895 | public delegate void ChatFromClientEvent(Object sender, OSChatMessage chat); |
896 | public event ChatFromClientEvent OnChatFromClient; | 896 | public event ChatFromClientEvent OnChatFromClient; |
897 | 897 | ||
898 | /// <summary> | 898 | /// <summary> |
899 | /// ChatToClientsEvent is triggered via ChatModule (or | 899 | /// ChatToClientsEvent is triggered via ChatModule (or |
900 | /// substitutes thereof) when a chat message is actually sent to clients. Clients will only be sent a | 900 | /// substitutes thereof) when a chat message is actually sent to clients. Clients will only be sent a |
901 | /// received chat message if they satisfy various conditions (within audible range, etc.) | 901 | /// received chat message if they satisfy various conditions (within audible range, etc.) |
902 | /// </summary> | 902 | /// </summary> |
903 | public delegate void ChatToClientsEvent( | 903 | public delegate void ChatToClientsEvent( |
904 | UUID senderID, HashSet<UUID> receiverIDs, | 904 | UUID senderID, HashSet<UUID> receiverIDs, |
905 | string message, ChatTypeEnum type, Vector3 fromPos, string fromName, | 905 | string message, ChatTypeEnum type, Vector3 fromPos, string fromName, |
906 | ChatSourceType src, ChatAudibleLevel level); | 906 | ChatSourceType src, ChatAudibleLevel level); |
907 | public event ChatToClientsEvent OnChatToClients; | 907 | public event ChatToClientsEvent OnChatToClients; |
908 | 908 | ||
909 | /// <summary> | 909 | /// <summary> |
910 | /// ChatBroadcastEvent is called via Scene when a broadcast chat message | 910 | /// ChatBroadcastEvent is called via Scene when a broadcast chat message |
911 | /// from world comes in | 911 | /// from world comes in |
@@ -923,11 +923,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
923 | /// </summary> | 923 | /// </summary> |
924 | public delegate void OarFileLoaded(Guid guid, List<UUID> loadedScenes, string message); | 924 | public delegate void OarFileLoaded(Guid guid, List<UUID> loadedScenes, string message); |
925 | public event OarFileLoaded OnOarFileLoaded; | 925 | public event OarFileLoaded OnOarFileLoaded; |
926 | 926 | ||
927 | /// <summary> | 927 | /// <summary> |
928 | /// Called when an oar file has finished saving | 928 | /// Called when an oar file has finished saving |
929 | /// Message is non empty string if there were problems saving the oar file | 929 | /// Message is non empty string if there were problems saving the oar file |
930 | /// If a guid was supplied on the original call to identify, the request, this is returned. Otherwise | 930 | /// If a guid was supplied on the original call to identify, the request, this is returned. Otherwise |
931 | /// Guid.Empty is returned. | 931 | /// Guid.Empty is returned. |
932 | /// </summary> | 932 | /// </summary> |
933 | public delegate void OarFileSaved(Guid guid, string message); | 933 | public delegate void OarFileSaved(Guid guid, string message); |
@@ -947,14 +947,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
947 | /// the avatarID is UUID.Zero (I know, this doesn't make much sense but now it's historical). | 947 | /// the avatarID is UUID.Zero (I know, this doesn't make much sense but now it's historical). |
948 | public delegate void Attach(uint localID, UUID itemID, UUID avatarID); | 948 | public delegate void Attach(uint localID, UUID itemID, UUID avatarID); |
949 | public event Attach OnAttach; | 949 | public event Attach OnAttach; |
950 | 950 | ||
951 | 951 | ||
952 | /// <summary> | 952 | /// <summary> |
953 | /// Called immediately after an object is loaded from storage. | 953 | /// Called immediately after an object is loaded from storage. |
954 | /// </summary> | 954 | /// </summary> |
955 | public event SceneObjectDelegate OnSceneObjectLoaded; | 955 | public event SceneObjectDelegate OnSceneObjectLoaded; |
956 | public delegate void SceneObjectDelegate(SceneObjectGroup so); | 956 | public delegate void SceneObjectDelegate(SceneObjectGroup so); |
957 | 957 | ||
958 | /// <summary> | 958 | /// <summary> |
959 | /// Called immediately before an object is saved to storage. | 959 | /// Called immediately before an object is saved to storage. |
960 | /// </summary> | 960 | /// </summary> |
@@ -967,7 +967,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
967 | /// </param> | 967 | /// </param> |
968 | public event SceneObjectPreSaveDelegate OnSceneObjectPreSave; | 968 | public event SceneObjectPreSaveDelegate OnSceneObjectPreSave; |
969 | public delegate void SceneObjectPreSaveDelegate(SceneObjectGroup persistingSo, SceneObjectGroup originalSo); | 969 | public delegate void SceneObjectPreSaveDelegate(SceneObjectGroup persistingSo, SceneObjectGroup originalSo); |
970 | 970 | ||
971 | /// <summary> | 971 | /// <summary> |
972 | /// Called when a scene object part is cloned within the region. | 972 | /// Called when a scene object part is cloned within the region. |
973 | /// </summary> | 973 | /// </summary> |
@@ -1001,7 +1001,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1001 | /// Fired when logins to a region are enabled or disabled. | 1001 | /// Fired when logins to a region are enabled or disabled. |
1002 | /// </summary> | 1002 | /// </summary> |
1003 | /// <remarks> | 1003 | /// <remarks> |
1004 | /// | 1004 | /// |
1005 | /// </remarks> | 1005 | /// </remarks> |
1006 | /// Fired | 1006 | /// Fired |
1007 | public event RegionLoginsStatusChange OnRegionLoginsStatusChange; | 1007 | public event RegionLoginsStatusChange OnRegionLoginsStatusChange; |
@@ -1157,7 +1157,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1157 | catch (Exception e) | 1157 | catch (Exception e) |
1158 | { | 1158 | { |
1159 | m_log.ErrorFormat( | 1159 | m_log.ErrorFormat( |
1160 | "[EVENT MANAGER]: Delegate for TriggerOnAttach failed - continuing. {0} {1}", | 1160 | "[EVENT MANAGER]: Delegate for TriggerOnAttach failed - continuing. {0} {1}", |
1161 | e.Message, e.StackTrace); | 1161 | e.Message, e.StackTrace); |
1162 | } | 1162 | } |
1163 | } | 1163 | } |
@@ -1178,7 +1178,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1178 | catch (Exception e) | 1178 | catch (Exception e) |
1179 | { | 1179 | { |
1180 | m_log.ErrorFormat( | 1180 | m_log.ErrorFormat( |
1181 | "[EVENT MANAGER]: Delegate for TriggerGetScriptRunning failed - continuing. {0} {1}", | 1181 | "[EVENT MANAGER]: Delegate for TriggerGetScriptRunning failed - continuing. {0} {1}", |
1182 | e.Message, e.StackTrace); | 1182 | e.Message, e.StackTrace); |
1183 | } | 1183 | } |
1184 | } | 1184 | } |
@@ -1199,7 +1199,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1199 | catch (Exception e) | 1199 | catch (Exception e) |
1200 | { | 1200 | { |
1201 | m_log.ErrorFormat( | 1201 | m_log.ErrorFormat( |
1202 | "[EVENT MANAGER]: Delegate for TriggerOnScriptChangedEvent failed - continuing. {0} {1}", | 1202 | "[EVENT MANAGER]: Delegate for TriggerOnScriptChangedEvent failed - continuing. {0} {1}", |
1203 | e.Message, e.StackTrace); | 1203 | e.Message, e.StackTrace); |
1204 | } | 1204 | } |
1205 | } | 1205 | } |
@@ -1220,7 +1220,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1220 | catch (Exception e) | 1220 | catch (Exception e) |
1221 | { | 1221 | { |
1222 | m_log.ErrorFormat( | 1222 | m_log.ErrorFormat( |
1223 | "[EVENT MANAGER]: Delegate for TriggerOnClientMovement failed - continuing. {0} {1}", | 1223 | "[EVENT MANAGER]: Delegate for TriggerOnClientMovement failed - continuing. {0} {1}", |
1224 | e.Message, e.StackTrace); | 1224 | e.Message, e.StackTrace); |
1225 | } | 1225 | } |
1226 | } | 1226 | } |
@@ -1241,7 +1241,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1241 | catch (Exception e) | 1241 | catch (Exception e) |
1242 | { | 1242 | { |
1243 | m_log.ErrorFormat( | 1243 | m_log.ErrorFormat( |
1244 | "[EVENT MANAGER]: Delegate for TriggerPermissionError failed - continuing. {0} {1}", | 1244 | "[EVENT MANAGER]: Delegate for TriggerPermissionError failed - continuing. {0} {1}", |
1245 | e.Message, e.StackTrace); | 1245 | e.Message, e.StackTrace); |
1246 | } | 1246 | } |
1247 | } | 1247 | } |
@@ -1262,7 +1262,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1262 | catch (Exception e) | 1262 | catch (Exception e) |
1263 | { | 1263 | { |
1264 | m_log.ErrorFormat( | 1264 | m_log.ErrorFormat( |
1265 | "[EVENT MANAGER]: Delegate for TriggerOnPluginConsole failed - continuing. {0} {1}", | 1265 | "[EVENT MANAGER]: Delegate for TriggerOnPluginConsole failed - continuing. {0} {1}", |
1266 | e.Message, e.StackTrace); | 1266 | e.Message, e.StackTrace); |
1267 | } | 1267 | } |
1268 | } | 1268 | } |
@@ -1283,7 +1283,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1283 | catch (Exception e) | 1283 | catch (Exception e) |
1284 | { | 1284 | { |
1285 | m_log.ErrorFormat( | 1285 | m_log.ErrorFormat( |
1286 | "[EVENT MANAGER]: Delegate for TriggerOnFrame failed - continuing. {0} {1}", | 1286 | "[EVENT MANAGER]: Delegate for TriggerOnFrame failed - continuing. {0} {1}", |
1287 | e.Message, e.StackTrace); | 1287 | e.Message, e.StackTrace); |
1288 | } | 1288 | } |
1289 | } | 1289 | } |
@@ -1304,7 +1304,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1304 | catch (Exception e) | 1304 | catch (Exception e) |
1305 | { | 1305 | { |
1306 | m_log.ErrorFormat( | 1306 | m_log.ErrorFormat( |
1307 | "[EVENT MANAGER]: Delegate for TriggerOnNewClient failed - continuing. {0} {1}", | 1307 | "[EVENT MANAGER]: Delegate for TriggerOnNewClient failed - continuing. {0} {1}", |
1308 | e.Message, e.StackTrace); | 1308 | e.Message, e.StackTrace); |
1309 | } | 1309 | } |
1310 | } | 1310 | } |
@@ -1324,7 +1324,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1324 | catch (Exception e) | 1324 | catch (Exception e) |
1325 | { | 1325 | { |
1326 | m_log.ErrorFormat( | 1326 | m_log.ErrorFormat( |
1327 | "[EVENT MANAGER]: Delegate for TriggerOnNewClient (IClientCore) failed - continuing. {0} {1}", | 1327 | "[EVENT MANAGER]: Delegate for TriggerOnNewClient (IClientCore) failed - continuing. {0} {1}", |
1328 | e.Message, e.StackTrace); | 1328 | e.Message, e.StackTrace); |
1329 | } | 1329 | } |
1330 | } | 1330 | } |
@@ -1368,7 +1368,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1368 | catch (Exception e) | 1368 | catch (Exception e) |
1369 | { | 1369 | { |
1370 | m_log.ErrorFormat( | 1370 | m_log.ErrorFormat( |
1371 | "[EVENT MANAGER]: Delegate for TriggerOnNewPresence failed - continuing. {0} {1}", | 1371 | "[EVENT MANAGER]: Delegate for TriggerOnNewPresence failed - continuing. {0} {1}", |
1372 | e.Message, e.StackTrace); | 1372 | e.Message, e.StackTrace); |
1373 | } | 1373 | } |
1374 | } | 1374 | } |
@@ -1391,7 +1391,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1391 | catch (Exception e) | 1391 | catch (Exception e) |
1392 | { | 1392 | { |
1393 | m_log.ErrorFormat( | 1393 | m_log.ErrorFormat( |
1394 | "[EVENT MANAGER]: Delegate for TriggerOnRemovePresence failed - continuing. {0} {1}", | 1394 | "[EVENT MANAGER]: Delegate for TriggerOnRemovePresence failed - continuing. {0} {1}", |
1395 | e.Message, e.StackTrace); | 1395 | e.Message, e.StackTrace); |
1396 | } | 1396 | } |
1397 | } | 1397 | } |
@@ -1412,7 +1412,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1412 | catch (Exception e) | 1412 | catch (Exception e) |
1413 | { | 1413 | { |
1414 | m_log.ErrorFormat( | 1414 | m_log.ErrorFormat( |
1415 | "[EVENT MANAGER]: Delegate for TriggerOnBackup failed - continuing. {0} {1}", | 1415 | "[EVENT MANAGER]: Delegate for TriggerOnBackup failed - continuing. {0} {1}", |
1416 | e.Message, e.StackTrace); | 1416 | e.Message, e.StackTrace); |
1417 | } | 1417 | } |
1418 | } | 1418 | } |
@@ -1433,7 +1433,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1433 | catch (Exception e) | 1433 | catch (Exception e) |
1434 | { | 1434 | { |
1435 | m_log.ErrorFormat( | 1435 | m_log.ErrorFormat( |
1436 | "[EVENT MANAGER]: Delegate for TriggerParcelPrimCountUpdate failed - continuing. {0} {1}", | 1436 | "[EVENT MANAGER]: Delegate for TriggerParcelPrimCountUpdate failed - continuing. {0} {1}", |
1437 | e.Message, e.StackTrace); | 1437 | e.Message, e.StackTrace); |
1438 | } | 1438 | } |
1439 | } | 1439 | } |
@@ -1454,7 +1454,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1454 | catch (Exception e) | 1454 | catch (Exception e) |
1455 | { | 1455 | { |
1456 | m_log.ErrorFormat( | 1456 | m_log.ErrorFormat( |
1457 | "[EVENT MANAGER]: Delegate for TriggerMoneyTransfer failed - continuing. {0} {1}", | 1457 | "[EVENT MANAGER]: Delegate for TriggerMoneyTransfer failed - continuing. {0} {1}", |
1458 | e.Message, e.StackTrace); | 1458 | e.Message, e.StackTrace); |
1459 | } | 1459 | } |
1460 | } | 1460 | } |
@@ -1495,7 +1495,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1495 | catch (Exception e) | 1495 | catch (Exception e) |
1496 | { | 1496 | { |
1497 | m_log.ErrorFormat( | 1497 | m_log.ErrorFormat( |
1498 | "[EVENT MANAGER]: Delegate for TriggerTerrainTick failed - continuing. {0} {1}", | 1498 | "[EVENT MANAGER]: Delegate for TriggerTerrainTick failed - continuing. {0} {1}", |
1499 | e.Message, e.StackTrace); | 1499 | e.Message, e.StackTrace); |
1500 | } | 1500 | } |
1501 | } | 1501 | } |
@@ -1558,7 +1558,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1558 | catch (Exception e) | 1558 | catch (Exception e) |
1559 | { | 1559 | { |
1560 | m_log.ErrorFormat( | 1560 | m_log.ErrorFormat( |
1561 | "[EVENT MANAGER]: Delegate for TriggerParcelPrimCountAdd failed - continuing. {0} {1}", | 1561 | "[EVENT MANAGER]: Delegate for TriggerParcelPrimCountAdd failed - continuing. {0} {1}", |
1562 | e.Message, e.StackTrace); | 1562 | e.Message, e.StackTrace); |
1563 | } | 1563 | } |
1564 | } | 1564 | } |
@@ -1579,7 +1579,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1579 | catch (Exception e) | 1579 | catch (Exception e) |
1580 | { | 1580 | { |
1581 | m_log.ErrorFormat( | 1581 | m_log.ErrorFormat( |
1582 | "[EVENT MANAGER]: Delegate for TriggerObjectAddedToScene failed - continuing. {0} {1}", | 1582 | "[EVENT MANAGER]: Delegate for TriggerObjectAddedToScene failed - continuing. {0} {1}", |
1583 | e.Message, e.StackTrace); | 1583 | e.Message, e.StackTrace); |
1584 | } | 1584 | } |
1585 | } | 1585 | } |
@@ -1625,7 +1625,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1625 | catch (Exception e) | 1625 | catch (Exception e) |
1626 | { | 1626 | { |
1627 | m_log.ErrorFormat( | 1627 | m_log.ErrorFormat( |
1628 | "[EVENT MANAGER]: Delegate for TriggerObjectBeingRemovedFromScene failed - continuing. {0} {1}", | 1628 | "[EVENT MANAGER]: Delegate for TriggerObjectBeingRemovedFromScene failed - continuing. {0} {1}", |
1629 | e.Message, e.StackTrace); | 1629 | e.Message, e.StackTrace); |
1630 | } | 1630 | } |
1631 | } | 1631 | } |
@@ -1646,7 +1646,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1646 | catch (Exception e) | 1646 | catch (Exception e) |
1647 | { | 1647 | { |
1648 | m_log.ErrorFormat( | 1648 | m_log.ErrorFormat( |
1649 | "[EVENT MANAGER]: Delegate for TriggerObjectAddedToPhysicalScene failed - continuing. {0} {1}", | 1649 | "[EVENT MANAGER]: Delegate for TriggerObjectAddedToPhysicalScene failed - continuing. {0} {1}", |
1650 | e.Message, e.StackTrace); | 1650 | e.Message, e.StackTrace); |
1651 | } | 1651 | } |
1652 | } | 1652 | } |
@@ -1667,7 +1667,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1667 | catch (Exception e) | 1667 | catch (Exception e) |
1668 | { | 1668 | { |
1669 | m_log.ErrorFormat( | 1669 | m_log.ErrorFormat( |
1670 | "[EVENT MANAGER]: Delegate for TriggerObjectRemovedFromPhysicalScene failed - continuing. {0} {1}", | 1670 | "[EVENT MANAGER]: Delegate for TriggerObjectRemovedFromPhysicalScene failed - continuing. {0} {1}", |
1671 | e.Message, e.StackTrace); | 1671 | e.Message, e.StackTrace); |
1672 | } | 1672 | } |
1673 | } | 1673 | } |
@@ -1688,7 +1688,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1688 | catch (Exception e) | 1688 | catch (Exception e) |
1689 | { | 1689 | { |
1690 | m_log.ErrorFormat( | 1690 | m_log.ErrorFormat( |
1691 | "[EVENT MANAGER]: Delegate for TriggerShutdown failed - continuing. {0} {1}", | 1691 | "[EVENT MANAGER]: Delegate for TriggerShutdown failed - continuing. {0} {1}", |
1692 | e.Message, e.StackTrace); | 1692 | e.Message, e.StackTrace); |
1693 | } | 1693 | } |
1694 | } | 1694 | } |
@@ -1709,7 +1709,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1709 | catch (Exception e) | 1709 | catch (Exception e) |
1710 | { | 1710 | { |
1711 | m_log.ErrorFormat( | 1711 | m_log.ErrorFormat( |
1712 | "[EVENT MANAGER]: Delegate for TriggerObjectGrab failed - continuing. {0} {1}", | 1712 | "[EVENT MANAGER]: Delegate for TriggerObjectGrab failed - continuing. {0} {1}", |
1713 | e.Message, e.StackTrace); | 1713 | e.Message, e.StackTrace); |
1714 | } | 1714 | } |
1715 | } | 1715 | } |
@@ -1730,7 +1730,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1730 | catch (Exception e) | 1730 | catch (Exception e) |
1731 | { | 1731 | { |
1732 | m_log.ErrorFormat( | 1732 | m_log.ErrorFormat( |
1733 | "[EVENT MANAGER]: Delegate for TriggerObjectGrabbing failed - continuing. {0} {1}", | 1733 | "[EVENT MANAGER]: Delegate for TriggerObjectGrabbing failed - continuing. {0} {1}", |
1734 | e.Message, e.StackTrace); | 1734 | e.Message, e.StackTrace); |
1735 | } | 1735 | } |
1736 | } | 1736 | } |
@@ -1751,7 +1751,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1751 | catch (Exception e) | 1751 | catch (Exception e) |
1752 | { | 1752 | { |
1753 | m_log.ErrorFormat( | 1753 | m_log.ErrorFormat( |
1754 | "[EVENT MANAGER]: Delegate for TriggerObjectDeGrab failed - continuing. {0} {1}", | 1754 | "[EVENT MANAGER]: Delegate for TriggerObjectDeGrab failed - continuing. {0} {1}", |
1755 | e.Message, e.StackTrace); | 1755 | e.Message, e.StackTrace); |
1756 | } | 1756 | } |
1757 | } | 1757 | } |
@@ -1772,7 +1772,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1772 | catch (Exception e) | 1772 | catch (Exception e) |
1773 | { | 1773 | { |
1774 | m_log.ErrorFormat( | 1774 | m_log.ErrorFormat( |
1775 | "[EVENT MANAGER]: Delegate for TriggerScriptReset failed - continuing. {0} {1}", | 1775 | "[EVENT MANAGER]: Delegate for TriggerScriptReset failed - continuing. {0} {1}", |
1776 | e.Message, e.StackTrace); | 1776 | e.Message, e.StackTrace); |
1777 | } | 1777 | } |
1778 | } | 1778 | } |
@@ -1793,7 +1793,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1793 | catch (Exception e) | 1793 | catch (Exception e) |
1794 | { | 1794 | { |
1795 | m_log.ErrorFormat( | 1795 | m_log.ErrorFormat( |
1796 | "[EVENT MANAGER]: Delegate for TriggerRezScript failed - continuing. {0} {1}", | 1796 | "[EVENT MANAGER]: Delegate for TriggerRezScript failed - continuing. {0} {1}", |
1797 | e.Message, e.StackTrace); | 1797 | e.Message, e.StackTrace); |
1798 | } | 1798 | } |
1799 | } | 1799 | } |
@@ -1814,7 +1814,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1814 | catch (Exception e) | 1814 | catch (Exception e) |
1815 | { | 1815 | { |
1816 | m_log.ErrorFormat( | 1816 | m_log.ErrorFormat( |
1817 | "[EVENT MANAGER]: Delegate for TriggerStartScript failed - continuing. {0} {1}", | 1817 | "[EVENT MANAGER]: Delegate for TriggerStartScript failed - continuing. {0} {1}", |
1818 | e.Message, e.StackTrace); | 1818 | e.Message, e.StackTrace); |
1819 | } | 1819 | } |
1820 | } | 1820 | } |
@@ -1835,7 +1835,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1835 | catch (Exception e) | 1835 | catch (Exception e) |
1836 | { | 1836 | { |
1837 | m_log.ErrorFormat( | 1837 | m_log.ErrorFormat( |
1838 | "[EVENT MANAGER]: Delegate for TriggerStopScript failed - continuing. {0} {1}", | 1838 | "[EVENT MANAGER]: Delegate for TriggerStopScript failed - continuing. {0} {1}", |
1839 | e.Message, e.StackTrace); | 1839 | e.Message, e.StackTrace); |
1840 | } | 1840 | } |
1841 | } | 1841 | } |
@@ -1856,7 +1856,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1856 | catch (Exception e) | 1856 | catch (Exception e) |
1857 | { | 1857 | { |
1858 | m_log.ErrorFormat( | 1858 | m_log.ErrorFormat( |
1859 | "[EVENT MANAGER]: Delegate for TriggerRemoveScript failed - continuing. {0} {1}", | 1859 | "[EVENT MANAGER]: Delegate for TriggerRemoveScript failed - continuing. {0} {1}", |
1860 | e.Message, e.StackTrace); | 1860 | e.Message, e.StackTrace); |
1861 | m_log.ErrorFormat(Environment.StackTrace); | 1861 | m_log.ErrorFormat(Environment.StackTrace); |
1862 | } | 1862 | } |
@@ -1867,7 +1867,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1867 | public bool TriggerGroupMove(UUID groupID, Vector3 delta) | 1867 | public bool TriggerGroupMove(UUID groupID, Vector3 delta) |
1868 | { | 1868 | { |
1869 | bool result = true; | 1869 | bool result = true; |
1870 | 1870 | ||
1871 | SceneGroupMoved handlerSceneGroupMove = OnSceneGroupMove; | 1871 | SceneGroupMoved handlerSceneGroupMove = OnSceneGroupMove; |
1872 | if (handlerSceneGroupMove != null) | 1872 | if (handlerSceneGroupMove != null) |
1873 | { | 1873 | { |
@@ -1881,19 +1881,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
1881 | catch (Exception e) | 1881 | catch (Exception e) |
1882 | { | 1882 | { |
1883 | m_log.ErrorFormat( | 1883 | m_log.ErrorFormat( |
1884 | "[EVENT MANAGER]: Delegate for TriggerGroupMove failed - continuing. {0} {1}", | 1884 | "[EVENT MANAGER]: Delegate for TriggerGroupMove failed - continuing. {0} {1}", |
1885 | e.Message, e.StackTrace); | 1885 | e.Message, e.StackTrace); |
1886 | } | 1886 | } |
1887 | } | 1887 | } |
1888 | } | 1888 | } |
1889 | 1889 | ||
1890 | return result; | 1890 | return result; |
1891 | } | 1891 | } |
1892 | 1892 | ||
1893 | public bool TriggerGroupSpinStart(UUID groupID) | 1893 | public bool TriggerGroupSpinStart(UUID groupID) |
1894 | { | 1894 | { |
1895 | bool result = true; | 1895 | bool result = true; |
1896 | 1896 | ||
1897 | SceneGroupSpinStarted handlerSceneGroupSpinStarted = OnSceneGroupSpinStart; | 1897 | SceneGroupSpinStarted handlerSceneGroupSpinStarted = OnSceneGroupSpinStart; |
1898 | if (handlerSceneGroupSpinStarted != null) | 1898 | if (handlerSceneGroupSpinStarted != null) |
1899 | { | 1899 | { |
@@ -1907,19 +1907,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
1907 | catch (Exception e) | 1907 | catch (Exception e) |
1908 | { | 1908 | { |
1909 | m_log.ErrorFormat( | 1909 | m_log.ErrorFormat( |
1910 | "[EVENT MANAGER]: Delegate for TriggerGroupSpinStart failed - continuing. {0} {1}", | 1910 | "[EVENT MANAGER]: Delegate for TriggerGroupSpinStart failed - continuing. {0} {1}", |
1911 | e.Message, e.StackTrace); | 1911 | e.Message, e.StackTrace); |
1912 | } | 1912 | } |
1913 | } | 1913 | } |
1914 | } | 1914 | } |
1915 | 1915 | ||
1916 | return result; | 1916 | return result; |
1917 | } | 1917 | } |
1918 | 1918 | ||
1919 | public bool TriggerGroupSpin(UUID groupID, Quaternion rotation) | 1919 | public bool TriggerGroupSpin(UUID groupID, Quaternion rotation) |
1920 | { | 1920 | { |
1921 | bool result = true; | 1921 | bool result = true; |
1922 | 1922 | ||
1923 | SceneGroupSpun handlerSceneGroupSpin = OnSceneGroupSpin; | 1923 | SceneGroupSpun handlerSceneGroupSpin = OnSceneGroupSpin; |
1924 | if (handlerSceneGroupSpin != null) | 1924 | if (handlerSceneGroupSpin != null) |
1925 | { | 1925 | { |
@@ -1933,12 +1933,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
1933 | catch (Exception e) | 1933 | catch (Exception e) |
1934 | { | 1934 | { |
1935 | m_log.ErrorFormat( | 1935 | m_log.ErrorFormat( |
1936 | "[EVENT MANAGER]: Delegate for TriggerGroupSpin failed - continuing. {0} {1}", | 1936 | "[EVENT MANAGER]: Delegate for TriggerGroupSpin failed - continuing. {0} {1}", |
1937 | e.Message, e.StackTrace); | 1937 | e.Message, e.StackTrace); |
1938 | } | 1938 | } |
1939 | } | 1939 | } |
1940 | } | 1940 | } |
1941 | 1941 | ||
1942 | return result; | 1942 | return result; |
1943 | } | 1943 | } |
1944 | 1944 | ||
@@ -1956,7 +1956,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1956 | catch (Exception e) | 1956 | catch (Exception e) |
1957 | { | 1957 | { |
1958 | m_log.ErrorFormat( | 1958 | m_log.ErrorFormat( |
1959 | "[EVENT MANAGER]: Delegate for TriggerGroupGrab failed - continuing. {0} {1}", | 1959 | "[EVENT MANAGER]: Delegate for TriggerGroupGrab failed - continuing. {0} {1}", |
1960 | e.Message, e.StackTrace); | 1960 | e.Message, e.StackTrace); |
1961 | } | 1961 | } |
1962 | } | 1962 | } |
@@ -1977,7 +1977,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1977 | catch (Exception e) | 1977 | catch (Exception e) |
1978 | { | 1978 | { |
1979 | m_log.ErrorFormat( | 1979 | m_log.ErrorFormat( |
1980 | "[EVENT MANAGER]: Delegate for TriggerLandObjectAdded failed - continuing. {0} {1}", | 1980 | "[EVENT MANAGER]: Delegate for TriggerLandObjectAdded failed - continuing. {0} {1}", |
1981 | e.Message, e.StackTrace); | 1981 | e.Message, e.StackTrace); |
1982 | } | 1982 | } |
1983 | } | 1983 | } |
@@ -1998,7 +1998,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1998 | catch (Exception e) | 1998 | catch (Exception e) |
1999 | { | 1999 | { |
2000 | m_log.ErrorFormat( | 2000 | m_log.ErrorFormat( |
2001 | "[EVENT MANAGER]: Delegate for TriggerLandObjectRemoved failed - continuing. {0} {1}", | 2001 | "[EVENT MANAGER]: Delegate for TriggerLandObjectRemoved failed - continuing. {0} {1}", |
2002 | e.Message, e.StackTrace); | 2002 | e.Message, e.StackTrace); |
2003 | } | 2003 | } |
2004 | } | 2004 | } |
@@ -2024,7 +2024,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2024 | catch (Exception e) | 2024 | catch (Exception e) |
2025 | { | 2025 | { |
2026 | m_log.ErrorFormat( | 2026 | m_log.ErrorFormat( |
2027 | "[EVENT MANAGER]: Delegate for TriggerAvatarEnteringNewParcel failed - continuing. {0} {1}", | 2027 | "[EVENT MANAGER]: Delegate for TriggerAvatarEnteringNewParcel failed - continuing. {0} {1}", |
2028 | e.Message, e.StackTrace); | 2028 | e.Message, e.StackTrace); |
2029 | } | 2029 | } |
2030 | } | 2030 | } |
@@ -2045,7 +2045,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2045 | catch (Exception e) | 2045 | catch (Exception e) |
2046 | { | 2046 | { |
2047 | m_log.ErrorFormat( | 2047 | m_log.ErrorFormat( |
2048 | "[EVENT MANAGER]: Delegate for TriggerAvatarAppearanceChanged failed - continuing. {0} {1}", | 2048 | "[EVENT MANAGER]: Delegate for TriggerAvatarAppearanceChanged failed - continuing. {0} {1}", |
2049 | e.Message, e.StackTrace); | 2049 | e.Message, e.StackTrace); |
2050 | } | 2050 | } |
2051 | } | 2051 | } |
@@ -2087,7 +2087,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2087 | catch (Exception e) | 2087 | catch (Exception e) |
2088 | { | 2088 | { |
2089 | m_log.ErrorFormat( | 2089 | m_log.ErrorFormat( |
2090 | "[EVENT MANAGER]: Delegate for TriggerIncomingInstantMessage failed - continuing. {0} {1}", | 2090 | "[EVENT MANAGER]: Delegate for TriggerIncomingInstantMessage failed - continuing. {0} {1}", |
2091 | e.Message, e.StackTrace); | 2091 | e.Message, e.StackTrace); |
2092 | } | 2092 | } |
2093 | } | 2093 | } |
@@ -2108,7 +2108,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2108 | catch (Exception e) | 2108 | catch (Exception e) |
2109 | { | 2109 | { |
2110 | m_log.ErrorFormat( | 2110 | m_log.ErrorFormat( |
2111 | "[EVENT MANAGER]: Delegate for TriggerOnAttach failed - continuing. {0} {1}", | 2111 | "[EVENT MANAGER]: Delegate for TriggerOnAttach failed - continuing. {0} {1}", |
2112 | e.Message, e.StackTrace); | 2112 | e.Message, e.StackTrace); |
2113 | } | 2113 | } |
2114 | } | 2114 | } |
@@ -2127,12 +2127,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
2127 | // m_log.ErrorFormat("[EVENT MANAGER]: TriggerClientClosed: {0}", d.Target.ToString()); | 2127 | // m_log.ErrorFormat("[EVENT MANAGER]: TriggerClientClosed: {0}", d.Target.ToString()); |
2128 | d(ClientID, scene); | 2128 | d(ClientID, scene); |
2129 | // m_log.ErrorFormat("[EVENT MANAGER]: TriggerClientClosed done "); | 2129 | // m_log.ErrorFormat("[EVENT MANAGER]: TriggerClientClosed done "); |
2130 | 2130 | ||
2131 | } | 2131 | } |
2132 | catch (Exception e) | 2132 | catch (Exception e) |
2133 | { | 2133 | { |
2134 | m_log.ErrorFormat( | 2134 | m_log.ErrorFormat( |
2135 | "[EVENT MANAGER]: Delegate for TriggerClientClosed failed - continuing. {0} {1}", | 2135 | "[EVENT MANAGER]: Delegate for TriggerClientClosed failed - continuing. {0} {1}", |
2136 | e.Message, e.StackTrace); | 2136 | e.Message, e.StackTrace); |
2137 | } | 2137 | } |
2138 | } | 2138 | } |
@@ -2153,7 +2153,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2153 | catch (Exception e) | 2153 | catch (Exception e) |
2154 | { | 2154 | { |
2155 | m_log.ErrorFormat( | 2155 | m_log.ErrorFormat( |
2156 | "[EVENT MANAGER]: Delegate for TriggerOnMakeChildAgent failed - continuing. {0} {1}", | 2156 | "[EVENT MANAGER]: Delegate for TriggerOnMakeChildAgent failed - continuing. {0} {1}", |
2157 | e.Message, e.StackTrace); | 2157 | e.Message, e.StackTrace); |
2158 | } | 2158 | } |
2159 | } | 2159 | } |
@@ -2192,7 +2192,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2192 | catch (Exception e) | 2192 | catch (Exception e) |
2193 | { | 2193 | { |
2194 | m_log.ErrorFormat( | 2194 | m_log.ErrorFormat( |
2195 | "[EVENT MANAGER]: Delegate for TriggerOnMakeRootAgent failed - continuing. {0} {1}", | 2195 | "[EVENT MANAGER]: Delegate for TriggerOnMakeRootAgent failed - continuing. {0} {1}", |
2196 | e.Message, e.StackTrace); | 2196 | e.Message, e.StackTrace); |
2197 | } | 2197 | } |
2198 | } | 2198 | } |
@@ -2213,7 +2213,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2213 | catch (Exception e) | 2213 | catch (Exception e) |
2214 | { | 2214 | { |
2215 | m_log.ErrorFormat( | 2215 | m_log.ErrorFormat( |
2216 | "[EVENT MANAGER]: Delegate for TriggerOnIncomingSceneObject failed - continuing. {0} {1}", | 2216 | "[EVENT MANAGER]: Delegate for TriggerOnIncomingSceneObject failed - continuing. {0} {1}", |
2217 | e.Message, e.StackTrace); | 2217 | e.Message, e.StackTrace); |
2218 | } | 2218 | } |
2219 | } | 2219 | } |
@@ -2234,7 +2234,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2234 | catch (Exception e) | 2234 | catch (Exception e) |
2235 | { | 2235 | { |
2236 | m_log.ErrorFormat( | 2236 | m_log.ErrorFormat( |
2237 | "[EVENT MANAGER]: Delegate for TriggerOnRegisterCaps failed - continuing. {0} {1}", | 2237 | "[EVENT MANAGER]: Delegate for TriggerOnRegisterCaps failed - continuing. {0} {1}", |
2238 | e.Message, e.StackTrace); | 2238 | e.Message, e.StackTrace); |
2239 | } | 2239 | } |
2240 | } | 2240 | } |
@@ -2255,7 +2255,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2255 | catch (Exception e) | 2255 | catch (Exception e) |
2256 | { | 2256 | { |
2257 | m_log.ErrorFormat( | 2257 | m_log.ErrorFormat( |
2258 | "[EVENT MANAGER]: Delegate for TriggerOnDeregisterCaps failed - continuing. {0} {1}", | 2258 | "[EVENT MANAGER]: Delegate for TriggerOnDeregisterCaps failed - continuing. {0} {1}", |
2259 | e.Message, e.StackTrace); | 2259 | e.Message, e.StackTrace); |
2260 | } | 2260 | } |
2261 | } | 2261 | } |
@@ -2276,7 +2276,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2276 | catch (Exception e) | 2276 | catch (Exception e) |
2277 | { | 2277 | { |
2278 | m_log.ErrorFormat( | 2278 | m_log.ErrorFormat( |
2279 | "[EVENT MANAGER]: Delegate for TriggerOnNewInventoryItemUploadComplete failed - continuing. {0} {1}", | 2279 | "[EVENT MANAGER]: Delegate for TriggerOnNewInventoryItemUploadComplete failed - continuing. {0} {1}", |
2280 | e.Message, e.StackTrace); | 2280 | e.Message, e.StackTrace); |
2281 | } | 2281 | } |
2282 | } | 2282 | } |
@@ -2297,7 +2297,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2297 | catch (Exception e) | 2297 | catch (Exception e) |
2298 | { | 2298 | { |
2299 | m_log.ErrorFormat( | 2299 | m_log.ErrorFormat( |
2300 | "[EVENT MANAGER]: Delegate for TriggerLandBuy failed - continuing. {0} {1}", | 2300 | "[EVENT MANAGER]: Delegate for TriggerLandBuy failed - continuing. {0} {1}", |
2301 | e.Message, e.StackTrace); | 2301 | e.Message, e.StackTrace); |
2302 | } | 2302 | } |
2303 | } | 2303 | } |
@@ -2318,7 +2318,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2318 | catch (Exception e) | 2318 | catch (Exception e) |
2319 | { | 2319 | { |
2320 | m_log.ErrorFormat( | 2320 | m_log.ErrorFormat( |
2321 | "[EVENT MANAGER]: Delegate for TriggerValidateLandBuy failed - continuing. {0} {1}", | 2321 | "[EVENT MANAGER]: Delegate for TriggerValidateLandBuy failed - continuing. {0} {1}", |
2322 | e.Message, e.StackTrace); | 2322 | e.Message, e.StackTrace); |
2323 | } | 2323 | } |
2324 | } | 2324 | } |
@@ -2339,7 +2339,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2339 | catch (Exception e) | 2339 | catch (Exception e) |
2340 | { | 2340 | { |
2341 | m_log.ErrorFormat( | 2341 | m_log.ErrorFormat( |
2342 | "[EVENT MANAGER]: Delegate for TriggerAtTargetEvent failed - continuing. {0} {1}", | 2342 | "[EVENT MANAGER]: Delegate for TriggerAtTargetEvent failed - continuing. {0} {1}", |
2343 | e.Message, e.StackTrace); | 2343 | e.Message, e.StackTrace); |
2344 | } | 2344 | } |
2345 | } | 2345 | } |
@@ -2360,7 +2360,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2360 | catch (Exception e) | 2360 | catch (Exception e) |
2361 | { | 2361 | { |
2362 | m_log.ErrorFormat( | 2362 | m_log.ErrorFormat( |
2363 | "[EVENT MANAGER]: Delegate for TriggerNotAtTargetEvent failed - continuing. {0} {1}", | 2363 | "[EVENT MANAGER]: Delegate for TriggerNotAtTargetEvent failed - continuing. {0} {1}", |
2364 | e.Message, e.StackTrace); | 2364 | e.Message, e.StackTrace); |
2365 | } | 2365 | } |
2366 | } | 2366 | } |
@@ -2381,7 +2381,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2381 | catch (Exception e) | 2381 | catch (Exception e) |
2382 | { | 2382 | { |
2383 | m_log.ErrorFormat( | 2383 | m_log.ErrorFormat( |
2384 | "[EVENT MANAGER]: Delegate for TriggerAtRotTargetEvent failed - continuing. {0} {1}", | 2384 | "[EVENT MANAGER]: Delegate for TriggerAtRotTargetEvent failed - continuing. {0} {1}", |
2385 | e.Message, e.StackTrace); | 2385 | e.Message, e.StackTrace); |
2386 | } | 2386 | } |
2387 | } | 2387 | } |
@@ -2402,7 +2402,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2402 | catch (Exception e) | 2402 | catch (Exception e) |
2403 | { | 2403 | { |
2404 | m_log.ErrorFormat( | 2404 | m_log.ErrorFormat( |
2405 | "[EVENT MANAGER]: Delegate for TriggerNotAtRotTargetEvent failed - continuing. {0} {1}", | 2405 | "[EVENT MANAGER]: Delegate for TriggerNotAtRotTargetEvent failed - continuing. {0} {1}", |
2406 | e.Message, e.StackTrace); | 2406 | e.Message, e.StackTrace); |
2407 | } | 2407 | } |
2408 | } | 2408 | } |
@@ -2471,7 +2471,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2471 | catch (Exception e) | 2471 | catch (Exception e) |
2472 | { | 2472 | { |
2473 | m_log.ErrorFormat( | 2473 | m_log.ErrorFormat( |
2474 | "[EVENT MANAGER]: Delegate for TriggerRequestChangeWaterHeight failed - continuing. {0} {1}", | 2474 | "[EVENT MANAGER]: Delegate for TriggerRequestChangeWaterHeight failed - continuing. {0} {1}", |
2475 | e.Message, e.StackTrace); | 2475 | e.Message, e.StackTrace); |
2476 | } | 2476 | } |
2477 | } | 2477 | } |
@@ -2492,7 +2492,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2492 | catch (Exception e) | 2492 | catch (Exception e) |
2493 | { | 2493 | { |
2494 | m_log.ErrorFormat( | 2494 | m_log.ErrorFormat( |
2495 | "[EVENT MANAGER]: Delegate for TriggerAvatarKill failed - continuing. {0} {1}", | 2495 | "[EVENT MANAGER]: Delegate for TriggerAvatarKill failed - continuing. {0} {1}", |
2496 | e.Message, e.StackTrace); | 2496 | e.Message, e.StackTrace); |
2497 | } | 2497 | } |
2498 | } | 2498 | } |
@@ -2513,7 +2513,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2513 | catch (Exception e) | 2513 | catch (Exception e) |
2514 | { | 2514 | { |
2515 | m_log.ErrorFormat( | 2515 | m_log.ErrorFormat( |
2516 | "[EVENT MANAGER]: Delegate for TriggerSignificantClientMovement failed - continuing. {0} {1}", | 2516 | "[EVENT MANAGER]: Delegate for TriggerSignificantClientMovement failed - continuing. {0} {1}", |
2517 | e.Message, e.StackTrace); | 2517 | e.Message, e.StackTrace); |
2518 | } | 2518 | } |
2519 | } | 2519 | } |
@@ -2534,7 +2534,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2534 | catch (Exception e) | 2534 | catch (Exception e) |
2535 | { | 2535 | { |
2536 | m_log.ErrorFormat( | 2536 | m_log.ErrorFormat( |
2537 | "[EVENT MANAGER]: Delegate for TriggerOnChatFromWorld failed - continuing. {0} {1}", | 2537 | "[EVENT MANAGER]: Delegate for TriggerOnChatFromWorld failed - continuing. {0} {1}", |
2538 | e.Message, e.StackTrace); | 2538 | e.Message, e.StackTrace); |
2539 | } | 2539 | } |
2540 | } | 2540 | } |
@@ -2555,16 +2555,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
2555 | catch (Exception e) | 2555 | catch (Exception e) |
2556 | { | 2556 | { |
2557 | m_log.ErrorFormat( | 2557 | m_log.ErrorFormat( |
2558 | "[EVENT MANAGER]: Delegate for TriggerOnChatFromClient failed - continuing. {0} {1}", | 2558 | "[EVENT MANAGER]: Delegate for TriggerOnChatFromClient failed - continuing. {0} {1}", |
2559 | e.Message, e.StackTrace); | 2559 | e.Message, e.StackTrace); |
2560 | } | 2560 | } |
2561 | } | 2561 | } |
2562 | } | 2562 | } |
2563 | } | 2563 | } |
2564 | 2564 | ||
2565 | public void TriggerOnChatToClients( | 2565 | public void TriggerOnChatToClients( |
2566 | UUID senderID, HashSet<UUID> receiverIDs, | 2566 | UUID senderID, HashSet<UUID> receiverIDs, |
2567 | string message, ChatTypeEnum type, Vector3 fromPos, string fromName, | 2567 | string message, ChatTypeEnum type, Vector3 fromPos, string fromName, |
2568 | ChatSourceType src, ChatAudibleLevel level) | 2568 | ChatSourceType src, ChatAudibleLevel level) |
2569 | { | 2569 | { |
2570 | ChatToClientsEvent handler = OnChatToClients; | 2570 | ChatToClientsEvent handler = OnChatToClients; |
@@ -2579,7 +2579,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2579 | catch (Exception e) | 2579 | catch (Exception e) |
2580 | { | 2580 | { |
2581 | m_log.ErrorFormat( | 2581 | m_log.ErrorFormat( |
2582 | "[EVENT MANAGER]: Delegate for TriggerOnChatToClients failed - continuing. {0} {1}", | 2582 | "[EVENT MANAGER]: Delegate for TriggerOnChatToClients failed - continuing. {0} {1}", |
2583 | e.Message, e.StackTrace); | 2583 | e.Message, e.StackTrace); |
2584 | } | 2584 | } |
2585 | } | 2585 | } |
@@ -2600,7 +2600,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2600 | catch (Exception e) | 2600 | catch (Exception e) |
2601 | { | 2601 | { |
2602 | m_log.ErrorFormat( | 2602 | m_log.ErrorFormat( |
2603 | "[EVENT MANAGER]: Delegate for TriggerOnChatBroadcast failed - continuing. {0} {1}", | 2603 | "[EVENT MANAGER]: Delegate for TriggerOnChatBroadcast failed - continuing. {0} {1}", |
2604 | e.Message, e.StackTrace); | 2604 | e.Message, e.StackTrace); |
2605 | } | 2605 | } |
2606 | } | 2606 | } |
@@ -2621,7 +2621,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2621 | catch (Exception e) | 2621 | catch (Exception e) |
2622 | { | 2622 | { |
2623 | m_log.ErrorFormat( | 2623 | m_log.ErrorFormat( |
2624 | "[EVENT MANAGER]: Delegate for TriggerControlEvent failed - continuing. {0} {1}", | 2624 | "[EVENT MANAGER]: Delegate for TriggerControlEvent failed - continuing. {0} {1}", |
2625 | e.Message, e.StackTrace); | 2625 | e.Message, e.StackTrace); |
2626 | } | 2626 | } |
2627 | } | 2627 | } |
@@ -2642,7 +2642,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2642 | catch (Exception e) | 2642 | catch (Exception e) |
2643 | { | 2643 | { |
2644 | m_log.ErrorFormat( | 2644 | m_log.ErrorFormat( |
2645 | "[EVENT MANAGER]: Delegate for TriggerNoticeNoLandDataFromStorage failed - continuing. {0} {1}", | 2645 | "[EVENT MANAGER]: Delegate for TriggerNoticeNoLandDataFromStorage failed - continuing. {0} {1}", |
2646 | e.Message, e.StackTrace); | 2646 | e.Message, e.StackTrace); |
2647 | } | 2647 | } |
2648 | } | 2648 | } |
@@ -2663,7 +2663,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2663 | catch (Exception e) | 2663 | catch (Exception e) |
2664 | { | 2664 | { |
2665 | m_log.ErrorFormat( | 2665 | m_log.ErrorFormat( |
2666 | "[EVENT MANAGER]: Delegate for TriggerIncomingLandDataFromStorage failed - continuing. {0} {1}", | 2666 | "[EVENT MANAGER]: Delegate for TriggerIncomingLandDataFromStorage failed - continuing. {0} {1}", |
2667 | e.Message, e.StackTrace); | 2667 | e.Message, e.StackTrace); |
2668 | } | 2668 | } |
2669 | } | 2669 | } |
@@ -2684,7 +2684,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2684 | catch (Exception e) | 2684 | catch (Exception e) |
2685 | { | 2685 | { |
2686 | m_log.ErrorFormat( | 2686 | m_log.ErrorFormat( |
2687 | "[EVENT MANAGER]: Delegate for TriggerSetAllowForcefulBan failed - continuing. {0} {1}", | 2687 | "[EVENT MANAGER]: Delegate for TriggerSetAllowForcefulBan failed - continuing. {0} {1}", |
2688 | e.Message, e.StackTrace); | 2688 | e.Message, e.StackTrace); |
2689 | } | 2689 | } |
2690 | } | 2690 | } |
@@ -2705,7 +2705,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2705 | catch (Exception e) | 2705 | catch (Exception e) |
2706 | { | 2706 | { |
2707 | m_log.ErrorFormat( | 2707 | m_log.ErrorFormat( |
2708 | "[EVENT MANAGER]: Delegate for TriggerRequestParcelPrimCountUpdate failed - continuing. {0} {1}", | 2708 | "[EVENT MANAGER]: Delegate for TriggerRequestParcelPrimCountUpdate failed - continuing. {0} {1}", |
2709 | e.Message, e.StackTrace); | 2709 | e.Message, e.StackTrace); |
2710 | } | 2710 | } |
2711 | } | 2711 | } |
@@ -2726,7 +2726,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2726 | catch (Exception e) | 2726 | catch (Exception e) |
2727 | { | 2727 | { |
2728 | m_log.ErrorFormat( | 2728 | m_log.ErrorFormat( |
2729 | "[EVENT MANAGER]: Delegate for TriggerParcelPrimCountTainted failed - continuing. {0} {1}", | 2729 | "[EVENT MANAGER]: Delegate for TriggerParcelPrimCountTainted failed - continuing. {0} {1}", |
2730 | e.Message, e.StackTrace); | 2730 | e.Message, e.StackTrace); |
2731 | } | 2731 | } |
2732 | } | 2732 | } |
@@ -2766,7 +2766,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2766 | catch (Exception e) | 2766 | catch (Exception e) |
2767 | { | 2767 | { |
2768 | m_log.ErrorFormat( | 2768 | m_log.ErrorFormat( |
2769 | "[EVENT MANAGER]: Delegate for TriggerEstateToolsSunUpdate failed - continuing. {0} {1}", | 2769 | "[EVENT MANAGER]: Delegate for TriggerEstateToolsSunUpdate failed - continuing. {0} {1}", |
2770 | e.Message, e.StackTrace); | 2770 | e.Message, e.StackTrace); |
2771 | } | 2771 | } |
2772 | } | 2772 | } |
@@ -2787,12 +2787,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
2787 | catch (Exception e) | 2787 | catch (Exception e) |
2788 | { | 2788 | { |
2789 | m_log.ErrorFormat( | 2789 | m_log.ErrorFormat( |
2790 | "[EVENT MANAGER]: Delegate for TriggerOnAttach failed - continuing. {0} {1}", | 2790 | "[EVENT MANAGER]: Delegate for TriggerOnAttach failed - continuing. {0} {1}", |
2791 | e.Message, e.StackTrace); | 2791 | e.Message, e.StackTrace); |
2792 | } | 2792 | } |
2793 | } | 2793 | } |
2794 | } | 2794 | } |
2795 | 2795 | ||
2796 | return 6; | 2796 | return 6; |
2797 | } | 2797 | } |
2798 | 2798 | ||
@@ -2810,13 +2810,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
2810 | catch (Exception e) | 2810 | catch (Exception e) |
2811 | { | 2811 | { |
2812 | m_log.ErrorFormat( | 2812 | m_log.ErrorFormat( |
2813 | "[EVENT MANAGER]: Delegate for TriggerOarFileLoaded failed - continuing. {0} {1}", | 2813 | "[EVENT MANAGER]: Delegate for TriggerOarFileLoaded failed - continuing. {0} {1}", |
2814 | e.Message, e.StackTrace); | 2814 | e.Message, e.StackTrace); |
2815 | } | 2815 | } |
2816 | } | 2816 | } |
2817 | } | 2817 | } |
2818 | } | 2818 | } |
2819 | 2819 | ||
2820 | public void TriggerOarFileSaved(Guid requestId, string message) | 2820 | public void TriggerOarFileSaved(Guid requestId, string message) |
2821 | { | 2821 | { |
2822 | OarFileSaved handlerOarFileSaved = OnOarFileSaved; | 2822 | OarFileSaved handlerOarFileSaved = OnOarFileSaved; |
@@ -2831,7 +2831,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2831 | catch (Exception e) | 2831 | catch (Exception e) |
2832 | { | 2832 | { |
2833 | m_log.ErrorFormat( | 2833 | m_log.ErrorFormat( |
2834 | "[EVENT MANAGER]: Delegate for TriggerOarFileSaved failed - continuing. {0} {1}", | 2834 | "[EVENT MANAGER]: Delegate for TriggerOarFileSaved failed - continuing. {0} {1}", |
2835 | e.Message, e.StackTrace); | 2835 | e.Message, e.StackTrace); |
2836 | } | 2836 | } |
2837 | } | 2837 | } |
@@ -2852,7 +2852,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2852 | catch (Exception e) | 2852 | catch (Exception e) |
2853 | { | 2853 | { |
2854 | m_log.ErrorFormat( | 2854 | m_log.ErrorFormat( |
2855 | "[EVENT MANAGER]: Delegate for TriggerEmptyScriptCompileQueue failed - continuing. {0} {1}", | 2855 | "[EVENT MANAGER]: Delegate for TriggerEmptyScriptCompileQueue failed - continuing. {0} {1}", |
2856 | e.Message, e.StackTrace); | 2856 | e.Message, e.StackTrace); |
2857 | } | 2857 | } |
2858 | } | 2858 | } |
@@ -2873,7 +2873,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2873 | catch (Exception e) | 2873 | catch (Exception e) |
2874 | { | 2874 | { |
2875 | m_log.ErrorFormat( | 2875 | m_log.ErrorFormat( |
2876 | "[EVENT MANAGER]: Delegate for TriggerScriptCollidingStart failed - continuing. {0} {1}", | 2876 | "[EVENT MANAGER]: Delegate for TriggerScriptCollidingStart failed - continuing. {0} {1}", |
2877 | e.Message, e.StackTrace); | 2877 | e.Message, e.StackTrace); |
2878 | } | 2878 | } |
2879 | } | 2879 | } |
@@ -2894,7 +2894,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2894 | catch (Exception e) | 2894 | catch (Exception e) |
2895 | { | 2895 | { |
2896 | m_log.ErrorFormat( | 2896 | m_log.ErrorFormat( |
2897 | "[EVENT MANAGER]: Delegate for TriggerScriptColliding failed - continuing. {0} {1}", | 2897 | "[EVENT MANAGER]: Delegate for TriggerScriptColliding failed - continuing. {0} {1}", |
2898 | e.Message, e.StackTrace); | 2898 | e.Message, e.StackTrace); |
2899 | } | 2899 | } |
2900 | } | 2900 | } |
@@ -2915,7 +2915,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2915 | catch (Exception e) | 2915 | catch (Exception e) |
2916 | { | 2916 | { |
2917 | m_log.ErrorFormat( | 2917 | m_log.ErrorFormat( |
2918 | "[EVENT MANAGER]: Delegate for TriggerScriptCollidingEnd failed - continuing. {0} {1}", | 2918 | "[EVENT MANAGER]: Delegate for TriggerScriptCollidingEnd failed - continuing. {0} {1}", |
2919 | e.Message, e.StackTrace); | 2919 | e.Message, e.StackTrace); |
2920 | } | 2920 | } |
2921 | } | 2921 | } |
@@ -2936,7 +2936,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2936 | catch (Exception e) | 2936 | catch (Exception e) |
2937 | { | 2937 | { |
2938 | m_log.ErrorFormat( | 2938 | m_log.ErrorFormat( |
2939 | "[EVENT MANAGER]: Delegate for TriggerScriptLandCollidingStart failed - continuing. {0} {1}", | 2939 | "[EVENT MANAGER]: Delegate for TriggerScriptLandCollidingStart failed - continuing. {0} {1}", |
2940 | e.Message, e.StackTrace); | 2940 | e.Message, e.StackTrace); |
2941 | } | 2941 | } |
2942 | } | 2942 | } |
@@ -2957,7 +2957,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2957 | catch (Exception e) | 2957 | catch (Exception e) |
2958 | { | 2958 | { |
2959 | m_log.ErrorFormat( | 2959 | m_log.ErrorFormat( |
2960 | "[EVENT MANAGER]: Delegate for TriggerScriptLandColliding failed - continuing. {0} {1}", | 2960 | "[EVENT MANAGER]: Delegate for TriggerScriptLandColliding failed - continuing. {0} {1}", |
2961 | e.Message, e.StackTrace); | 2961 | e.Message, e.StackTrace); |
2962 | } | 2962 | } |
2963 | } | 2963 | } |
@@ -2978,7 +2978,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2978 | catch (Exception e) | 2978 | catch (Exception e) |
2979 | { | 2979 | { |
2980 | m_log.ErrorFormat( | 2980 | m_log.ErrorFormat( |
2981 | "[EVENT MANAGER]: Delegate for TriggerScriptLandCollidingEnd failed - continuing. {0} {1}", | 2981 | "[EVENT MANAGER]: Delegate for TriggerScriptLandCollidingEnd failed - continuing. {0} {1}", |
2982 | e.Message, e.StackTrace); | 2982 | e.Message, e.StackTrace); |
2983 | } | 2983 | } |
2984 | } | 2984 | } |
@@ -2999,7 +2999,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2999 | catch (Exception e) | 2999 | catch (Exception e) |
3000 | { | 3000 | { |
3001 | m_log.ErrorFormat( | 3001 | m_log.ErrorFormat( |
3002 | "[EVENT MANAGER]: Delegate for TriggerSetRootAgentScene failed - continuing. {0} {1}", | 3002 | "[EVENT MANAGER]: Delegate for TriggerSetRootAgentScene failed - continuing. {0} {1}", |
3003 | e.Message, e.StackTrace); | 3003 | e.Message, e.StackTrace); |
3004 | } | 3004 | } |
3005 | } | 3005 | } |
@@ -3020,13 +3020,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
3020 | catch (Exception e) | 3020 | catch (Exception e) |
3021 | { | 3021 | { |
3022 | m_log.ErrorFormat( | 3022 | m_log.ErrorFormat( |
3023 | "[EVENT MANAGER]: Delegate for TriggerOnRegionUp failed - continuing. {0} {1}", | 3023 | "[EVENT MANAGER]: Delegate for TriggerOnRegionUp failed - continuing. {0} {1}", |
3024 | e.Message, e.StackTrace); | 3024 | e.Message, e.StackTrace); |
3025 | } | 3025 | } |
3026 | } | 3026 | } |
3027 | } | 3027 | } |
3028 | } | 3028 | } |
3029 | 3029 | ||
3030 | public void TriggerOnSceneObjectLoaded(SceneObjectGroup so) | 3030 | public void TriggerOnSceneObjectLoaded(SceneObjectGroup so) |
3031 | { | 3031 | { |
3032 | SceneObjectDelegate handler = OnSceneObjectLoaded; | 3032 | SceneObjectDelegate handler = OnSceneObjectLoaded; |
@@ -3041,13 +3041,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
3041 | catch (Exception e) | 3041 | catch (Exception e) |
3042 | { | 3042 | { |
3043 | m_log.ErrorFormat( | 3043 | m_log.ErrorFormat( |
3044 | "[EVENT MANAGER]: Delegate for TriggerOnSceneObjectLoaded failed - continuing. {0} {1}", | 3044 | "[EVENT MANAGER]: Delegate for TriggerOnSceneObjectLoaded failed - continuing. {0} {1}", |
3045 | e.Message, e.StackTrace); | 3045 | e.Message, e.StackTrace); |
3046 | } | 3046 | } |
3047 | } | 3047 | } |
3048 | } | 3048 | } |
3049 | } | 3049 | } |
3050 | 3050 | ||
3051 | public void TriggerOnSceneObjectPreSave(SceneObjectGroup persistingSo, SceneObjectGroup originalSo) | 3051 | public void TriggerOnSceneObjectPreSave(SceneObjectGroup persistingSo, SceneObjectGroup originalSo) |
3052 | { | 3052 | { |
3053 | SceneObjectPreSaveDelegate handler = OnSceneObjectPreSave; | 3053 | SceneObjectPreSaveDelegate handler = OnSceneObjectPreSave; |
@@ -3062,13 +3062,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
3062 | catch (Exception e) | 3062 | catch (Exception e) |
3063 | { | 3063 | { |
3064 | m_log.ErrorFormat( | 3064 | m_log.ErrorFormat( |
3065 | "[EVENT MANAGER]: Delegate for TriggerOnSceneObjectPreSave failed - continuing. {0} {1}", | 3065 | "[EVENT MANAGER]: Delegate for TriggerOnSceneObjectPreSave failed - continuing. {0} {1}", |
3066 | e.Message, e.StackTrace); | 3066 | e.Message, e.StackTrace); |
3067 | } | 3067 | } |
3068 | } | 3068 | } |
3069 | } | 3069 | } |
3070 | } | 3070 | } |
3071 | 3071 | ||
3072 | public void TriggerOnSceneObjectPartCopy(SceneObjectPart copy, SceneObjectPart original, bool userExposed) | 3072 | public void TriggerOnSceneObjectPartCopy(SceneObjectPart copy, SceneObjectPart original, bool userExposed) |
3073 | { | 3073 | { |
3074 | SceneObjectPartCopyDelegate handler = OnSceneObjectPartCopy; | 3074 | SceneObjectPartCopyDelegate handler = OnSceneObjectPartCopy; |
@@ -3083,7 +3083,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3083 | catch (Exception e) | 3083 | catch (Exception e) |
3084 | { | 3084 | { |
3085 | m_log.ErrorFormat( | 3085 | m_log.ErrorFormat( |
3086 | "[EVENT MANAGER]: Delegate for TriggerOnSceneObjectPartCopy failed - continuing. {0} {1}", | 3086 | "[EVENT MANAGER]: Delegate for TriggerOnSceneObjectPartCopy failed - continuing. {0} {1}", |
3087 | e.Message, e.StackTrace); | 3087 | e.Message, e.StackTrace); |
3088 | } | 3088 | } |
3089 | } | 3089 | } |
@@ -3104,7 +3104,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3104 | catch (Exception e) | 3104 | catch (Exception e) |
3105 | { | 3105 | { |
3106 | m_log.ErrorFormat( | 3106 | m_log.ErrorFormat( |
3107 | "[EVENT MANAGER]: Delegate for TriggerSceneObjectPartUpdated failed - continuing. {0} {1}", | 3107 | "[EVENT MANAGER]: Delegate for TriggerSceneObjectPartUpdated failed - continuing. {0} {1}", |
3108 | e.Message, e.StackTrace); | 3108 | e.Message, e.StackTrace); |
3109 | } | 3109 | } |
3110 | } | 3110 | } |
@@ -3147,7 +3147,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3147 | catch (Exception e) | 3147 | catch (Exception e) |
3148 | { | 3148 | { |
3149 | m_log.ErrorFormat( | 3149 | m_log.ErrorFormat( |
3150 | "[EVENT MANAGER]: Delegate for TriggerOnSceneObjectPartCopy failed - continuing. {0} {1}", | 3150 | "[EVENT MANAGER]: Delegate for TriggerOnSceneObjectPartCopy failed - continuing. {0} {1}", |
3151 | e.Message, e.StackTrace); | 3151 | e.Message, e.StackTrace); |
3152 | } | 3152 | } |
3153 | } | 3153 | } |
@@ -3169,7 +3169,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3169 | catch (Exception e) | 3169 | catch (Exception e) |
3170 | { | 3170 | { |
3171 | m_log.ErrorFormat( | 3171 | m_log.ErrorFormat( |
3172 | "[EVENT MANAGER]: Delegate for TriggerSceneShuttingDown failed - continuing. {0} {1}", | 3172 | "[EVENT MANAGER]: Delegate for TriggerSceneShuttingDown failed - continuing. {0} {1}", |
3173 | e.Message, e.StackTrace); | 3173 | e.Message, e.StackTrace); |
3174 | } | 3174 | } |
3175 | } | 3175 | } |
diff --git a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs index cdd8d2d..e4aa196 100644 --- a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs +++ b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs | |||
@@ -140,7 +140,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
140 | timer.Start(); | 140 | timer.Start(); |
141 | }; | 141 | }; |
142 | } | 142 | } |
143 | 143 | ||
144 | // Check again, in case the regions were started while we were adding the event handler | 144 | // Check again, in case the regions were started while we were adding the event handler |
145 | if (SceneManager.Instance.AllRegionsReady) | 145 | if (SceneManager.Instance.AllRegionsReady) |
146 | { | 146 | { |
@@ -821,7 +821,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
821 | 821 | ||
822 | SceneObjectGroup tmp = m_group; | 822 | SceneObjectGroup tmp = m_group; |
823 | m_group = null; | 823 | m_group = null; |
824 | 824 | ||
825 | using (MemoryStream ms = new MemoryStream()) | 825 | using (MemoryStream ms = new MemoryStream()) |
826 | { | 826 | { |
827 | BinaryFormatter fmt = new BinaryFormatter(); | 827 | BinaryFormatter fmt = new BinaryFormatter(); |
@@ -839,10 +839,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
839 | public void StartCrossingCheck() | 839 | public void StartCrossingCheck() |
840 | { | 840 | { |
841 | // timer will be restart by crossingFailure | 841 | // timer will be restart by crossingFailure |
842 | // or never since crossing worked and this | 842 | // or never since crossing worked and this |
843 | // should be deleted | 843 | // should be deleted |
844 | StopTimer(); | 844 | StopTimer(); |
845 | 845 | ||
846 | m_isCrossing = true; | 846 | m_isCrossing = true; |
847 | m_waitingCrossing = true; | 847 | m_waitingCrossing = true; |
848 | 848 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Prioritizer.cs b/OpenSim/Region/Framework/Scenes/Prioritizer.cs index 97009a0..cbf40c8 100644 --- a/OpenSim/Region/Framework/Scenes/Prioritizer.cs +++ b/OpenSim/Region/Framework/Scenes/Prioritizer.cs | |||
@@ -35,7 +35,7 @@ using OpenSim.Region.PhysicsModules.SharedBase; | |||
35 | 35 | ||
36 | /* | 36 | /* |
37 | * Steps to add a new prioritization policy: | 37 | * Steps to add a new prioritization policy: |
38 | * | 38 | * |
39 | * - Add a new value to the UpdatePrioritizationSchemes enum. | 39 | * - Add a new value to the UpdatePrioritizationSchemes enum. |
40 | * - Specify this new value in the [InterestManagement] section of your | 40 | * - Specify this new value in the [InterestManagement] section of your |
41 | * OpenSim.ini. The name in the config file must match the enum value name | 41 | * OpenSim.ini. The name in the config file must match the enum value name |
@@ -59,7 +59,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
59 | public class Prioritizer | 59 | public class Prioritizer |
60 | { | 60 | { |
61 | private static readonly ILog m_log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 61 | private static readonly ILog m_log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
62 | 62 | ||
63 | private Scene m_scene; | 63 | private Scene m_scene; |
64 | 64 | ||
65 | public Prioritizer(Scene scene) | 65 | public Prioritizer(Scene scene) |
@@ -91,7 +91,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
91 | return 0; | 91 | return 0; |
92 | 92 | ||
93 | uint priority; | 93 | uint priority; |
94 | 94 | ||
95 | switch (m_scene.UpdatePrioritizationScheme) | 95 | switch (m_scene.UpdatePrioritizationScheme) |
96 | { | 96 | { |
97 | /* | 97 | /* |
@@ -116,7 +116,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
116 | priority = GetPriorityByBestAvatarResponsiveness(client, entity); | 116 | priority = GetPriorityByBestAvatarResponsiveness(client, entity); |
117 | break; | 117 | break; |
118 | } | 118 | } |
119 | 119 | ||
120 | return priority; | 120 | return priority; |
121 | } | 121 | } |
122 | 122 | ||
@@ -145,7 +145,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
145 | 145 | ||
146 | return ComputeDistancePriority(client,entity,false); | 146 | return ComputeDistancePriority(client,entity,false); |
147 | } | 147 | } |
148 | 148 | ||
149 | private uint GetPriorityByFrontBack(IClientAPI client, ISceneEntity entity) | 149 | private uint GetPriorityByFrontBack(IClientAPI client, ISceneEntity entity) |
150 | { | 150 | { |
151 | // And anything attached to this avatar gets top priority as well | 151 | // And anything attached to this avatar gets top priority as well |
@@ -172,7 +172,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
172 | 172 | ||
173 | if (entity is SceneObjectPart) | 173 | if (entity is SceneObjectPart) |
174 | { | 174 | { |
175 | // Attachments are high priority, | 175 | // Attachments are high priority, |
176 | if (((SceneObjectPart)entity).ParentGroup.IsAttachment) | 176 | if (((SceneObjectPart)entity).ParentGroup.IsAttachment) |
177 | return 2; | 177 | return 2; |
178 | 178 | ||
@@ -196,7 +196,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
196 | ScenePresence presence = m_scene.GetScenePresence(client.AgentId); | 196 | ScenePresence presence = m_scene.GetScenePresence(client.AgentId); |
197 | if (presence == null) | 197 | if (presence == null) |
198 | { | 198 | { |
199 | // this shouldn't happen, it basically means that we are prioritizing | 199 | // this shouldn't happen, it basically means that we are prioritizing |
200 | // updates to send to a client that doesn't have a presence in the scene | 200 | // updates to send to a client that doesn't have a presence in the scene |
201 | // seems like there's race condition here... | 201 | // seems like there's race condition here... |
202 | 202 | ||
@@ -204,7 +204,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
204 | // throw new InvalidOperationException("Prioritization agent not defined"); | 204 | // throw new InvalidOperationException("Prioritization agent not defined"); |
205 | return PriorityQueue.NumberOfQueues - 1; | 205 | return PriorityQueue.NumberOfQueues - 1; |
206 | } | 206 | } |
207 | 207 | ||
208 | // Use group position for child prims, since we are putting child prims in | 208 | // Use group position for child prims, since we are putting child prims in |
209 | // the same queue with the root of the group, the root prim (which goes into | 209 | // the same queue with the root of the group, the root prim (which goes into |
210 | // the queue first) should always be sent first, no need to adjust child prim | 210 | // the queue first) should always be sent first, no need to adjust child prim |
@@ -227,14 +227,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
227 | 227 | ||
228 | Vector3 presencePos = presence.AbsolutePosition; | 228 | Vector3 presencePos = presence.AbsolutePosition; |
229 | 229 | ||
230 | // Compute the distance... | 230 | // Compute the distance... |
231 | double distance = Vector3.Distance(presencePos, entityPos); | 231 | double distance = Vector3.Distance(presencePos, entityPos); |
232 | 232 | ||
233 | // And convert the distance to a priority queue, this computation gives queues | 233 | // And convert the distance to a priority queue, this computation gives queues |
234 | // at 10, 20, 40, 80, 160, 320, 640, and 1280m | 234 | // at 10, 20, 40, 80, 160, 320, 640, and 1280m |
235 | uint pqueue = PriorityQueue.NumberOfImmediateQueues + 1; // reserve attachments queue | 235 | uint pqueue = PriorityQueue.NumberOfImmediateQueues + 1; // reserve attachments queue |
236 | uint queues = PriorityQueue.NumberOfQueues - PriorityQueue.NumberOfImmediateQueues; | 236 | uint queues = PriorityQueue.NumberOfQueues - PriorityQueue.NumberOfImmediateQueues; |
237 | /* | 237 | /* |
238 | for (int i = 0; i < queues - 1; i++) | 238 | for (int i = 0; i < queues - 1; i++) |
239 | { | 239 | { |
240 | if (distance < 30 * Math.Pow(2.0,i)) | 240 | if (distance < 30 * Math.Pow(2.0,i)) |
@@ -246,7 +246,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
246 | { | 246 | { |
247 | float tmp = (float)Math.Log((double)distance) * 1.442695f - 3.321928f; | 247 | float tmp = (float)Math.Log((double)distance) * 1.442695f - 3.321928f; |
248 | // for a map identical to original: | 248 | // for a map identical to original: |
249 | // now | 249 | // now |
250 | // 1st constant is 1/(log(2)) (natural log) so we get log2(distance) | 250 | // 1st constant is 1/(log(2)) (natural log) so we get log2(distance) |
251 | // 2st constant makes it be log2(distance/10) | 251 | // 2st constant makes it be log2(distance/10) |
252 | pqueue += (uint)tmp; | 252 | pqueue += (uint)tmp; |
@@ -265,7 +265,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
265 | // Plane equation | 265 | // Plane equation |
266 | float d = -Vector3.Dot(camPosition, camAtAxis); | 266 | float d = -Vector3.Dot(camPosition, camAtAxis); |
267 | float p = Vector3.Dot(camAtAxis, entityPos) + d; | 267 | float p = Vector3.Dot(camAtAxis, entityPos) + d; |
268 | if (p < 0.0f) | 268 | if (p < 0.0f) |
269 | pqueue++; | 269 | pqueue++; |
270 | } | 270 | } |
271 | 271 | ||
@@ -291,7 +291,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
291 | // uint pqueue = minpqueue; | 291 | // uint pqueue = minpqueue; |
292 | uint pqueue = PriorityQueue.NumberOfImmediateQueues; | 292 | uint pqueue = PriorityQueue.NumberOfImmediateQueues; |
293 | float distance; | 293 | float distance; |
294 | 294 | ||
295 | Vector3 presencePos = presence.AbsolutePosition; | 295 | Vector3 presencePos = presence.AbsolutePosition; |
296 | if(entity is ScenePresence) | 296 | if(entity is ScenePresence) |
297 | { | 297 | { |
@@ -319,10 +319,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
319 | { | 319 | { |
320 | float tmp = (float)Math.Log(distance) * 1.442695f - 3.321928f; | 320 | float tmp = (float)Math.Log(distance) * 1.442695f - 3.321928f; |
321 | // for a map identical to original: | 321 | // for a map identical to original: |
322 | // now | 322 | // now |
323 | // 1st constant is 1/(log(2)) (natural log) so we get log2(distance) | 323 | // 1st constant is 1/(log(2)) (natural log) so we get log2(distance) |
324 | // 2st constant makes it be log2(distance/10) | 324 | // 2st constant makes it be log2(distance/10) |
325 | 325 | ||
326 | pqueue += (uint)tmp; | 326 | pqueue += (uint)tmp; |
327 | if (pqueue > maxqueue) | 327 | if (pqueue > maxqueue) |
328 | pqueue = maxqueue; | 328 | pqueue = maxqueue; |
diff --git a/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs b/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs index 3b31281..bf58885 100644 --- a/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs +++ b/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs | |||
@@ -55,13 +55,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
55 | public string localZone = TimeZone.CurrentTimeZone.StandardName; | 55 | public string localZone = TimeZone.CurrentTimeZone.StandardName; |
56 | public TimeSpan utcOffset = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now); | 56 | public TimeSpan utcOffset = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now); |
57 | 57 | ||
58 | public RegionStatsHandler(RegionInfo region_info) | 58 | public RegionStatsHandler(RegionInfo region_info) |
59 | : base("GET", "/" + Util.SHA1Hash(region_info.regionSecret), "RegionStats", "Region Statistics") | 59 | : base("GET", "/" + Util.SHA1Hash(region_info.regionSecret), "RegionStats", "Region Statistics") |
60 | { | 60 | { |
61 | regionInfo = region_info; | 61 | regionInfo = region_info; |
62 | osXStatsURI = Util.SHA1Hash(regionInfo.osSecret); | 62 | osXStatsURI = Util.SHA1Hash(regionInfo.osSecret); |
63 | } | 63 | } |
64 | 64 | ||
65 | protected override byte[] ProcessRequest( | 65 | protected override byte[] ProcessRequest( |
66 | string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 66 | string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
67 | { | 67 | { |
@@ -72,7 +72,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
72 | { | 72 | { |
73 | get { return "text/plain"; } | 73 | get { return "text/plain"; } |
74 | } | 74 | } |
75 | 75 | ||
76 | private string Report() | 76 | private string Report() |
77 | { | 77 | { |
78 | OSDMap args = new OSDMap(30); | 78 | OSDMap args = new OSDMap(30); |
@@ -83,7 +83,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
83 | args["UxTime"] = OSD.FromInteger(Util.ToUnixTime(DateTime.Now)); | 83 | args["UxTime"] = OSD.FromInteger(Util.ToUnixTime(DateTime.Now)); |
84 | args["Memory"] = OSD.FromReal(Math.Round(GC.GetTotalMemory(false) / 1024.0 / 1024.0)); | 84 | args["Memory"] = OSD.FromReal(Math.Round(GC.GetTotalMemory(false) / 1024.0 / 1024.0)); |
85 | args["Version"] = OSD.FromString(VersionInfo.Version); | 85 | args["Version"] = OSD.FromString(VersionInfo.Version); |
86 | 86 | ||
87 | string strBuffer = ""; | 87 | string strBuffer = ""; |
88 | strBuffer = OSDParser.SerializeJsonString(args); | 88 | strBuffer = OSDParser.SerializeJsonString(args); |
89 | 89 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SOPMaterial.cs b/OpenSim/Region/Framework/Scenes/SOPMaterial.cs index 10ac37c..651c52e 100644 --- a/OpenSim/Region/Framework/Scenes/SOPMaterial.cs +++ b/OpenSim/Region/Framework/Scenes/SOPMaterial.cs | |||
@@ -34,7 +34,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
34 | { | 34 | { |
35 | public static class SOPMaterialData | 35 | public static class SOPMaterialData |
36 | { | 36 | { |
37 | public enum SopMaterial : int // redundante and not in use for now | 37 | public enum SopMaterial : int // redundante and not in use for now |
38 | { | 38 | { |
39 | Stone = 0, | 39 | Stone = 0, |
40 | Metal = 1, | 40 | Metal = 1, |
diff --git a/OpenSim/Region/Framework/Scenes/SOPVehicle.cs b/OpenSim/Region/Framework/Scenes/SOPVehicle.cs index 897918a..8d11331 100644 --- a/OpenSim/Region/Framework/Scenes/SOPVehicle.cs +++ b/OpenSim/Region/Framework/Scenes/SOPVehicle.cs | |||
@@ -571,7 +571,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
571 | return errors; | 571 | return errors; |
572 | } | 572 | } |
573 | 573 | ||
574 | 574 | ||
575 | public string ToXml2() | 575 | public string ToXml2() |
576 | { | 576 | { |
577 | using (StringWriter sw = new StringWriter()) | 577 | using (StringWriter sw = new StringWriter()) |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 61ea8ac..e3ccf96 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -164,7 +164,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
164 | m_log.DebugFormat( | 164 | m_log.DebugFormat( |
165 | "[AGENT INVENTORY]: Found folder {0} type {1} for item {2}", | 165 | "[AGENT INVENTORY]: Found folder {0} type {1} for item {2}", |
166 | f.Name, (AssetType)f.Type, item.Name); | 166 | f.Name, (AssetType)f.Type, item.Name); |
167 | 167 | ||
168 | item.Folder = f.ID; | 168 | item.Folder = f.ID; |
169 | } | 169 | } |
170 | else | 170 | else |
@@ -338,7 +338,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
338 | // Update item with new asset | 338 | // Update item with new asset |
339 | item.AssetID = asset.FullID; | 339 | item.AssetID = asset.FullID; |
340 | group.UpdateInventoryItem(item); | 340 | group.UpdateInventoryItem(item); |
341 | 341 | ||
342 | part.SendPropertiesToClient(remoteClient); | 342 | part.SendPropertiesToClient(remoteClient); |
343 | 343 | ||
344 | // Trigger rerunning of script (use TriggerRezScript event, see RezScript) | 344 | // Trigger rerunning of script (use TriggerRezScript event, see RezScript) |
@@ -519,7 +519,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
519 | // needs to be found. If inventory item flags are updated | 519 | // needs to be found. If inventory item flags are updated |
520 | // the viewer's notion of the item needs to be refreshed. | 520 | // the viewer's notion of the item needs to be refreshed. |
521 | // | 521 | // |
522 | // In other situations we cannot send out a bulk update here, since this will cause editing of clothing to start | 522 | // In other situations we cannot send out a bulk update here, since this will cause editing of clothing to start |
523 | // failing frequently. Possibly this is a race with a separate transaction that uploads the asset. | 523 | // failing frequently. Possibly this is a race with a separate transaction that uploads the asset. |
524 | if (sendUpdate) | 524 | if (sendUpdate) |
525 | remoteClient.SendBulkUpdateInventory(item); | 525 | remoteClient.SendBulkUpdateInventory(item); |
@@ -734,7 +734,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
734 | itemCopy.GroupPermissions = item.GroupPermissions & item.NextPermissions; | 734 | itemCopy.GroupPermissions = item.GroupPermissions & item.NextPermissions; |
735 | itemCopy.BasePermissions = item.BasePermissions; | 735 | itemCopy.BasePermissions = item.BasePermissions; |
736 | } | 736 | } |
737 | 737 | ||
738 | if (itemCopy.Folder == UUID.Zero) | 738 | if (itemCopy.Folder == UUID.Zero) |
739 | { | 739 | { |
740 | InventoryFolderBase folder = null; | 740 | InventoryFolderBase folder = null; |
@@ -826,7 +826,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
826 | } | 826 | } |
827 | 827 | ||
828 | UUID newFolderId = UUID.Random(); | 828 | UUID newFolderId = UUID.Random(); |
829 | InventoryFolderBase newFolder | 829 | InventoryFolderBase newFolder |
830 | = new InventoryFolderBase( | 830 | = new InventoryFolderBase( |
831 | newFolderId, folder.Name, recipientId, folder.Type, recipientParentFolderId, folder.Version); | 831 | newFolderId, folder.Name, recipientId, folder.Type, recipientParentFolderId, folder.Version); |
832 | InventoryService.AddFolder(newFolder); | 832 | InventoryService.AddFolder(newFolder); |
@@ -906,7 +906,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
906 | item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch(), false); | 906 | item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch(), false); |
907 | } | 907 | } |
908 | else | 908 | else |
909 | { | 909 | { |
910 | // If item is transfer or permissions are off or calling agent is allowed to copy item owner's inventory item. | 910 | // If item is transfer or permissions are off or calling agent is allowed to copy item owner's inventory item. |
911 | if (((item.CurrentPermissions & (uint)PermissionMask.Transfer) != 0) | 911 | if (((item.CurrentPermissions & (uint)PermissionMask.Transfer) != 0) |
912 | && (m_permissions.BypassPermissions() | 912 | && (m_permissions.BypassPermissions() |
@@ -954,7 +954,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
954 | moveitems.Add(n); | 954 | moveitems.Add(n); |
955 | remoteClient.SendInventoryItemCreateUpdate(n, 0); | 955 | remoteClient.SendInventoryItemCreateUpdate(n, 0); |
956 | } | 956 | } |
957 | 957 | ||
958 | MoveInventoryItem(remoteClient, moveitems); | 958 | MoveInventoryItem(remoteClient, moveitems); |
959 | } | 959 | } |
960 | 960 | ||
@@ -1308,9 +1308,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1308 | public InventoryItemBase MoveTaskInventoryItem(IClientAPI remoteClient, UUID folderId, SceneObjectPart part, UUID itemId, out string message) | 1308 | public InventoryItemBase MoveTaskInventoryItem(IClientAPI remoteClient, UUID folderId, SceneObjectPart part, UUID itemId, out string message) |
1309 | { | 1309 | { |
1310 | m_log.DebugFormat( | 1310 | m_log.DebugFormat( |
1311 | "[PRIM INVENTORY]: Adding item {0} from {1} to folder {2} for {3}", | 1311 | "[PRIM INVENTORY]: Adding item {0} from {1} to folder {2} for {3}", |
1312 | itemId, part.Name, folderId, remoteClient.Name); | 1312 | itemId, part.Name, folderId, remoteClient.Name); |
1313 | 1313 | ||
1314 | InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(remoteClient.AgentId, part, itemId, out message); | 1314 | InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(remoteClient.AgentId, part, itemId, out message); |
1315 | if (agentItem == null) | 1315 | if (agentItem == null) |
1316 | return null; | 1316 | return null; |
@@ -1377,7 +1377,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1377 | 1377 | ||
1378 | string message; | 1378 | string message; |
1379 | InventoryItemBase item = MoveTaskInventoryItem(remoteClient, folderId, part, itemId, out message); | 1379 | InventoryItemBase item = MoveTaskInventoryItem(remoteClient, folderId, part, itemId, out message); |
1380 | 1380 | ||
1381 | if (item == null) | 1381 | if (item == null) |
1382 | remoteClient.SendAgentAlertMessage(message, false); | 1382 | remoteClient.SendAgentAlertMessage(message, false); |
1383 | } | 1383 | } |
@@ -1712,7 +1712,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1712 | else // Updating existing item with new perms etc | 1712 | else // Updating existing item with new perms etc |
1713 | { | 1713 | { |
1714 | // m_log.DebugFormat( | 1714 | // m_log.DebugFormat( |
1715 | // "[PRIM INVENTORY]: Updating item {0} in {1} for UpdateTaskInventory()", | 1715 | // "[PRIM INVENTORY]: Updating item {0} in {1} for UpdateTaskInventory()", |
1716 | // currentItem.Name, part.Name); | 1716 | // currentItem.Name, part.Name); |
1717 | 1717 | ||
1718 | // Only look for an uploaded updated asset if we are passed a transaction ID. This is only the | 1718 | // Only look for an uploaded updated asset if we are passed a transaction ID. This is only the |
@@ -1924,12 +1924,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
1924 | return null; | 1924 | return null; |
1925 | } | 1925 | } |
1926 | 1926 | ||
1927 | AssetBase asset | 1927 | AssetBase asset |
1928 | = CreateAsset( | 1928 | = CreateAsset( |
1929 | itemBase.Name, | 1929 | itemBase.Name, |
1930 | itemBase.Description, | 1930 | itemBase.Description, |
1931 | (sbyte)itemBase.AssetType, | 1931 | (sbyte)itemBase.AssetType, |
1932 | Encoding.ASCII.GetBytes(scriptText), | 1932 | Encoding.ASCII.GetBytes(scriptText), |
1933 | agentID); | 1933 | agentID); |
1934 | 1934 | ||
1935 | AssetService.Store(asset); | 1935 | AssetService.Store(asset); |
@@ -2008,8 +2008,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2008 | if ((destPart.GroupID == UUID.Zero) || (destPart.GroupID != srcPart.GroupID) || | 2008 | if ((destPart.GroupID == UUID.Zero) || (destPart.GroupID != srcPart.GroupID) || |
2009 | ((destPart.GroupMask & (uint)PermissionMask.Modify) == 0)) | 2009 | ((destPart.GroupMask & (uint)PermissionMask.Modify) == 0)) |
2010 | return; | 2010 | return; |
2011 | } | 2011 | } |
2012 | else | 2012 | else |
2013 | { | 2013 | { |
2014 | if ((destPart.OwnerMask & (uint)PermissionMask.Modify) == 0) | 2014 | if ((destPart.OwnerMask & (uint)PermissionMask.Modify) == 0) |
2015 | return; | 2015 | return; |
@@ -2102,7 +2102,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2102 | List<uint> deleteIDs = new List<uint>(); | 2102 | List<uint> deleteIDs = new List<uint>(); |
2103 | List<SceneObjectGroup> deleteGroups = new List<SceneObjectGroup>(); | 2103 | List<SceneObjectGroup> deleteGroups = new List<SceneObjectGroup>(); |
2104 | List<SceneObjectGroup> takeGroups = new List<SceneObjectGroup>(); | 2104 | List<SceneObjectGroup> takeGroups = new List<SceneObjectGroup>(); |
2105 | 2105 | ||
2106 | // Start with true for both, then remove the flags if objects | 2106 | // Start with true for both, then remove the flags if objects |
2107 | // that we can't derez are part of the selection | 2107 | // that we can't derez are part of the selection |
2108 | bool permissionToTake = true; | 2108 | bool permissionToTake = true; |
@@ -2146,7 +2146,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2146 | if (action != DeRezAction.Return) | 2146 | if (action != DeRezAction.Return) |
2147 | { | 2147 | { |
2148 | m_log.WarnFormat( | 2148 | m_log.WarnFormat( |
2149 | "[AGENT INVENTORY]: Ignoring attempt to {0} {1} {2} without a client", | 2149 | "[AGENT INVENTORY]: Ignoring attempt to {0} {1} {2} without a client", |
2150 | action, grp.Name, grp.UUID); | 2150 | action, grp.Name, grp.UUID); |
2151 | return; | 2151 | return; |
2152 | } | 2152 | } |
@@ -2166,7 +2166,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2166 | } | 2166 | } |
2167 | if (!Permissions.CanTakeObject(grp.UUID, remoteClient.AgentId)) | 2167 | if (!Permissions.CanTakeObject(grp.UUID, remoteClient.AgentId)) |
2168 | permissionToTake = false; | 2168 | permissionToTake = false; |
2169 | 2169 | ||
2170 | if (!Permissions.CanDeleteObject(grp.UUID, remoteClient.AgentId)) | 2170 | if (!Permissions.CanDeleteObject(grp.UUID, remoteClient.AgentId)) |
2171 | permissionToDelete = false; | 2171 | permissionToDelete = false; |
2172 | } | 2172 | } |
@@ -2471,9 +2471,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2471 | bool RezSelected, bool RemoveItem, UUID fromTaskID) | 2471 | bool RezSelected, bool RemoveItem, UUID fromTaskID) |
2472 | { | 2472 | { |
2473 | // m_log.DebugFormat( | 2473 | // m_log.DebugFormat( |
2474 | // "[PRIM INVENTORY]: RezObject from {0} for item {1} from task id {2}", | 2474 | // "[PRIM INVENTORY]: RezObject from {0} for item {1} from task id {2}", |
2475 | // remoteClient.Name, itemID, fromTaskID); | 2475 | // remoteClient.Name, itemID, fromTaskID); |
2476 | 2476 | ||
2477 | if (fromTaskID == UUID.Zero) | 2477 | if (fromTaskID == UUID.Zero) |
2478 | { | 2478 | { |
2479 | IInventoryAccessModule invAccess = RequestModuleInterface<IInventoryAccessModule>(); | 2479 | IInventoryAccessModule invAccess = RequestModuleInterface<IInventoryAccessModule>(); |
@@ -2483,37 +2483,37 @@ namespace OpenSim.Region.Framework.Scenes | |||
2483 | RezSelected, RemoveItem, fromTaskID, false); | 2483 | RezSelected, RemoveItem, fromTaskID, false); |
2484 | } | 2484 | } |
2485 | else | 2485 | else |
2486 | { | 2486 | { |
2487 | SceneObjectPart part = GetSceneObjectPart(fromTaskID); | 2487 | SceneObjectPart part = GetSceneObjectPart(fromTaskID); |
2488 | if (part == null) | 2488 | if (part == null) |
2489 | { | 2489 | { |
2490 | m_log.ErrorFormat( | 2490 | m_log.ErrorFormat( |
2491 | "[TASK INVENTORY]: {0} tried to rez item id {1} from object id {2} but there is no such scene object", | 2491 | "[TASK INVENTORY]: {0} tried to rez item id {1} from object id {2} but there is no such scene object", |
2492 | remoteClient.Name, itemID, fromTaskID); | 2492 | remoteClient.Name, itemID, fromTaskID); |
2493 | 2493 | ||
2494 | return; | 2494 | return; |
2495 | } | 2495 | } |
2496 | 2496 | ||
2497 | TaskInventoryItem item = part.Inventory.GetInventoryItem(itemID); | 2497 | TaskInventoryItem item = part.Inventory.GetInventoryItem(itemID); |
2498 | if (item == null) | 2498 | if (item == null) |
2499 | { | 2499 | { |
2500 | m_log.ErrorFormat( | 2500 | m_log.ErrorFormat( |
2501 | "[TASK INVENTORY]: {0} tried to rez item id {1} from object id {2} but there is no such item", | 2501 | "[TASK INVENTORY]: {0} tried to rez item id {1} from object id {2} but there is no such item", |
2502 | remoteClient.Name, itemID, fromTaskID); | 2502 | remoteClient.Name, itemID, fromTaskID); |
2503 | 2503 | ||
2504 | return; | 2504 | return; |
2505 | } | 2505 | } |
2506 | 2506 | ||
2507 | byte bRayEndIsIntersection = (byte)(RayEndIsIntersection ? 1 : 0); | 2507 | byte bRayEndIsIntersection = (byte)(RayEndIsIntersection ? 1 : 0); |
2508 | Vector3 scale = new Vector3(0.5f, 0.5f, 0.5f); | 2508 | Vector3 scale = new Vector3(0.5f, 0.5f, 0.5f); |
2509 | Vector3 pos = GetNewRezLocation( | 2509 | Vector3 pos = GetNewRezLocation( |
2510 | RayStart, RayEnd, RayTargetID, Quaternion.Identity, | 2510 | RayStart, RayEnd, RayTargetID, Quaternion.Identity, |
2511 | BypassRayCast, bRayEndIsIntersection, true, scale, false); | 2511 | BypassRayCast, bRayEndIsIntersection, true, scale, false); |
2512 | 2512 | ||
2513 | RezObject(part, item, pos, null, Vector3.Zero, 0, false); | 2513 | RezObject(part, item, pos, null, Vector3.Zero, 0, false); |
2514 | } | 2514 | } |
2515 | } | 2515 | } |
2516 | 2516 | ||
2517 | /// <summary> | 2517 | /// <summary> |
2518 | /// Rez an object into the scene from a prim's inventory. | 2518 | /// Rez an object into the scene from a prim's inventory. |
2519 | /// </summary> | 2519 | /// </summary> |
@@ -2691,7 +2691,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2691 | { | 2691 | { |
2692 | if (ownerID != UUID.Zero) | 2692 | if (ownerID != UUID.Zero) |
2693 | return; | 2693 | return; |
2694 | 2694 | ||
2695 | if (!Permissions.CanDeedObject(remoteClient.AgentId, groupID)) | 2695 | if (!Permissions.CanDeedObject(remoteClient.AgentId, groupID)) |
2696 | return; | 2696 | return; |
2697 | } | 2697 | } |
@@ -2701,8 +2701,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2701 | foreach (uint localID in localIDs) | 2701 | foreach (uint localID in localIDs) |
2702 | { | 2702 | { |
2703 | SceneObjectPart part = GetSceneObjectPart(localID); | 2703 | SceneObjectPart part = GetSceneObjectPart(localID); |
2704 | if (part == null) | 2704 | if (part == null) |
2705 | continue; | 2705 | continue; |
2706 | 2706 | ||
2707 | if (!groups.Contains(part.ParentGroup)) | 2707 | if (!groups.Contains(part.ParentGroup)) |
2708 | groups.Add(part.ParentGroup); | 2708 | groups.Add(part.ParentGroup); |
@@ -2717,7 +2717,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2717 | sog.ScheduleGroupForFullUpdate(); | 2717 | sog.ScheduleGroupForFullUpdate(); |
2718 | 2718 | ||
2719 | SceneObjectPart[] partList = sog.Parts; | 2719 | SceneObjectPart[] partList = sog.Parts; |
2720 | 2720 | ||
2721 | foreach (SceneObjectPart child in partList) | 2721 | foreach (SceneObjectPart child in partList) |
2722 | { | 2722 | { |
2723 | child.Inventory.ChangeInventoryOwner(ownerID); | 2723 | child.Inventory.ChangeInventoryOwner(ownerID); |
@@ -2756,8 +2756,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2756 | foreach (uint localID in localIDs) | 2756 | foreach (uint localID in localIDs) |
2757 | { | 2757 | { |
2758 | SceneObjectPart part = GetSceneObjectPart(localID); | 2758 | SceneObjectPart part = GetSceneObjectPart(localID); |
2759 | if (part == null) | 2759 | if (part == null) |
2760 | continue; | 2760 | continue; |
2761 | part.SendPropertiesToClient(remoteClient); | 2761 | part.SendPropertiesToClient(remoteClient); |
2762 | } | 2762 | } |
2763 | } | 2763 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index 24a2db7..2d62b50 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | |||
@@ -86,7 +86,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
86 | else | 86 | else |
87 | EventManager.TriggerOnChatFromWorld(this, args); | 87 | EventManager.TriggerOnChatFromWorld(this, args); |
88 | } | 88 | } |
89 | 89 | ||
90 | protected void SimChat(byte[] message, ChatTypeEnum type, int channel, Vector3 fromPos, string fromName, | 90 | protected void SimChat(byte[] message, ChatTypeEnum type, int channel, Vector3 fromPos, string fromName, |
91 | UUID fromID, bool fromAgent, bool broadcast) | 91 | UUID fromID, bool fromAgent, bool broadcast) |
92 | { | 92 | { |
@@ -212,13 +212,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
212 | if (groupID != UUID.Zero) | 212 | if (groupID != UUID.Zero) |
213 | { | 213 | { |
214 | GroupMembershipData gmd = m_groupsModule.GetMembershipData(groupID, remoteClient.AgentId); | 214 | GroupMembershipData gmd = m_groupsModule.GetMembershipData(groupID, remoteClient.AgentId); |
215 | 215 | ||
216 | if (gmd == null) | 216 | if (gmd == null) |
217 | { | 217 | { |
218 | // m_log.WarnFormat( | 218 | // m_log.WarnFormat( |
219 | // "[GROUPS]: User {0} is not a member of group {1} so they can't update {2} to this group", | 219 | // "[GROUPS]: User {0} is not a member of group {1} so they can't update {2} to this group", |
220 | // remoteClient.Name, GroupID, objectLocalID); | 220 | // remoteClient.Name, GroupID, objectLocalID); |
221 | 221 | ||
222 | return; | 222 | return; |
223 | } | 223 | } |
224 | } | 224 | } |
@@ -243,7 +243,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
243 | SceneObjectPart part = GetSceneObjectPart(primLocalID); | 243 | SceneObjectPart part = GetSceneObjectPart(primLocalID); |
244 | if (part == null) | 244 | if (part == null) |
245 | return; | 245 | return; |
246 | 246 | ||
247 | bool oldgprSelect = part.ParentGroup.IsSelected; | 247 | bool oldgprSelect = part.ParentGroup.IsSelected; |
248 | 248 | ||
249 | // This is wrong, wrong, wrong. Selection should not be | 249 | // This is wrong, wrong, wrong. Selection should not be |
@@ -259,14 +259,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
259 | 259 | ||
260 | // restore targetOmega | 260 | // restore targetOmega |
261 | if (part.AngularVelocity != Vector3.Zero) | 261 | if (part.AngularVelocity != Vector3.Zero) |
262 | part.ScheduleTerseUpdate(); | 262 | part.ScheduleTerseUpdate(); |
263 | } | 263 | } |
264 | } | 264 | } |
265 | 265 | ||
266 | public virtual void ProcessMoneyTransferRequest(UUID source, UUID destination, int amount, | 266 | public virtual void ProcessMoneyTransferRequest(UUID source, UUID destination, int amount, |
267 | int transactiontype, string description) | 267 | int transactiontype, string description) |
268 | { | 268 | { |
269 | EventManager.MoneyTransferArgs args = new EventManager.MoneyTransferArgs(source, destination, amount, | 269 | EventManager.MoneyTransferArgs args = new EventManager.MoneyTransferArgs(source, destination, amount, |
270 | transactiontype, description); | 270 | transactiontype, description); |
271 | 271 | ||
272 | EventManager.TriggerMoneyTransfer(this, args); | 272 | EventManager.TriggerMoneyTransfer(this, args); |
@@ -275,8 +275,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
275 | public virtual void ProcessParcelBuy(UUID agentId, UUID groupId, bool final, bool groupOwned, | 275 | public virtual void ProcessParcelBuy(UUID agentId, UUID groupId, bool final, bool groupOwned, |
276 | bool removeContribution, int parcelLocalID, int parcelArea, int parcelPrice, bool authenticated) | 276 | bool removeContribution, int parcelLocalID, int parcelArea, int parcelPrice, bool authenticated) |
277 | { | 277 | { |
278 | EventManager.LandBuyArgs args = new EventManager.LandBuyArgs(agentId, groupId, final, groupOwned, | 278 | EventManager.LandBuyArgs args = new EventManager.LandBuyArgs(agentId, groupId, final, groupOwned, |
279 | removeContribution, parcelLocalID, parcelArea, | 279 | removeContribution, parcelLocalID, parcelArea, |
280 | parcelPrice, authenticated); | 280 | parcelPrice, authenticated); |
281 | 281 | ||
282 | // First, allow all validators a stab at it | 282 | // First, allow all validators a stab at it |
@@ -289,7 +289,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
289 | public virtual void ProcessObjectGrab(uint localID, Vector3 offsetPos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs) | 289 | public virtual void ProcessObjectGrab(uint localID, Vector3 offsetPos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs) |
290 | { | 290 | { |
291 | SceneObjectPart part = GetSceneObjectPart(localID); | 291 | SceneObjectPart part = GetSceneObjectPart(localID); |
292 | 292 | ||
293 | if (part == null) | 293 | if (part == null) |
294 | return; | 294 | return; |
295 | 295 | ||
@@ -302,7 +302,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
302 | // Currently only grab/touch for the single prim | 302 | // Currently only grab/touch for the single prim |
303 | // the client handles rez correctly | 303 | // the client handles rez correctly |
304 | obj.ObjectGrabHandler(localID, offsetPos, remoteClient); | 304 | obj.ObjectGrabHandler(localID, offsetPos, remoteClient); |
305 | 305 | ||
306 | // If the touched prim handles touches, deliver it | 306 | // If the touched prim handles touches, deliver it |
307 | if ((part.ScriptEvents & scriptEvents.touch_start) != 0) | 307 | if ((part.ScriptEvents & scriptEvents.touch_start) != 0) |
308 | EventManager.TriggerObjectGrab(part.LocalId, 0, part.OffsetPosition, remoteClient, surfaceArg); | 308 | EventManager.TriggerObjectGrab(part.LocalId, 0, part.OffsetPosition, remoteClient, surfaceArg); |
@@ -310,7 +310,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
310 | // Deliver to the root prim if the touched prim doesn't handle touches | 310 | // Deliver to the root prim if the touched prim doesn't handle touches |
311 | // or if we're meant to pass on touches anyway. | 311 | // or if we're meant to pass on touches anyway. |
312 | if (((part.ScriptEvents & scriptEvents.touch_start) == 0) || | 312 | if (((part.ScriptEvents & scriptEvents.touch_start) == 0) || |
313 | (part.PassTouches && (part.LocalId != obj.RootPart.LocalId))) | 313 | (part.PassTouches && (part.LocalId != obj.RootPart.LocalId))) |
314 | { | 314 | { |
315 | EventManager.TriggerObjectGrab(obj.RootPart.LocalId, part.LocalId, part.OffsetPosition, remoteClient, surfaceArg); | 315 | EventManager.TriggerObjectGrab(obj.RootPart.LocalId, part.LocalId, part.OffsetPosition, remoteClient, surfaceArg); |
316 | } | 316 | } |
@@ -337,7 +337,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
337 | // get's it's position on the simulator even if it was the same as before | 337 | // get's it's position on the simulator even if it was the same as before |
338 | // This keeps the moving user's client in sync with the rest of the world. | 338 | // This keeps the moving user's client in sync with the rest of the world. |
339 | group.SendGroupTerseUpdate(); | 339 | group.SendGroupTerseUpdate(); |
340 | 340 | ||
341 | SurfaceTouchEventArgs surfaceArg = null; | 341 | SurfaceTouchEventArgs surfaceArg = null; |
342 | if (surfaceArgs != null && surfaceArgs.Count > 0) | 342 | if (surfaceArgs != null && surfaceArgs.Count > 0) |
343 | surfaceArg = surfaceArgs[0]; | 343 | surfaceArg = surfaceArgs[0]; |
@@ -483,7 +483,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
483 | } | 483 | } |
484 | }); | 484 | }); |
485 | } | 485 | } |
486 | 486 | ||
487 | private bool ShouldSendDiscardableEffect(IClientAPI thisClient, ScenePresence other) | 487 | private bool ShouldSendDiscardableEffect(IClientAPI thisClient, ScenePresence other) |
488 | { | 488 | { |
489 | return Vector3.Distance(other.CameraPosition, thisClient.SceneAgent.AbsolutePosition) < 10; | 489 | return Vector3.Distance(other.CameraPosition, thisClient.SceneAgent.AbsolutePosition) < 10; |
@@ -603,7 +603,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
603 | m_descendentsRequestProcessing = false; | 603 | m_descendentsRequestProcessing = false; |
604 | } | 604 | } |
605 | } | 605 | } |
606 | 606 | ||
607 | /// <summary> | 607 | /// <summary> |
608 | /// Handle an inventory folder creation request from the client. | 608 | /// Handle an inventory folder creation request from the client. |
609 | /// </summary> | 609 | /// </summary> |
@@ -657,7 +657,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
657 | } | 657 | } |
658 | } | 658 | } |
659 | } | 659 | } |
660 | 660 | ||
661 | public void HandleMoveInventoryFolder(IClientAPI remoteClient, UUID folderID, UUID parentID) | 661 | public void HandleMoveInventoryFolder(IClientAPI remoteClient, UUID folderID, UUID parentID) |
662 | { | 662 | { |
663 | InventoryFolderBase folder = InventoryService.GetFolder(remoteClient.AgentId, folderID); | 663 | InventoryFolderBase folder = InventoryService.GetFolder(remoteClient.AgentId, folderID); |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs index b26b789..893b38c 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs | |||
@@ -35,7 +35,7 @@ using OpenSim.Framework; | |||
35 | using OpenSim.Region.Framework.Interfaces; | 35 | using OpenSim.Region.Framework.Interfaces; |
36 | 36 | ||
37 | namespace OpenSim.Region.Framework.Scenes | 37 | namespace OpenSim.Region.Framework.Scenes |
38 | { | 38 | { |
39 | #region Delegates | 39 | #region Delegates |
40 | public delegate uint GenerateClientFlagsHandler(UUID userID, UUID objectID); | 40 | public delegate uint GenerateClientFlagsHandler(UUID userID, UUID objectID); |
41 | public delegate void SetBypassPermissionsHandler(bool value); | 41 | public delegate void SetBypassPermissionsHandler(bool value); |
@@ -98,7 +98,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
98 | public class ScenePermissions | 98 | public class ScenePermissions |
99 | { | 99 | { |
100 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 100 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
101 | 101 | ||
102 | private Scene m_scene; | 102 | private Scene m_scene; |
103 | 103 | ||
104 | public ScenePermissions(Scene scene) | 104 | public ScenePermissions(Scene scene) |
@@ -261,7 +261,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
261 | public bool CanDeleteObject(UUID objectID, UUID deleter) | 261 | public bool CanDeleteObject(UUID objectID, UUID deleter) |
262 | { | 262 | { |
263 | bool result = true; | 263 | bool result = true; |
264 | 264 | ||
265 | DeleteObjectHandler handler = OnDeleteObject; | 265 | DeleteObjectHandler handler = OnDeleteObject; |
266 | if (handler != null) | 266 | if (handler != null) |
267 | { | 267 | { |
@@ -275,14 +275,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
275 | } | 275 | } |
276 | } | 276 | } |
277 | } | 277 | } |
278 | 278 | ||
279 | return result; | 279 | return result; |
280 | } | 280 | } |
281 | 281 | ||
282 | public bool CanTransferObject(UUID objectID, UUID recipient) | 282 | public bool CanTransferObject(UUID objectID, UUID recipient) |
283 | { | 283 | { |
284 | bool result = true; | 284 | bool result = true; |
285 | 285 | ||
286 | TransferObjectHandler handler = OnTransferObject; | 286 | TransferObjectHandler handler = OnTransferObject; |
287 | if (handler != null) | 287 | if (handler != null) |
288 | { | 288 | { |
@@ -296,7 +296,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
296 | } | 296 | } |
297 | } | 297 | } |
298 | } | 298 | } |
299 | 299 | ||
300 | return result; | 300 | return result; |
301 | } | 301 | } |
302 | 302 | ||
@@ -306,7 +306,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
306 | public bool CanTakeObject(UUID objectID, UUID AvatarTakingUUID) | 306 | public bool CanTakeObject(UUID objectID, UUID AvatarTakingUUID) |
307 | { | 307 | { |
308 | bool result = true; | 308 | bool result = true; |
309 | 309 | ||
310 | TakeObjectHandler handler = OnTakeObject; | 310 | TakeObjectHandler handler = OnTakeObject; |
311 | if (handler != null) | 311 | if (handler != null) |
312 | { | 312 | { |
@@ -320,11 +320,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
320 | } | 320 | } |
321 | } | 321 | } |
322 | } | 322 | } |
323 | 323 | ||
324 | // m_log.DebugFormat( | 324 | // m_log.DebugFormat( |
325 | // "[SCENE PERMISSIONS]: CanTakeObject() fired for object {0}, taker {1}, result {2}", | 325 | // "[SCENE PERMISSIONS]: CanTakeObject() fired for object {0}, taker {1}, result {2}", |
326 | // objectID, AvatarTakingUUID, result); | 326 | // objectID, AvatarTakingUUID, result); |
327 | 327 | ||
328 | return result; | 328 | return result; |
329 | } | 329 | } |
330 | 330 | ||
@@ -363,7 +363,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
363 | public bool CanTakeCopyObject(UUID objectID, UUID userID) | 363 | public bool CanTakeCopyObject(UUID objectID, UUID userID) |
364 | { | 364 | { |
365 | bool result = true; | 365 | bool result = true; |
366 | 366 | ||
367 | TakeCopyObjectHandler handler = OnTakeCopyObject; | 367 | TakeCopyObjectHandler handler = OnTakeCopyObject; |
368 | if (handler != null) | 368 | if (handler != null) |
369 | { | 369 | { |
@@ -377,11 +377,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
377 | } | 377 | } |
378 | } | 378 | } |
379 | } | 379 | } |
380 | 380 | ||
381 | // m_log.DebugFormat( | 381 | // m_log.DebugFormat( |
382 | // "[SCENE PERMISSIONS]: CanTakeCopyObject() fired for object {0}, user {1}, result {2}", | 382 | // "[SCENE PERMISSIONS]: CanTakeCopyObject() fired for object {0}, user {1}, result {2}", |
383 | // objectID, userID, result); | 383 | // objectID, userID, result); |
384 | 384 | ||
385 | return result; | 385 | return result; |
386 | } | 386 | } |
387 | 387 | ||
@@ -478,7 +478,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
478 | public bool CanReturnObjects(ILandObject land, UUID user, List<SceneObjectGroup> objects) | 478 | public bool CanReturnObjects(ILandObject land, UUID user, List<SceneObjectGroup> objects) |
479 | { | 479 | { |
480 | bool result = true; | 480 | bool result = true; |
481 | 481 | ||
482 | ReturnObjectsHandler handler = OnReturnObjects; | 482 | ReturnObjectsHandler handler = OnReturnObjects; |
483 | if (handler != null) | 483 | if (handler != null) |
484 | { | 484 | { |
@@ -492,11 +492,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
492 | } | 492 | } |
493 | } | 493 | } |
494 | } | 494 | } |
495 | 495 | ||
496 | // m_log.DebugFormat( | 496 | // m_log.DebugFormat( |
497 | // "[SCENE PERMISSIONS]: CanReturnObjects() fired for user {0} for {1} objects on {2}, result {3}", | 497 | // "[SCENE PERMISSIONS]: CanReturnObjects() fired for user {0} for {1} objects on {2}, result {3}", |
498 | // user, objects.Count, land.LandData.Name, result); | 498 | // user, objects.Count, land.LandData.Name, result); |
499 | 499 | ||
500 | return result; | 500 | return result; |
501 | } | 501 | } |
502 | 502 | ||
@@ -1004,7 +1004,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1004 | } | 1004 | } |
1005 | return true; | 1005 | return true; |
1006 | } | 1006 | } |
1007 | 1007 | ||
1008 | public bool CanTransferObjectInventory(UUID itemID, UUID objectID, UUID userID) | 1008 | public bool CanTransferObjectInventory(UUID itemID, UUID objectID, UUID userID) |
1009 | { | 1009 | { |
1010 | TransferObjectInventoryHandler handler = OnTransferObjectInventory; | 1010 | TransferObjectInventoryHandler handler = OnTransferObjectInventory; |
@@ -1019,7 +1019,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1019 | } | 1019 | } |
1020 | return true; | 1020 | return true; |
1021 | } | 1021 | } |
1022 | 1022 | ||
1023 | /// <summary> | 1023 | /// <summary> |
1024 | /// Check whether the specified user is allowed to create the given inventory type in their inventory. | 1024 | /// Check whether the specified user is allowed to create the given inventory type in their inventory. |
1025 | /// </summary> | 1025 | /// </summary> |
@@ -1039,8 +1039,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1039 | } | 1039 | } |
1040 | } | 1040 | } |
1041 | return true; | 1041 | return true; |
1042 | } | 1042 | } |
1043 | 1043 | ||
1044 | /// <summary> | 1044 | /// <summary> |
1045 | /// Check whether the specified user is allowed to edit the given inventory item within their own inventory. | 1045 | /// Check whether the specified user is allowed to edit the given inventory item within their own inventory. |
1046 | /// </summary> | 1046 | /// </summary> |
@@ -1061,7 +1061,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1061 | } | 1061 | } |
1062 | return true; | 1062 | return true; |
1063 | } | 1063 | } |
1064 | 1064 | ||
1065 | /// <summary> | 1065 | /// <summary> |
1066 | /// Check whether the specified user is allowed to copy the given inventory item from their own inventory. | 1066 | /// Check whether the specified user is allowed to copy the given inventory item from their own inventory. |
1067 | /// </summary> | 1067 | /// </summary> |
@@ -1082,7 +1082,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1082 | } | 1082 | } |
1083 | return true; | 1083 | return true; |
1084 | } | 1084 | } |
1085 | 1085 | ||
1086 | /// <summary> | 1086 | /// <summary> |
1087 | /// Check whether the specified user is allowed to edit the given inventory item within their own inventory. | 1087 | /// Check whether the specified user is allowed to edit the given inventory item within their own inventory. |
1088 | /// </summary> | 1088 | /// </summary> |
@@ -1103,7 +1103,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1103 | } | 1103 | } |
1104 | return true; | 1104 | return true; |
1105 | } | 1105 | } |
1106 | 1106 | ||
1107 | public bool CanTransferUserInventory(UUID itemID, UUID userID, UUID recipientID) | 1107 | public bool CanTransferUserInventory(UUID itemID, UUID userID, UUID recipientID) |
1108 | { | 1108 | { |
1109 | TransferUserInventoryHandler handler = OnTransferUserInventory; | 1109 | TransferUserInventoryHandler handler = OnTransferUserInventory; |
@@ -1118,7 +1118,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1118 | } | 1118 | } |
1119 | return true; | 1119 | return true; |
1120 | } | 1120 | } |
1121 | 1121 | ||
1122 | public bool CanTeleport(UUID userID) | 1122 | public bool CanTeleport(UUID userID) |
1123 | { | 1123 | { |
1124 | TeleportHandler handler = OnTeleport; | 1124 | TeleportHandler handler = OnTeleport; |
@@ -1133,7 +1133,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1133 | } | 1133 | } |
1134 | return true; | 1134 | return true; |
1135 | } | 1135 | } |
1136 | 1136 | ||
1137 | public bool CanControlPrimMedia(UUID userID, UUID primID, int face) | 1137 | public bool CanControlPrimMedia(UUID userID, UUID primID, int face) |
1138 | { | 1138 | { |
1139 | ControlPrimMediaHandler handler = OnControlPrimMedia; | 1139 | ControlPrimMediaHandler handler = OnControlPrimMedia; |
@@ -1147,8 +1147,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1147 | } | 1147 | } |
1148 | } | 1148 | } |
1149 | return true; | 1149 | return true; |
1150 | } | 1150 | } |
1151 | 1151 | ||
1152 | public bool CanInteractWithPrimMedia(UUID userID, UUID primID, int face) | 1152 | public bool CanInteractWithPrimMedia(UUID userID, UUID primID, int face) |
1153 | { | 1153 | { |
1154 | InteractWithPrimMediaHandler handler = OnInteractWithPrimMedia; | 1154 | InteractWithPrimMediaHandler handler = OnInteractWithPrimMedia; |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index d7a4ca4..352bc05 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -61,7 +61,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
61 | { | 61 | { |
62 | private const long DEFAULT_MIN_TIME_FOR_PERSISTENCE = 60L; | 62 | private const long DEFAULT_MIN_TIME_FOR_PERSISTENCE = 60L; |
63 | private const long DEFAULT_MAX_TIME_FOR_PERSISTENCE = 600L; | 63 | private const long DEFAULT_MAX_TIME_FOR_PERSISTENCE = 600L; |
64 | 64 | ||
65 | 65 | ||
66 | public delegate void SynchronizeSceneHandler(Scene scene); | 66 | public delegate void SynchronizeSceneHandler(Scene scene); |
67 | 67 | ||
@@ -88,7 +88,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
88 | /// </summary> | 88 | /// </summary> |
89 | /// <remarks> | 89 | /// <remarks> |
90 | /// Even if false, the scene will still be saved on clean shutdown. | 90 | /// Even if false, the scene will still be saved on clean shutdown. |
91 | /// FIXME: Currently, setting this to false will mean that objects are not periodically returned from parcels. | 91 | /// FIXME: Currently, setting this to false will mean that objects are not periodically returned from parcels. |
92 | /// This needs to be fixed. | 92 | /// This needs to be fixed. |
93 | /// </remarks> | 93 | /// </remarks> |
94 | public bool PeriodicBackup { get; set; } | 94 | public bool PeriodicBackup { get; set; } |
@@ -103,9 +103,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
103 | /// If false then physical objects are disabled, though collisions will continue as normal. | 103 | /// If false then physical objects are disabled, though collisions will continue as normal. |
104 | /// </summary> | 104 | /// </summary> |
105 | 105 | ||
106 | public bool PhysicsEnabled | 106 | public bool PhysicsEnabled |
107 | { | 107 | { |
108 | get | 108 | get |
109 | { | 109 | { |
110 | return m_physicsEnabled; | 110 | return m_physicsEnabled; |
111 | } | 111 | } |
@@ -237,7 +237,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
237 | /// to compensate for SL bug | 237 | /// to compensate for SL bug |
238 | /// </summary> | 238 | /// </summary> |
239 | public bool LegacySitOffsets = true; | 239 | public bool LegacySitOffsets = true; |
240 | 240 | ||
241 | /// <summary> | 241 | /// <summary> |
242 | /// Can avatars cross from and to this region? | 242 | /// Can avatars cross from and to this region? |
243 | /// </summary> | 243 | /// </summary> |
@@ -245,7 +245,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
245 | 245 | ||
246 | /// Max prims an Physical object will hold | 246 | /// Max prims an Physical object will hold |
247 | /// </summary> | 247 | /// </summary> |
248 | /// | 248 | /// |
249 | public int m_linksetPhysCapacity = 0; | 249 | public int m_linksetPhysCapacity = 0; |
250 | 250 | ||
251 | /// <summary> | 251 | /// <summary> |
@@ -383,9 +383,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
383 | /// <summary> | 383 | /// <summary> |
384 | /// Frame time | 384 | /// Frame time |
385 | /// </remarks> | 385 | /// </remarks> |
386 | public float FrameTime { get; private set; } | 386 | public float FrameTime { get; private set; } |
387 | public int FrameTimeWarnPercent { get; private set; } | 387 | public int FrameTimeWarnPercent { get; private set; } |
388 | public int FrameTimeCritPercent { get; private set; } | 388 | public int FrameTimeCritPercent { get; private set; } |
389 | 389 | ||
390 | // Normalize the frame related stats to nominal 55fps for viewer and scripts option | 390 | // Normalize the frame related stats to nominal 55fps for viewer and scripts option |
391 | // see SimStatsReporter.cs | 391 | // see SimStatsReporter.cs |
@@ -397,7 +397,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
397 | /// <remarks> | 397 | /// <remarks> |
398 | /// Always derived from MinFrameTicks. | 398 | /// Always derived from MinFrameTicks. |
399 | /// </remarks> | 399 | /// </remarks> |
400 | public float MinMaintenanceTime { get; private set; } | 400 | public float MinMaintenanceTime { get; private set; } |
401 | 401 | ||
402 | private int m_update_physics = 1; | 402 | private int m_update_physics = 1; |
403 | private int m_update_entitymovement = 1; | 403 | private int m_update_entitymovement = 1; |
@@ -529,7 +529,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
529 | 529 | ||
530 | // private int m_lastUpdate; | 530 | // private int m_lastUpdate; |
531 | private bool m_firstHeartbeat = true; | 531 | private bool m_firstHeartbeat = true; |
532 | 532 | ||
533 | // private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time; | 533 | // private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time; |
534 | // private bool m_reprioritizationEnabled = true; | 534 | // private bool m_reprioritizationEnabled = true; |
535 | // private double m_reprioritizationInterval = 5000.0; | 535 | // private double m_reprioritizationInterval = 5000.0; |
@@ -868,7 +868,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
868 | 868 | ||
869 | #region Constructors | 869 | #region Constructors |
870 | 870 | ||
871 | public Scene(RegionInfo regInfo, AgentCircuitManager authen, | 871 | public Scene(RegionInfo regInfo, AgentCircuitManager authen, |
872 | ISimulationDataService simDataService, IEstateDataService estateDataService, | 872 | ISimulationDataService simDataService, IEstateDataService estateDataService, |
873 | IConfigSource config, string simulatorVersion) | 873 | IConfigSource config, string simulatorVersion) |
874 | : this(regInfo) | 874 | : this(regInfo) |
@@ -951,7 +951,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
951 | 951 | ||
952 | RegisterDefaultSceneEvents(); | 952 | RegisterDefaultSceneEvents(); |
953 | 953 | ||
954 | // XXX: Don't set the public property since we don't want to activate here. This needs to be handled | 954 | // XXX: Don't set the public property since we don't want to activate here. This needs to be handled |
955 | // better in the future. | 955 | // better in the future. |
956 | m_scripts_enabled = !RegionInfo.RegionSettings.DisableScripts; | 956 | m_scripts_enabled = !RegionInfo.RegionSettings.DisableScripts; |
957 | 957 | ||
@@ -1212,7 +1212,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1212 | 1212 | ||
1213 | StatsReporter.OnSendStatsResult += SendSimStatsPackets; | 1213 | StatsReporter.OnSendStatsResult += SendSimStatsPackets; |
1214 | StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats; | 1214 | StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats; |
1215 | 1215 | ||
1216 | } | 1216 | } |
1217 | 1217 | ||
1218 | public Scene(RegionInfo regInfo) | 1218 | public Scene(RegionInfo regInfo) |
@@ -1549,7 +1549,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1549 | /// </summary> | 1549 | /// </summary> |
1550 | /// <param name='startScripts'> | 1550 | /// <param name='startScripts'> |
1551 | /// Start the scripts within the scene. | 1551 | /// Start the scripts within the scene. |
1552 | /// </param> | 1552 | /// </param> |
1553 | public void Start(bool startScripts) | 1553 | public void Start(bool startScripts) |
1554 | { | 1554 | { |
1555 | if (IsRunning) | 1555 | if (IsRunning) |
@@ -1569,7 +1569,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1569 | 1569 | ||
1570 | //int pid = System.Diagnostics.Process.GetCurrentProcess().Id; | 1570 | //int pid = System.Diagnostics.Process.GetCurrentProcess().Id; |
1571 | //System.Diagnostics.Process proc = new System.Diagnostics.Process(); | 1571 | //System.Diagnostics.Process proc = new System.Diagnostics.Process(); |
1572 | //proc.EnableRaisingEvents=false; | 1572 | //proc.EnableRaisingEvents=false; |
1573 | //proc.StartInfo.FileName = "/bin/kill"; | 1573 | //proc.StartInfo.FileName = "/bin/kill"; |
1574 | //proc.StartInfo.Arguments = "-QUIT " + pid.ToString(); | 1574 | //proc.StartInfo.Arguments = "-QUIT " + pid.ToString(); |
1575 | //proc.Start(); | 1575 | //proc.Start(); |
@@ -1637,7 +1637,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1637 | Update(-1); | 1637 | Update(-1); |
1638 | 1638 | ||
1639 | Watchdog.RemoveThread(); | 1639 | Watchdog.RemoveThread(); |
1640 | } | 1640 | } |
1641 | 1641 | ||
1642 | private void Maintenance() | 1642 | private void Maintenance() |
1643 | { | 1643 | { |
@@ -1706,7 +1706,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1706 | previousMaintenanceTick = m_lastMaintenanceTick; | 1706 | previousMaintenanceTick = m_lastMaintenanceTick; |
1707 | m_lastMaintenanceTick = Util.EnvironmentTickCount(); | 1707 | m_lastMaintenanceTick = Util.EnvironmentTickCount(); |
1708 | runtc = Util.EnvironmentTickCountSubtract(m_lastMaintenanceTick, runtc); | 1708 | runtc = Util.EnvironmentTickCountSubtract(m_lastMaintenanceTick, runtc); |
1709 | runtc = (int)(MinMaintenanceTime * 1000) - runtc; | 1709 | runtc = (int)(MinMaintenanceTime * 1000) - runtc; |
1710 | 1710 | ||
1711 | if (runtc > 0) | 1711 | if (runtc > 0) |
1712 | m_maintenanceWaitEvent.WaitOne(runtc); | 1712 | m_maintenanceWaitEvent.WaitOne(runtc); |
@@ -1783,7 +1783,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1783 | if (Frame % m_update_entitymovement == 0) | 1783 | if (Frame % m_update_entitymovement == 0) |
1784 | m_sceneGraph.UpdateScenePresenceMovement(); | 1784 | m_sceneGraph.UpdateScenePresenceMovement(); |
1785 | 1785 | ||
1786 | // Get the simulation frame time that the avatar force input | 1786 | // Get the simulation frame time that the avatar force input |
1787 | // took | 1787 | // took |
1788 | tmpMS2 = Util.GetTimeStampMS(); | 1788 | tmpMS2 = Util.GetTimeStampMS(); |
1789 | agentMS = (float)(tmpMS2 - tmpMS); | 1789 | agentMS = (float)(tmpMS2 - tmpMS); |
@@ -1799,7 +1799,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1799 | if (SynchronizeScene != null) | 1799 | if (SynchronizeScene != null) |
1800 | SynchronizeScene(this); | 1800 | SynchronizeScene(this); |
1801 | } | 1801 | } |
1802 | 1802 | ||
1803 | tmpMS2 = Util.GetTimeStampMS(); | 1803 | tmpMS2 = Util.GetTimeStampMS(); |
1804 | physicsMS = (float)(tmpMS2 - tmpMS); | 1804 | physicsMS = (float)(tmpMS2 - tmpMS); |
1805 | tmpMS = tmpMS2; | 1805 | tmpMS = tmpMS2; |
@@ -1820,17 +1820,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
1820 | tmpMS2 = Util.GetTimeStampMS(); | 1820 | tmpMS2 = Util.GetTimeStampMS(); |
1821 | agentMS += (float)(tmpMS2 - tmpMS); | 1821 | agentMS += (float)(tmpMS2 - tmpMS); |
1822 | tmpMS = tmpMS2; | 1822 | tmpMS = tmpMS2; |
1823 | 1823 | ||
1824 | // Delete temp-on-rez stuff | 1824 | // Delete temp-on-rez stuff |
1825 | if (Frame % m_update_temp_cleaning == 0 && !m_cleaningTemps) | 1825 | if (Frame % m_update_temp_cleaning == 0 && !m_cleaningTemps) |
1826 | { | 1826 | { |
1827 | m_cleaningTemps = true; | 1827 | m_cleaningTemps = true; |
1828 | Util.FireAndForget(delegate { CleanTempObjects(); m_cleaningTemps = false; }); | 1828 | Util.FireAndForget(delegate { CleanTempObjects(); m_cleaningTemps = false; }); |
1829 | tmpMS2 = Util.GetTimeStampMS(); | 1829 | tmpMS2 = Util.GetTimeStampMS(); |
1830 | tempOnRezMS = (float)(tmpMS2 - tmpMS); // bad.. counts the FireAndForget, not CleanTempObjects | 1830 | tempOnRezMS = (float)(tmpMS2 - tmpMS); // bad.. counts the FireAndForget, not CleanTempObjects |
1831 | tmpMS = tmpMS2; | 1831 | tmpMS = tmpMS2; |
1832 | } | 1832 | } |
1833 | 1833 | ||
1834 | if (Frame % m_update_events == 0) | 1834 | if (Frame % m_update_events == 0) |
1835 | { | 1835 | { |
1836 | UpdateEvents(); | 1836 | UpdateEvents(); |
@@ -1916,7 +1916,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1916 | 1916 | ||
1917 | // reuse frameMS as temporary | 1917 | // reuse frameMS as temporary |
1918 | frameMS = (float)tmpMS2; | 1918 | frameMS = (float)tmpMS2; |
1919 | 1919 | ||
1920 | // sleep if we can | 1920 | // sleep if we can |
1921 | if (tmpMS2 > 0) | 1921 | if (tmpMS2 > 0) |
1922 | { | 1922 | { |
@@ -1939,9 +1939,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1939 | // script time is not scene frame time, but is displayed per frame | 1939 | // script time is not scene frame time, but is displayed per frame |
1940 | float scriptTimeMS = GetAndResetScriptExecutionTime(); | 1940 | float scriptTimeMS = GetAndResetScriptExecutionTime(); |
1941 | StatsReporter.AddFrameStats(TimeDilation, physicsFPS, agentMS, | 1941 | StatsReporter.AddFrameStats(TimeDilation, physicsFPS, agentMS, |
1942 | physicsMS + physicsMS2, otherMS , sleepMS, frameMS, scriptTimeMS); | 1942 | physicsMS + physicsMS2, otherMS , sleepMS, frameMS, scriptTimeMS); |
1943 | 1943 | ||
1944 | 1944 | ||
1945 | 1945 | ||
1946 | // if (Frame%m_update_avatars == 0) | 1946 | // if (Frame%m_update_avatars == 0) |
1947 | // UpdateInWorldTime(); | 1947 | // UpdateInWorldTime(); |
@@ -2129,7 +2129,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2129 | } | 2129 | } |
2130 | 2130 | ||
2131 | /// <summary> | 2131 | /// <summary> |
2132 | /// Tell an agent that their object has been returned. | 2132 | /// Tell an agent that their object has been returned. |
2133 | /// </summary> | 2133 | /// </summary> |
2134 | /// <remarks> | 2134 | /// <remarks> |
2135 | /// The actual return is handled by the caller. | 2135 | /// The actual return is handled by the caller. |
@@ -2221,7 +2221,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2221 | { | 2221 | { |
2222 | if(Bakedmap != null) | 2222 | if(Bakedmap != null) |
2223 | { | 2223 | { |
2224 | m_log.Warn("[TERRAIN]: terrain not found. Used stored baked terrain."); | 2224 | m_log.Warn("[TERRAIN]: terrain not found. Used stored baked terrain."); |
2225 | Heightmap = Bakedmap.MakeCopy(); | 2225 | Heightmap = Bakedmap.MakeCopy(); |
2226 | SimulationDataService.StoreTerrain(Heightmap.GetTerrainData(), RegionInfo.RegionID); | 2226 | SimulationDataService.StoreTerrain(Heightmap.GetTerrainData(), RegionInfo.RegionID); |
2227 | } | 2227 | } |
@@ -2290,7 +2290,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2290 | GridRegion region = new GridRegion(RegionInfo); | 2290 | GridRegion region = new GridRegion(RegionInfo); |
2291 | string error = GridService.RegisterRegion(RegionInfo.ScopeID, region); | 2291 | string error = GridService.RegisterRegion(RegionInfo.ScopeID, region); |
2292 | // m_log.DebugFormat("[SCENE]: RegisterRegionWithGrid. name={0},id={1},loc=<{2},{3}>,size=<{4},{5}>", | 2292 | // m_log.DebugFormat("[SCENE]: RegisterRegionWithGrid. name={0},id={1},loc=<{2},{3}>,size=<{4},{5}>", |
2293 | // m_regionName, | 2293 | // m_regionName, |
2294 | // RegionInfo.RegionID, | 2294 | // RegionInfo.RegionID, |
2295 | // RegionInfo.RegionLocX, RegionInfo.RegionLocY, | 2295 | // RegionInfo.RegionLocX, RegionInfo.RegionLocY, |
2296 | // RegionInfo.RegionSizeX, RegionInfo.RegionSizeY); | 2296 | // RegionInfo.RegionSizeX, RegionInfo.RegionSizeY); |
@@ -2369,7 +2369,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2369 | return PhysicsScene.SupportsRaycastWorldFiltered(); | 2369 | return PhysicsScene.SupportsRaycastWorldFiltered(); |
2370 | } | 2370 | } |
2371 | 2371 | ||
2372 | public object RayCastFiltered(Vector3 position, Vector3 direction, float length, int Count, RayFilterFlags filter) | 2372 | public object RayCastFiltered(Vector3 position, Vector3 direction, float length, int Count, RayFilterFlags filter) |
2373 | { | 2373 | { |
2374 | if (PhysicsScene == null) | 2374 | if (PhysicsScene == null) |
2375 | return null; | 2375 | return null; |
@@ -2463,7 +2463,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2463 | if (wpos.Z > pos.Z) pos = wpos; | 2463 | if (wpos.Z > pos.Z) pos = wpos; |
2464 | return pos; | 2464 | return pos; |
2465 | } | 2465 | } |
2466 | } | 2466 | } |
2467 | } | 2467 | } |
2468 | // else the first we got | 2468 | // else the first we got |
2469 | pos = physresults[0].Normal * scale; | 2469 | pos = physresults[0].Normal * scale; |
@@ -2775,7 +2775,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2775 | } | 2775 | } |
2776 | else | 2776 | else |
2777 | { | 2777 | { |
2778 | toReturn.Add((SceneObjectGroup)e); | 2778 | toReturn.Add((SceneObjectGroup)e); |
2779 | } | 2779 | } |
2780 | } | 2780 | } |
2781 | } | 2781 | } |
@@ -2847,7 +2847,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2847 | if (removeScripts) | 2847 | if (removeScripts) |
2848 | group.Clear(); | 2848 | group.Clear(); |
2849 | partList = null; | 2849 | partList = null; |
2850 | // m_log.DebugFormat("[SCENE]: Exit DeleteSceneObject() for {0} {1}", group.Name, group.UUID); | 2850 | // m_log.DebugFormat("[SCENE]: Exit DeleteSceneObject() for {0} {1}", group.Name, group.UUID); |
2851 | } | 2851 | } |
2852 | 2852 | ||
2853 | /// <summary> | 2853 | /// <summary> |
@@ -3023,7 +3023,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3023 | sceneObject.RootPart.AddFlag(PrimFlags.TemporaryOnRez); | 3023 | sceneObject.RootPart.AddFlag(PrimFlags.TemporaryOnRez); |
3024 | // sceneObject.RootPart.AddFlag(PrimFlags.Phantom); | 3024 | // sceneObject.RootPart.AddFlag(PrimFlags.Phantom); |
3025 | 3025 | ||
3026 | // Don't sent a full update here because this will cause full updates to be sent twice for | 3026 | // Don't sent a full update here because this will cause full updates to be sent twice for |
3027 | // attachments on region crossings, resulting in viewer glitches. | 3027 | // attachments on region crossings, resulting in viewer glitches. |
3028 | AddRestoredSceneObject(sceneObject, false, false, false); | 3028 | AddRestoredSceneObject(sceneObject, false, false, false); |
3029 | 3029 | ||
@@ -3044,7 +3044,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3044 | 3044 | ||
3045 | RootPrim.RemFlag(PrimFlags.TemporaryOnRez); | 3045 | RootPrim.RemFlag(PrimFlags.TemporaryOnRez); |
3046 | 3046 | ||
3047 | // We must currently not resume scripts at this stage since AttachmentsModule does not have the | 3047 | // We must currently not resume scripts at this stage since AttachmentsModule does not have the |
3048 | // information that this is due to a teleport/border cross rather than an ordinary attachment. | 3048 | // information that this is due to a teleport/border cross rather than an ordinary attachment. |
3049 | // We currently do this in Scene.MakeRootAgent() instead. | 3049 | // We currently do this in Scene.MakeRootAgent() instead. |
3050 | if (AttachmentsModule != null) | 3050 | if (AttachmentsModule != null) |
@@ -3141,7 +3141,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3141 | vialogin | 3141 | vialogin |
3142 | = (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0 | 3142 | = (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0 |
3143 | || (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0; | 3143 | || (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0; |
3144 | 3144 | ||
3145 | CheckHeartbeat(); | 3145 | CheckHeartbeat(); |
3146 | 3146 | ||
3147 | sp = GetScenePresence(client.AgentId); | 3147 | sp = GetScenePresence(client.AgentId); |
@@ -3152,10 +3152,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
3152 | "[SCENE]: Adding new child scene presence {0} {1} to scene {2} at pos {3}, tpflags: {4}", | 3152 | "[SCENE]: Adding new child scene presence {0} {1} to scene {2} at pos {3}, tpflags: {4}", |
3153 | client.Name, client.AgentId, RegionInfo.RegionName, client.StartPos, | 3153 | client.Name, client.AgentId, RegionInfo.RegionName, client.StartPos, |
3154 | ((TPFlags)aCircuit.teleportFlags).ToString()); | 3154 | ((TPFlags)aCircuit.teleportFlags).ToString()); |
3155 | 3155 | ||
3156 | m_clientManager.Add(client); | 3156 | m_clientManager.Add(client); |
3157 | SubscribeToClientEvents(client); | 3157 | SubscribeToClientEvents(client); |
3158 | 3158 | ||
3159 | sp = m_sceneGraph.CreateAndAddChildScenePresence(client, aCircuit.Appearance, type); | 3159 | sp = m_sceneGraph.CreateAndAddChildScenePresence(client, aCircuit.Appearance, type); |
3160 | 3160 | ||
3161 | sp.TeleportFlags = (TPFlags)aCircuit.teleportFlags; | 3161 | sp.TeleportFlags = (TPFlags)aCircuit.teleportFlags; |
@@ -3167,9 +3167,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3167 | // We must set this here so that TriggerOnNewClient and TriggerOnClientLogin can determine whether the | 3167 | // We must set this here so that TriggerOnNewClient and TriggerOnClientLogin can determine whether the |
3168 | // client is for a root or child agent. | 3168 | // client is for a root or child agent. |
3169 | // XXX: This may be better set for a new client before that client is added to the client manager. | 3169 | // XXX: This may be better set for a new client before that client is added to the client manager. |
3170 | // But need to know what happens in the case where a ScenePresence is already present (and if this | 3170 | // But need to know what happens in the case where a ScenePresence is already present (and if this |
3171 | // actually occurs). | 3171 | // actually occurs). |
3172 | 3172 | ||
3173 | 3173 | ||
3174 | m_log.WarnFormat( | 3174 | m_log.WarnFormat( |
3175 | "[SCENE]: Already found {0} scene presence for {1} in {2} when asked to add new scene presence", | 3175 | "[SCENE]: Already found {0} scene presence for {1} in {2} when asked to add new scene presence", |
@@ -3177,9 +3177,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3177 | 3177 | ||
3178 | reallyNew = false; | 3178 | reallyNew = false; |
3179 | } | 3179 | } |
3180 | client.SceneAgent = sp; | 3180 | client.SceneAgent = sp; |
3181 | 3181 | ||
3182 | // This is currently also being done earlier in NewUserConnection for real users to see if this | 3182 | // This is currently also being done earlier in NewUserConnection for real users to see if this |
3183 | // resolves problems where HG agents are occasionally seen by others as "Unknown user" in chat and other | 3183 | // resolves problems where HG agents are occasionally seen by others as "Unknown user" in chat and other |
3184 | // places. However, we still need to do it here for NPCs. | 3184 | // places. However, we still need to do it here for NPCs. |
3185 | CacheUserName(sp, aCircuit); | 3185 | CacheUserName(sp, aCircuit); |
@@ -3610,7 +3610,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3610 | } | 3610 | } |
3611 | 3611 | ||
3612 | /// <summary> | 3612 | /// <summary> |
3613 | /// Duplicates object specified by localID at position raycasted against RayTargetObject using | 3613 | /// Duplicates object specified by localID at position raycasted against RayTargetObject using |
3614 | /// RayEnd and RayStart to determine what the angle of the ray is | 3614 | /// RayEnd and RayStart to determine what the angle of the ray is |
3615 | /// </summary> | 3615 | /// </summary> |
3616 | /// <param name="localID">ID of object to duplicate</param> | 3616 | /// <param name="localID">ID of object to duplicate</param> |
@@ -3637,7 +3637,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3637 | if (target != null && target2 != null) | 3637 | if (target != null && target2 != null) |
3638 | { | 3638 | { |
3639 | Vector3 direction = Vector3.Normalize(RayEnd - RayStart); | 3639 | Vector3 direction = Vector3.Normalize(RayEnd - RayStart); |
3640 | 3640 | ||
3641 | pos = target2.AbsolutePosition; | 3641 | pos = target2.AbsolutePosition; |
3642 | //m_log.Info("[OBJECT_REZ]: TargetPos: " + pos.ToString() + ", RayStart: " + RayStart.ToString() + ", RayEnd: " + RayEnd.ToString() + ", Volume: " + Util.GetDistanceTo(RayStart,RayEnd).ToString() + ", mag1: " + Util.GetMagnitude(RayStart).ToString() + ", mag2: " + Util.GetMagnitude(RayEnd).ToString()); | 3642 | //m_log.Info("[OBJECT_REZ]: TargetPos: " + pos.ToString() + ", RayStart: " + RayStart.ToString() + ", RayEnd: " + RayEnd.ToString() + ", Volume: " + Util.GetDistanceTo(RayStart,RayEnd).ToString() + ", mag1: " + Util.GetMagnitude(RayStart).ToString() + ", mag2: " + Util.GetMagnitude(RayEnd).ToString()); |
3643 | 3643 | ||
@@ -3715,7 +3715,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3715 | } | 3715 | } |
3716 | 3716 | ||
3717 | /// <summary> | 3717 | /// <summary> |
3718 | /// Remove the given client from the scene. | 3718 | /// Remove the given client from the scene. |
3719 | /// </summary> | 3719 | /// </summary> |
3720 | /// <remarks> | 3720 | /// <remarks> |
3721 | /// Only clientstack code should call this directly. All other code should call IncomingCloseAgent() instead | 3721 | /// Only clientstack code should call this directly. All other code should call IncomingCloseAgent() instead |
@@ -3726,7 +3726,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3726 | /// <param name='closeChildAgents'> | 3726 | /// <param name='closeChildAgents'> |
3727 | /// Close the neighbour child agents associated with this client. | 3727 | /// Close the neighbour child agents associated with this client. |
3728 | /// </param> | 3728 | /// </param> |
3729 | /// | 3729 | /// |
3730 | 3730 | ||
3731 | private object m_removeClientPrivLock = new Object(); | 3731 | private object m_removeClientPrivLock = new Object(); |
3732 | 3732 | ||
@@ -3734,7 +3734,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3734 | { | 3734 | { |
3735 | AgentCircuitData acd = m_authenticateHandler.GetAgentCircuitData(agentID); | 3735 | AgentCircuitData acd = m_authenticateHandler.GetAgentCircuitData(agentID); |
3736 | 3736 | ||
3737 | // Shouldn't be necessary since RemoveClient() is currently only called by IClientAPI.Close() which | 3737 | // Shouldn't be necessary since RemoveClient() is currently only called by IClientAPI.Close() which |
3738 | // in turn is only called by Scene.IncomingCloseAgent() which checks whether the presence exists or not | 3738 | // in turn is only called by Scene.IncomingCloseAgent() which checks whether the presence exists or not |
3739 | // However, will keep for now just in case. | 3739 | // However, will keep for now just in case. |
3740 | if (acd == null) | 3740 | if (acd == null) |
@@ -3747,12 +3747,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
3747 | 3747 | ||
3748 | // TODO: Can we now remove this lock? | 3748 | // TODO: Can we now remove this lock? |
3749 | lock (m_removeClientPrivLock) | 3749 | lock (m_removeClientPrivLock) |
3750 | { | 3750 | { |
3751 | bool isChildAgent = false; | 3751 | bool isChildAgent = false; |
3752 | 3752 | ||
3753 | ScenePresence avatar = GetScenePresence(agentID); | 3753 | ScenePresence avatar = GetScenePresence(agentID); |
3754 | 3754 | ||
3755 | // Shouldn't be necessary since RemoveClient() is currently only called by IClientAPI.Close() which | 3755 | // Shouldn't be necessary since RemoveClient() is currently only called by IClientAPI.Close() which |
3756 | // in turn is only called by Scene.IncomingCloseAgent() which checks whether the presence exists or not | 3756 | // in turn is only called by Scene.IncomingCloseAgent() which checks whether the presence exists or not |
3757 | // However, will keep for now just in case. | 3757 | // However, will keep for now just in case. |
3758 | if (avatar == null) | 3758 | if (avatar == null) |
@@ -3792,7 +3792,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3792 | // unnecessary operations. This should go away once NPCs have no accompanying IClientAPI | 3792 | // unnecessary operations. This should go away once NPCs have no accompanying IClientAPI |
3793 | if (closeChildAgents && CapsModule != null) | 3793 | if (closeChildAgents && CapsModule != null) |
3794 | CapsModule.RemoveCaps(agentID, avatar.ControllingClient.CircuitCode); | 3794 | CapsModule.RemoveCaps(agentID, avatar.ControllingClient.CircuitCode); |
3795 | 3795 | ||
3796 | if (closeChildAgents && !isChildAgent) | 3796 | if (closeChildAgents && !isChildAgent) |
3797 | { | 3797 | { |
3798 | List<ulong> regions = avatar.KnownRegionHandles; | 3798 | List<ulong> regions = avatar.KnownRegionHandles; |
@@ -3806,7 +3806,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3806 | // m_log.Debug("[Scene]TriggerClientClosed done"); | 3806 | // m_log.Debug("[Scene]TriggerClientClosed done"); |
3807 | m_eventManager.TriggerOnRemovePresence(agentID); | 3807 | m_eventManager.TriggerOnRemovePresence(agentID); |
3808 | // m_log.Debug("[Scene]TriggerOnRemovePresence done"); | 3808 | // m_log.Debug("[Scene]TriggerOnRemovePresence done"); |
3809 | 3809 | ||
3810 | if (!isChildAgent) | 3810 | if (!isChildAgent) |
3811 | { | 3811 | { |
3812 | if (AttachmentsModule != null) | 3812 | if (AttachmentsModule != null) |
@@ -3865,7 +3865,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3865 | 3865 | ||
3866 | /// <summary> | 3866 | /// <summary> |
3867 | /// Removes region from an avatar's known region list. This coincides with child agents. For each child agent, there will be a known region entry. | 3867 | /// Removes region from an avatar's known region list. This coincides with child agents. For each child agent, there will be a known region entry. |
3868 | /// | 3868 | /// |
3869 | /// </summary> | 3869 | /// </summary> |
3870 | /// <param name="avatarID"></param> | 3870 | /// <param name="avatarID"></param> |
3871 | /// <param name="regionslst"></param> | 3871 | /// <param name="regionslst"></param> |
@@ -3914,7 +3914,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3914 | /// <param name="teleportFlags"></param> | 3914 | /// <param name="teleportFlags"></param> |
3915 | /// <param name="source">Source region (may be null)</param> | 3915 | /// <param name="source">Source region (may be null)</param> |
3916 | /// <param name="reason">Outputs the reason for the false response on this string</param> | 3916 | /// <param name="reason">Outputs the reason for the false response on this string</param> |
3917 | /// <returns>True if the region accepts this agent. False if it does not. False will | 3917 | /// <returns>True if the region accepts this agent. False if it does not. False will |
3918 | /// also return a reason.</returns> | 3918 | /// also return a reason.</returns> |
3919 | public bool NewUserConnection(AgentCircuitData agent, uint teleportFlags, GridRegion source, out string reason) | 3919 | public bool NewUserConnection(AgentCircuitData agent, uint teleportFlags, GridRegion source, out string reason) |
3920 | { | 3920 | { |
@@ -3942,9 +3942,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3942 | /// <param name="reason">Outputs the reason for the false response on this string</param> | 3942 | /// <param name="reason">Outputs the reason for the false response on this string</param> |
3943 | /// <param name="requirePresenceLookup">True for normal presence. False for NPC | 3943 | /// <param name="requirePresenceLookup">True for normal presence. False for NPC |
3944 | /// or other applications where a full grid/Hypergrid presence may not be required.</param> | 3944 | /// or other applications where a full grid/Hypergrid presence may not be required.</param> |
3945 | /// <returns>True if the region accepts this agent. False if it does not. False will | 3945 | /// <returns>True if the region accepts this agent. False if it does not. False will |
3946 | /// also return a reason.</returns> | 3946 | /// also return a reason.</returns> |
3947 | /// | 3947 | /// |
3948 | private object m_newUserConnLock = new object(); | 3948 | private object m_newUserConnLock = new object(); |
3949 | 3949 | ||
3950 | public bool NewUserConnection(AgentCircuitData acd, uint teleportFlags, GridRegion source, out string reason, bool requirePresenceLookup) | 3950 | public bool NewUserConnection(AgentCircuitData acd, uint teleportFlags, GridRegion source, out string reason, bool requirePresenceLookup) |
@@ -4037,7 +4037,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4037 | { | 4037 | { |
4038 | sp = GetScenePresence(acd.AgentID); | 4038 | sp = GetScenePresence(acd.AgentID); |
4039 | 4039 | ||
4040 | // We need to ensure that we are not already removing the scene presence before we ask it not to be | 4040 | // We need to ensure that we are not already removing the scene presence before we ask it not to be |
4041 | // closed. | 4041 | // closed. |
4042 | if (sp != null && sp.IsChildAgent | 4042 | if (sp != null && sp.IsChildAgent |
4043 | && (sp.LifecycleState == ScenePresenceState.Running | 4043 | && (sp.LifecycleState == ScenePresenceState.Running |
@@ -4051,16 +4051,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
4051 | // teleport from A -> D, but then -> C before A has asked B to close its old child agent. When C | 4051 | // teleport from A -> D, but then -> C before A has asked B to close its old child agent. When C |
4052 | // renews the lease on the child agent at B, we must make sure that the close from A does not succeed. | 4052 | // renews the lease on the child agent at B, we must make sure that the close from A does not succeed. |
4053 | // | 4053 | // |
4054 | // XXX: In the end, this should not be necessary if child agents are closed without delay on | 4054 | // XXX: In the end, this should not be necessary if child agents are closed without delay on |
4055 | // teleport, since realistically, the close request should always be processed before any other | 4055 | // teleport, since realistically, the close request should always be processed before any other |
4056 | // region tried to re-establish a child agent. This is much simpler since the logic below is | 4056 | // region tried to re-establish a child agent. This is much simpler since the logic below is |
4057 | // vulnerable to an issue when a viewer quits a region without sending a proper logout but then | 4057 | // vulnerable to an issue when a viewer quits a region without sending a proper logout but then |
4058 | // re-establishes the connection on a relogin. This could wrongly set the DoNotCloseAfterTeleport | 4058 | // re-establishes the connection on a relogin. This could wrongly set the DoNotCloseAfterTeleport |
4059 | // flag when no teleport had taken place (and hence no close was going to come). | 4059 | // flag when no teleport had taken place (and hence no close was going to come). |
4060 | // if (!acd.ChildrenCapSeeds.ContainsKey(RegionInfo.RegionHandle)) | 4060 | // if (!acd.ChildrenCapSeeds.ContainsKey(RegionInfo.RegionHandle)) |
4061 | // { | 4061 | // { |
4062 | // m_log.DebugFormat( | 4062 | // m_log.DebugFormat( |
4063 | // "[SCENE]: Setting DoNotCloseAfterTeleport for child scene presence {0} in {1} because source will attempt close.", | 4063 | // "[SCENE]: Setting DoNotCloseAfterTeleport for child scene presence {0} in {1} because source will attempt close.", |
4064 | // sp.Name, Name); | 4064 | // sp.Name, Name); |
4065 | // | 4065 | // |
4066 | // sp.DoNotCloseAfterTeleport = true; | 4066 | // sp.DoNotCloseAfterTeleport = true; |
@@ -4074,7 +4074,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4074 | sp.DoNotCloseAfterTeleport = true; | 4074 | sp.DoNotCloseAfterTeleport = true; |
4075 | 4075 | ||
4076 | m_log.DebugFormat( | 4076 | m_log.DebugFormat( |
4077 | "[SCENE]: Set DoNotCloseAfterTeleport for child scene presence {0} in {1} because this region will attempt end-of-teleport close from a previous close.", | 4077 | "[SCENE]: Set DoNotCloseAfterTeleport for child scene presence {0} in {1} because this region will attempt end-of-teleport close from a previous close.", |
4078 | sp.Name, Name); | 4078 | sp.Name, Name); |
4079 | } | 4079 | } |
4080 | } | 4080 | } |
@@ -4094,7 +4094,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4094 | if (sp.LifecycleState == ScenePresenceState.Removing) | 4094 | if (sp.LifecycleState == ScenePresenceState.Removing) |
4095 | { | 4095 | { |
4096 | m_log.WarnFormat( | 4096 | m_log.WarnFormat( |
4097 | "[SCENE]: Agent {0} in {1} was still being removed after {2}s. Aborting NewUserConnection.", | 4097 | "[SCENE]: Agent {0} in {1} was still being removed after {2}s. Aborting NewUserConnection.", |
4098 | sp.Name, Name, polls * pollInterval / 1000); | 4098 | sp.Name, Name, polls * pollInterval / 1000); |
4099 | 4099 | ||
4100 | return false; | 4100 | return false; |
@@ -4115,7 +4115,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4115 | // We have a root agent. Is it in transit? | 4115 | // We have a root agent. Is it in transit? |
4116 | if (!EntityTransferModule.IsInTransit(sp.UUID)) | 4116 | if (!EntityTransferModule.IsInTransit(sp.UUID)) |
4117 | { | 4117 | { |
4118 | // We have a zombie from a crashed session. | 4118 | // We have a zombie from a crashed session. |
4119 | // Or the same user is trying to be root twice here, won't work. | 4119 | // Or the same user is trying to be root twice here, won't work. |
4120 | // Kill it. | 4120 | // Kill it. |
4121 | m_log.WarnFormat( | 4121 | m_log.WarnFormat( |
@@ -4210,7 +4210,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4210 | { | 4210 | { |
4211 | m_log.DebugFormat( | 4211 | m_log.DebugFormat( |
4212 | "[SCENE]: Adjusting known seeds for existing agent {0} in {1}", | 4212 | "[SCENE]: Adjusting known seeds for existing agent {0} in {1}", |
4213 | acd.AgentID, RegionInfo.RegionName); | 4213 | acd.AgentID, RegionInfo.RegionName); |
4214 | 4214 | ||
4215 | if (CapsModule != null) | 4215 | if (CapsModule != null) |
4216 | { | 4216 | { |
@@ -4253,7 +4253,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4253 | // only check access, actual relocations will happen later on ScenePresence MakeRoot | 4253 | // only check access, actual relocations will happen later on ScenePresence MakeRoot |
4254 | // allow child agents creation | 4254 | // allow child agents creation |
4255 | if(!godlike && teleportFlags != (uint) TPFlags.Default) | 4255 | if(!godlike && teleportFlags != (uint) TPFlags.Default) |
4256 | { | 4256 | { |
4257 | bool checkTeleHub; | 4257 | bool checkTeleHub; |
4258 | 4258 | ||
4259 | // don't check hubs if via home or via lure | 4259 | // don't check hubs if via home or via lure |
@@ -4264,7 +4264,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4264 | checkTeleHub = vialogin | 4264 | checkTeleHub = vialogin |
4265 | || (TelehubAllowLandmarks == true ? false : ((teleportFlags & (uint)TPFlags.ViaLandmark) != 0 )) | 4265 | || (TelehubAllowLandmarks == true ? false : ((teleportFlags & (uint)TPFlags.ViaLandmark) != 0 )) |
4266 | || (teleportFlags & (uint) TPFlags.ViaLocation) != 0; | 4266 | || (teleportFlags & (uint) TPFlags.ViaLocation) != 0; |
4267 | 4267 | ||
4268 | if(!CheckLandPositionAccess(acd.AgentID, true, checkTeleHub, acd.startpos, out reason)) | 4268 | if(!CheckLandPositionAccess(acd.AgentID, true, checkTeleHub, acd.startpos, out reason)) |
4269 | { | 4269 | { |
4270 | m_authenticateHandler.RemoveCircuit(acd.circuitcode); | 4270 | m_authenticateHandler.RemoveCircuit(acd.circuitcode); |
@@ -4351,7 +4351,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4351 | /// </summary> | 4351 | /// </summary> |
4352 | /// <param name="agent">Circuit Data of the Agent we're verifying</param> | 4352 | /// <param name="agent">Circuit Data of the Agent we're verifying</param> |
4353 | /// <param name="reason">Outputs the reason for the false response on this string</param> | 4353 | /// <param name="reason">Outputs the reason for the false response on this string</param> |
4354 | /// <returns>True if the user has a session on the grid. False if it does not. False will | 4354 | /// <returns>True if the user has a session on the grid. False if it does not. False will |
4355 | /// also return a reason.</returns> | 4355 | /// also return a reason.</returns> |
4356 | public virtual bool VerifyUserPresence(AgentCircuitData agent, out string reason) | 4356 | public virtual bool VerifyUserPresence(AgentCircuitData agent, out string reason) |
4357 | { | 4357 | { |
@@ -4380,7 +4380,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4380 | /// </summary> | 4380 | /// </summary> |
4381 | /// <param name="agent">The circuit data for the agent</param> | 4381 | /// <param name="agent">The circuit data for the agent</param> |
4382 | /// <param name="reason">outputs the reason to this string</param> | 4382 | /// <param name="reason">outputs the reason to this string</param> |
4383 | /// <returns>True if the region accepts this agent. False if it does not. False will | 4383 | /// <returns>True if the region accepts this agent. False if it does not. False will |
4384 | /// also return a reason.</returns> | 4384 | /// also return a reason.</returns> |
4385 | protected virtual bool AuthorizeUser(AgentCircuitData agent, bool bypassAccessControl, out string reason) | 4385 | protected virtual bool AuthorizeUser(AgentCircuitData agent, bool bypassAccessControl, out string reason) |
4386 | { | 4386 | { |
@@ -4434,7 +4434,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4434 | // in access list / owner / manager | 4434 | // in access list / owner / manager |
4435 | if (RegionInfo.EstateSettings.HasAccess(agent.AgentID)) | 4435 | if (RegionInfo.EstateSettings.HasAccess(agent.AgentID)) |
4436 | return true; | 4436 | return true; |
4437 | 4437 | ||
4438 | // finally test groups | 4438 | // finally test groups |
4439 | bool groupAccess = false; | 4439 | bool groupAccess = false; |
4440 | 4440 | ||
@@ -4576,7 +4576,7 @@ Label_GroupsDone: | |||
4576 | // } | 4576 | // } |
4577 | 4577 | ||
4578 | /// <summary> | 4578 | /// <summary> |
4579 | /// We've got an update about an agent that sees into this region, | 4579 | /// We've got an update about an agent that sees into this region, |
4580 | /// send it to ScenePresence for processing It's the full data. | 4580 | /// send it to ScenePresence for processing It's the full data. |
4581 | /// </summary> | 4581 | /// </summary> |
4582 | /// <param name="cAgentData">Agent that contains all of the relevant things about an agent. | 4582 | /// <param name="cAgentData">Agent that contains all of the relevant things about an agent. |
@@ -4604,7 +4604,7 @@ Label_GroupsDone: | |||
4604 | } | 4604 | } |
4605 | 4605 | ||
4606 | // TODO: This check should probably be in QueryAccess(). | 4606 | // TODO: This check should probably be in QueryAccess(). |
4607 | ILandObject nearestParcel = GetNearestAllowedParcel(cAgentData.AgentID, | 4607 | ILandObject nearestParcel = GetNearestAllowedParcel(cAgentData.AgentID, |
4608 | (float)RegionInfo.RegionSizeX * 0.5f, (float)RegionInfo.RegionSizeY * 0.5f); | 4608 | (float)RegionInfo.RegionSizeX * 0.5f, (float)RegionInfo.RegionSizeY * 0.5f); |
4609 | if (nearestParcel == null) | 4609 | if (nearestParcel == null) |
4610 | { | 4610 | { |
@@ -4616,12 +4616,12 @@ Label_GroupsDone: | |||
4616 | } | 4616 | } |
4617 | 4617 | ||
4618 | // We have to wait until the viewer contacts this region | 4618 | // We have to wait until the viewer contacts this region |
4619 | // after receiving the EnableSimulator HTTP Event Queue message (for the v1 teleport protocol) | 4619 | // after receiving the EnableSimulator HTTP Event Queue message (for the v1 teleport protocol) |
4620 | // or TeleportFinish (for the v2 teleport protocol). This triggers the viewer to send | 4620 | // or TeleportFinish (for the v2 teleport protocol). This triggers the viewer to send |
4621 | // a UseCircuitCode packet which in turn calls AddNewAgent which finally creates the ScenePresence. | 4621 | // a UseCircuitCode packet which in turn calls AddNewAgent which finally creates the ScenePresence. |
4622 | ScenePresence sp = WaitGetScenePresence(cAgentData.AgentID); | 4622 | ScenePresence sp = WaitGetScenePresence(cAgentData.AgentID); |
4623 | 4623 | ||
4624 | if (sp != null) | 4624 | if (sp != null) |
4625 | { | 4625 | { |
4626 | if (!sp.IsChildAgent) | 4626 | if (!sp.IsChildAgent) |
4627 | { | 4627 | { |
@@ -4632,10 +4632,10 @@ Label_GroupsDone: | |||
4632 | if (cAgentData.SessionID != sp.ControllingClient.SessionId) | 4632 | if (cAgentData.SessionID != sp.ControllingClient.SessionId) |
4633 | { | 4633 | { |
4634 | m_log.WarnFormat( | 4634 | m_log.WarnFormat( |
4635 | "[SCENE]: Attempt to update agent {0} with invalid session id {1} (possibly from simulator in older version; tell them to update).", | 4635 | "[SCENE]: Attempt to update agent {0} with invalid session id {1} (possibly from simulator in older version; tell them to update).", |
4636 | sp.UUID, cAgentData.SessionID); | 4636 | sp.UUID, cAgentData.SessionID); |
4637 | 4637 | ||
4638 | Console.WriteLine(String.Format("[SCENE]: Attempt to update agent {0} ({1}) with invalid session id {2}", | 4638 | Console.WriteLine(String.Format("[SCENE]: Attempt to update agent {0} ({1}) with invalid session id {2}", |
4639 | sp.UUID, sp.ControllingClient.SessionId, cAgentData.SessionID)); | 4639 | sp.UUID, sp.ControllingClient.SessionId, cAgentData.SessionID)); |
4640 | } | 4640 | } |
4641 | 4641 | ||
@@ -4667,7 +4667,7 @@ Label_GroupsDone: | |||
4667 | } | 4667 | } |
4668 | 4668 | ||
4669 | /// <summary> | 4669 | /// <summary> |
4670 | /// We've got an update about an agent that sees into this region, | 4670 | /// We've got an update about an agent that sees into this region, |
4671 | /// send it to ScenePresence for processing It's only positional data | 4671 | /// send it to ScenePresence for processing It's only positional data |
4672 | /// </summary> | 4672 | /// </summary> |
4673 | /// <param name="cAgentData">AgentPosition that contains agent positional data so we can know what to send</param> | 4673 | /// <param name="cAgentData">AgentPosition that contains agent positional data so we can know what to send</param> |
@@ -4675,7 +4675,7 @@ Label_GroupsDone: | |||
4675 | public virtual bool IncomingUpdateChildAgent(AgentPosition cAgentData) | 4675 | public virtual bool IncomingUpdateChildAgent(AgentPosition cAgentData) |
4676 | { | 4676 | { |
4677 | // m_log.DebugFormat( | 4677 | // m_log.DebugFormat( |
4678 | // "[SCENE PRESENCE]: IncomingChildAgentDataUpdate POSITION for {0} in {1}, position {2}", | 4678 | // "[SCENE PRESENCE]: IncomingChildAgentDataUpdate POSITION for {0} in {1}, position {2}", |
4679 | // cAgentData.AgentID, Name, cAgentData.Position); | 4679 | // cAgentData.AgentID, Name, cAgentData.Position); |
4680 | 4680 | ||
4681 | ScenePresence childAgentUpdate = GetScenePresence(cAgentData.AgentID); | 4681 | ScenePresence childAgentUpdate = GetScenePresence(cAgentData.AgentID); |
@@ -4683,7 +4683,7 @@ Label_GroupsDone: | |||
4683 | { | 4683 | { |
4684 | // if (childAgentUpdate.ControllingClient.SessionId != cAgentData.SessionID) | 4684 | // if (childAgentUpdate.ControllingClient.SessionId != cAgentData.SessionID) |
4685 | // // Only warn for now | 4685 | // // Only warn for now |
4686 | // m_log.WarnFormat("[SCENE]: Attempt at updating position of agent {0} with invalid session id {1}. Neighbor running older version?", | 4686 | // m_log.WarnFormat("[SCENE]: Attempt at updating position of agent {0} with invalid session id {1}. Neighbor running older version?", |
4687 | // childAgentUpdate.UUID, cAgentData.SessionID); | 4687 | // childAgentUpdate.UUID, cAgentData.SessionID); |
4688 | 4688 | ||
4689 | // I can't imagine *yet* why we would get an update if the agent is a root agent.. | 4689 | // I can't imagine *yet* why we would get an update if the agent is a root agent.. |
@@ -4743,7 +4743,7 @@ Label_GroupsDone: | |||
4743 | if (acd == null) | 4743 | if (acd == null) |
4744 | { | 4744 | { |
4745 | m_log.DebugFormat( | 4745 | m_log.DebugFormat( |
4746 | "[SCENE]: Request to close agent {0} but no such agent in scene {1}. May have been closed previously.", | 4746 | "[SCENE]: Request to close agent {0} but no such agent in scene {1}. May have been closed previously.", |
4747 | agentID, Name); | 4747 | agentID, Name); |
4748 | 4748 | ||
4749 | return false; | 4749 | return false; |
@@ -4756,7 +4756,7 @@ Label_GroupsDone: | |||
4756 | else | 4756 | else |
4757 | { | 4757 | { |
4758 | m_log.WarnFormat( | 4758 | m_log.WarnFormat( |
4759 | "[SCENE]: Request to close agent {0} with invalid authorization token {1} in {2}", | 4759 | "[SCENE]: Request to close agent {0} with invalid authorization token {1} in {2}", |
4760 | agentID, auth_token, Name); | 4760 | agentID, auth_token, Name); |
4761 | } | 4761 | } |
4762 | 4762 | ||
@@ -4850,7 +4850,7 @@ Label_GroupsDone: | |||
4850 | return true; | 4850 | return true; |
4851 | } | 4851 | } |
4852 | m_log.DebugFormat( | 4852 | m_log.DebugFormat( |
4853 | "[SCENE]: Called CloseClient() with agent ID {0} but no such presence is in {1}", | 4853 | "[SCENE]: Called CloseClient() with agent ID {0} but no such presence is in {1}", |
4854 | agentID, Name); | 4854 | agentID, Name); |
4855 | 4855 | ||
4856 | return false; | 4856 | return false; |
@@ -5361,7 +5361,7 @@ Label_GroupsDone: | |||
5361 | /// Get a scene object group that contains the prim with the given local id | 5361 | /// Get a scene object group that contains the prim with the given local id |
5362 | /// </summary> | 5362 | /// </summary> |
5363 | /// <param name="localID"></param> | 5363 | /// <param name="localID"></param> |
5364 | /// <returns>null if no scene object group containing that prim is found</returns> | 5364 | /// <returns>null if no scene object group containing that prim is found</returns> |
5365 | public SceneObjectGroup GetGroupByPrim(uint localID) | 5365 | public SceneObjectGroup GetGroupByPrim(uint localID) |
5366 | { | 5366 | { |
5367 | return m_sceneGraph.GetGroupByPrim(localID); | 5367 | return m_sceneGraph.GetGroupByPrim(localID); |
@@ -5371,7 +5371,7 @@ Label_GroupsDone: | |||
5371 | /// Get a scene object group that contains the prim with the given uuid | 5371 | /// Get a scene object group that contains the prim with the given uuid |
5372 | /// </summary> | 5372 | /// </summary> |
5373 | /// <param name="fullID"></param> | 5373 | /// <param name="fullID"></param> |
5374 | /// <returns>null if no scene object group containing that prim is found</returns> | 5374 | /// <returns>null if no scene object group containing that prim is found</returns> |
5375 | public SceneObjectGroup GetGroupByPrim(UUID fullID) | 5375 | public SceneObjectGroup GetGroupByPrim(UUID fullID) |
5376 | { | 5376 | { |
5377 | return m_sceneGraph.GetGroupByPrim(fullID); | 5377 | return m_sceneGraph.GetGroupByPrim(fullID); |
@@ -5484,7 +5484,7 @@ Label_GroupsDone: | |||
5484 | // 1 = sim is up and accepting http requests. The heartbeat has | 5484 | // 1 = sim is up and accepting http requests. The heartbeat has |
5485 | // stopped and the sim is probably locked up, but a remote | 5485 | // stopped and the sim is probably locked up, but a remote |
5486 | // admin restart may succeed | 5486 | // admin restart may succeed |
5487 | // | 5487 | // |
5488 | // 2 = Sim is up and the heartbeat is running. The sim is likely | 5488 | // 2 = Sim is up and the heartbeat is running. The sim is likely |
5489 | // usable for people within | 5489 | // usable for people within |
5490 | // | 5490 | // |
@@ -5533,7 +5533,7 @@ Label_GroupsDone: | |||
5533 | { | 5533 | { |
5534 | int pid = System.Diagnostics.Process.GetCurrentProcess().Id; | 5534 | int pid = System.Diagnostics.Process.GetCurrentProcess().Id; |
5535 | System.Diagnostics.Process proc = new System.Diagnostics.Process(); | 5535 | System.Diagnostics.Process proc = new System.Diagnostics.Process(); |
5536 | proc.EnableRaisingEvents=false; | 5536 | proc.EnableRaisingEvents=false; |
5537 | proc.StartInfo.FileName = "/bin/kill"; | 5537 | proc.StartInfo.FileName = "/bin/kill"; |
5538 | proc.StartInfo.Arguments = "-QUIT " + pid.ToString(); | 5538 | proc.StartInfo.Arguments = "-QUIT " + pid.ToString(); |
5539 | proc.Start(); | 5539 | proc.Start(); |
@@ -5979,7 +5979,7 @@ Environment.Exit(1); | |||
5979 | g.GetAxisAlignedBoundingBoxRaw(out ominX, out omaxX, out ominY, out omaxY, out ominZ, out omaxZ); | 5979 | g.GetAxisAlignedBoundingBoxRaw(out ominX, out omaxX, out ominY, out omaxY, out ominZ, out omaxZ); |
5980 | 5980 | ||
5981 | // m_log.DebugFormat( | 5981 | // m_log.DebugFormat( |
5982 | // "[SCENE]: For {0} found AxisAlignedBoundingBoxRaw {1}, {2}", | 5982 | // "[SCENE]: For {0} found AxisAlignedBoundingBoxRaw {1}, {2}", |
5983 | // g.Name, new Vector3(ominX, ominY, ominZ), new Vector3(omaxX, omaxY, omaxZ)); | 5983 | // g.Name, new Vector3(ominX, ominY, ominZ), new Vector3(omaxX, omaxY, omaxZ)); |
5984 | 5984 | ||
5985 | ominX += vec.X; | 5985 | ominX += vec.X; |
@@ -6175,11 +6175,11 @@ Environment.Exit(1); | |||
6175 | reason = "Error authorizing agent: " + e.Message; | 6175 | reason = "Error authorizing agent: " + e.Message; |
6176 | return false; | 6176 | return false; |
6177 | } | 6177 | } |
6178 | 6178 | ||
6179 | // last check aditional land access restrictions and relocations | 6179 | // last check aditional land access restrictions and relocations |
6180 | // if crossing (viaTeleport false) check only the specified parcel | 6180 | // if crossing (viaTeleport false) check only the specified parcel |
6181 | return CheckLandPositionAccess(agentID, viaTeleport, true, position, out reason); | 6181 | return CheckLandPositionAccess(agentID, viaTeleport, true, position, out reason); |
6182 | } | 6182 | } |
6183 | 6183 | ||
6184 | // check access to land. | 6184 | // check access to land. |
6185 | public bool CheckLandPositionAccess(UUID agentID, bool NotCrossing, bool checkTeleHub, Vector3 position, out string reason) | 6185 | public bool CheckLandPositionAccess(UUID agentID, bool NotCrossing, bool checkTeleHub, Vector3 position, out string reason) |
@@ -6192,7 +6192,7 @@ Environment.Exit(1); | |||
6192 | bool isAdmin = Permissions.IsAdministrator(agentID); | 6192 | bool isAdmin = Permissions.IsAdministrator(agentID); |
6193 | if(isAdmin) | 6193 | if(isAdmin) |
6194 | return true; | 6194 | return true; |
6195 | 6195 | ||
6196 | // also honor estate managers access rights | 6196 | // also honor estate managers access rights |
6197 | bool isManager = Permissions.IsEstateManager(agentID); | 6197 | bool isManager = Permissions.IsEstateManager(agentID); |
6198 | if(isManager) | 6198 | if(isManager) |
@@ -6204,14 +6204,14 @@ Environment.Exit(1); | |||
6204 | { | 6204 | { |
6205 | SceneObjectGroup telehub; | 6205 | SceneObjectGroup telehub; |
6206 | if (RegionInfo.RegionSettings.TelehubObject != UUID.Zero && (telehub = GetSceneObjectGroup (RegionInfo.RegionSettings.TelehubObject)) != null && checkTeleHub) | 6206 | if (RegionInfo.RegionSettings.TelehubObject != UUID.Zero && (telehub = GetSceneObjectGroup (RegionInfo.RegionSettings.TelehubObject)) != null && checkTeleHub) |
6207 | { | 6207 | { |
6208 | bool banned = true; | 6208 | bool banned = true; |
6209 | bool validTelehub = false; | 6209 | bool validTelehub = false; |
6210 | List<SpawnPoint> spawnPoints = RegionInfo.RegionSettings.SpawnPoints(); | 6210 | List<SpawnPoint> spawnPoints = RegionInfo.RegionSettings.SpawnPoints(); |
6211 | Vector3 spawnPoint; | 6211 | Vector3 spawnPoint; |
6212 | ILandObject land = null; | 6212 | ILandObject land = null; |
6213 | Vector3 telehubPosition = telehub.AbsolutePosition; | 6213 | Vector3 telehubPosition = telehub.AbsolutePosition; |
6214 | 6214 | ||
6215 | if(spawnPoints.Count == 0) | 6215 | if(spawnPoints.Count == 0) |
6216 | { | 6216 | { |
6217 | // will this ever happen? | 6217 | // will this ever happen? |
@@ -6225,7 +6225,7 @@ Environment.Exit(1); | |||
6225 | } | 6225 | } |
6226 | } | 6226 | } |
6227 | else | 6227 | else |
6228 | { | 6228 | { |
6229 | Quaternion telehubRotation = telehub.GroupRotation; | 6229 | Quaternion telehubRotation = telehub.GroupRotation; |
6230 | foreach (SpawnPoint spawn in spawnPoints) | 6230 | foreach (SpawnPoint spawn in spawnPoints) |
6231 | { | 6231 | { |
@@ -6293,7 +6293,7 @@ Environment.Exit(1); | |||
6293 | return true; | 6293 | return true; |
6294 | } | 6294 | } |
6295 | 6295 | ||
6296 | public void StartTimerWatchdog() | 6296 | public void StartTimerWatchdog() |
6297 | { | 6297 | { |
6298 | m_timerWatchdog.Interval = 1000; | 6298 | m_timerWatchdog.Interval = 1000; |
6299 | m_timerWatchdog.Elapsed += TimerWatchdog; | 6299 | m_timerWatchdog.Elapsed += TimerWatchdog; |
@@ -6304,7 +6304,7 @@ Environment.Exit(1); | |||
6304 | public void TimerWatchdog(object sender, ElapsedEventArgs e) | 6304 | public void TimerWatchdog(object sender, ElapsedEventArgs e) |
6305 | { | 6305 | { |
6306 | CheckHeartbeat(); | 6306 | CheckHeartbeat(); |
6307 | } | 6307 | } |
6308 | 6308 | ||
6309 | /// This method deals with movement when an avatar is automatically moving (but this is distinct from the | 6309 | /// This method deals with movement when an avatar is automatically moving (but this is distinct from the |
6310 | /// autopilot that moves an avatar to a sit target!. | 6310 | /// autopilot that moves an avatar to a sit target!. |
@@ -6391,7 +6391,7 @@ Environment.Exit(1); | |||
6391 | } | 6391 | } |
6392 | 6392 | ||
6393 | /// <summary> | 6393 | /// <summary> |
6394 | /// Wrappers to get physics modules retrieve assets. | 6394 | /// Wrappers to get physics modules retrieve assets. |
6395 | /// </summary> | 6395 | /// </summary> |
6396 | /// <remarks> | 6396 | /// <remarks> |
6397 | /// Has to be done this way | 6397 | /// Has to be done this way |
diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs index d406625..e3e54e2 100644 --- a/OpenSim/Region/Framework/Scenes/SceneBase.cs +++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs | |||
@@ -57,7 +57,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
57 | #region Fields | 57 | #region Fields |
58 | 58 | ||
59 | public string Name { get { return RegionInfo.RegionName; } } | 59 | public string Name { get { return RegionInfo.RegionName; } } |
60 | 60 | ||
61 | public IConfigSource Config | 61 | public IConfigSource Config |
62 | { | 62 | { |
63 | get { return GetConfig(); } | 63 | get { return GetConfig(); } |
@@ -95,7 +95,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
95 | /// The module commanders available from this scene | 95 | /// The module commanders available from this scene |
96 | /// </value> | 96 | /// </value> |
97 | protected Dictionary<string, ICommander> m_moduleCommanders = new Dictionary<string, ICommander>(); | 97 | protected Dictionary<string, ICommander> m_moduleCommanders = new Dictionary<string, ICommander>(); |
98 | 98 | ||
99 | /// <value> | 99 | /// <value> |
100 | /// Registered classes that are capable of creating entities. | 100 | /// Registered classes that are capable of creating entities. |
101 | /// </value> | 101 | /// </value> |
@@ -108,7 +108,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
108 | protected uint m_lastAllocatedLocalId = 720000; | 108 | protected uint m_lastAllocatedLocalId = 720000; |
109 | 109 | ||
110 | private readonly Mutex _primAllocateMutex = new Mutex(false); | 110 | private readonly Mutex _primAllocateMutex = new Mutex(false); |
111 | 111 | ||
112 | protected readonly ClientManager m_clientManager = new ClientManager(); | 112 | protected readonly ClientManager m_clientManager = new ClientManager(); |
113 | 113 | ||
114 | public bool LoginsEnabled | 114 | public bool LoginsEnabled |
@@ -264,7 +264,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
264 | public virtual RegionInfo RegionInfo { get; private set; } | 264 | public virtual RegionInfo RegionInfo { get; private set; } |
265 | 265 | ||
266 | #region admin stuff | 266 | #region admin stuff |
267 | 267 | ||
268 | public abstract void OtherRegionUp(GridRegion otherRegion); | 268 | public abstract void OtherRegionUp(GridRegion otherRegion); |
269 | 269 | ||
270 | public virtual string GetSimulatorVersion() | 270 | public virtual string GetSimulatorVersion() |
@@ -307,7 +307,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
307 | 307 | ||
308 | return myID; | 308 | return myID; |
309 | } | 309 | } |
310 | 310 | ||
311 | #region Module Methods | 311 | #region Module Methods |
312 | 312 | ||
313 | /// <summary> | 313 | /// <summary> |
@@ -366,7 +366,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
366 | if (m_moduleCommanders.ContainsKey(name)) | 366 | if (m_moduleCommanders.ContainsKey(name)) |
367 | return m_moduleCommanders[name]; | 367 | return m_moduleCommanders[name]; |
368 | } | 368 | } |
369 | 369 | ||
370 | return null; | 370 | return null; |
371 | } | 371 | } |
372 | 372 | ||
@@ -416,7 +416,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
416 | public void RegisterModuleInterface<M>(M mod) | 416 | public void RegisterModuleInterface<M>(M mod) |
417 | { | 417 | { |
418 | // m_log.DebugFormat("[SCENE BASE]: Registering interface {0}", typeof(M)); | 418 | // m_log.DebugFormat("[SCENE BASE]: Registering interface {0}", typeof(M)); |
419 | 419 | ||
420 | List<Object> l = null; | 420 | List<Object> l = null; |
421 | if (!ModuleInterfaces.TryGetValue(typeof(M), out l)) | 421 | if (!ModuleInterfaces.TryGetValue(typeof(M), out l)) |
422 | { | 422 | { |
@@ -527,9 +527,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
527 | return new T[] {}; | 527 | return new T[] {}; |
528 | } | 528 | } |
529 | } | 529 | } |
530 | 530 | ||
531 | #endregion | 531 | #endregion |
532 | 532 | ||
533 | /// <summary> | 533 | /// <summary> |
534 | /// Call this from a region module to add a command to the OpenSim console. | 534 | /// Call this from a region module to add a command to the OpenSim console. |
535 | /// </summary> | 535 | /// </summary> |
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index 3eefd3c..6304778 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | |||
@@ -115,7 +115,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
115 | OpenSim.Framework.RegionFlags? regionFlags = n.RegionFlags; | 115 | OpenSim.Framework.RegionFlags? regionFlags = n.RegionFlags; |
116 | 116 | ||
117 | // m_log.DebugFormat( | 117 | // m_log.DebugFormat( |
118 | // "{0}: Region flags for {1} as seen by {2} are {3}", | 118 | // "{0}: Region flags for {1} as seen by {2} are {3}", |
119 | // LogHeader, n.RegionName, m_scene.Name, regionFlags != null ? regionFlags.ToString() : "not present"); | 119 | // LogHeader, n.RegionName, m_scene.Name, regionFlags != null ? regionFlags.ToString() : "not present"); |
120 | 120 | ||
121 | // Robust services before 2015-01-14 do not return the regionFlags information. In this case, we could | 121 | // Robust services before 2015-01-14 do not return the regionFlags information. In this case, we could |
@@ -175,7 +175,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
175 | public void SendChildAgentDataUpdate(AgentPosition cAgentData, ScenePresence presence) | 175 | public void SendChildAgentDataUpdate(AgentPosition cAgentData, ScenePresence presence) |
176 | { | 176 | { |
177 | // m_log.DebugFormat( | 177 | // m_log.DebugFormat( |
178 | // "[SCENE COMMUNICATION SERVICE]: Sending child agent position updates for {0} in {1}", | 178 | // "[SCENE COMMUNICATION SERVICE]: Sending child agent position updates for {0} in {1}", |
179 | // presence.Name, m_scene.Name); | 179 | // presence.Name, m_scene.Name); |
180 | 180 | ||
181 | // This assumes that we know what our neighbors are. | 181 | // This assumes that we know what our neighbors are. |
@@ -248,7 +248,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
248 | } | 248 | } |
249 | 249 | ||
250 | /// <summary> | 250 | /// <summary> |
251 | /// Closes a child agents in a collection of regions. Does so asynchronously | 251 | /// Closes a child agents in a collection of regions. Does so asynchronously |
252 | /// so that the caller doesn't wait. | 252 | /// so that the caller doesn't wait. |
253 | /// </summary> | 253 | /// </summary> |
254 | /// <param name="agentID"></param> | 254 | /// <param name="agentID"></param> |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 579874a..2f65ce2 100755 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -87,21 +87,21 @@ namespace OpenSim.Region.Framework.Scenes | |||
87 | protected int m_scriptLPS = 0; | 87 | protected int m_scriptLPS = 0; |
88 | 88 | ||
89 | protected internal PhysicsScene _PhyScene; | 89 | protected internal PhysicsScene _PhyScene; |
90 | 90 | ||
91 | /// <summary> | 91 | /// <summary> |
92 | /// Index the SceneObjectGroup for each part by the root part's UUID. | 92 | /// Index the SceneObjectGroup for each part by the root part's UUID. |
93 | /// </summary> | 93 | /// </summary> |
94 | protected internal Dictionary<UUID, SceneObjectGroup> SceneObjectGroupsByFullID = new Dictionary<UUID, SceneObjectGroup>(); | 94 | protected internal Dictionary<UUID, SceneObjectGroup> SceneObjectGroupsByFullID = new Dictionary<UUID, SceneObjectGroup>(); |
95 | 95 | ||
96 | /// <summary> | 96 | /// <summary> |
97 | /// Index the SceneObjectGroup for each part by that part's UUID. | 97 | /// Index the SceneObjectGroup for each part by that part's UUID. |
98 | /// </summary> | 98 | /// </summary> |
99 | protected internal Dictionary<UUID, SceneObjectGroup> SceneObjectGroupsByFullPartID = new Dictionary<UUID, SceneObjectGroup>(); | 99 | protected internal Dictionary<UUID, SceneObjectGroup> SceneObjectGroupsByFullPartID = new Dictionary<UUID, SceneObjectGroup>(); |
100 | 100 | ||
101 | /// <summary> | 101 | /// <summary> |
102 | /// Index the SceneObjectGroup for each part by that part's local ID. | 102 | /// Index the SceneObjectGroup for each part by that part's local ID. |
103 | /// </summary> | 103 | /// </summary> |
104 | protected internal Dictionary<uint, SceneObjectGroup> SceneObjectGroupsByLocalPartID = new Dictionary<uint, SceneObjectGroup>(); | 104 | protected internal Dictionary<uint, SceneObjectGroup> SceneObjectGroupsByLocalPartID = new Dictionary<uint, SceneObjectGroup>(); |
105 | 105 | ||
106 | /// <summary> | 106 | /// <summary> |
107 | /// Lock to prevent object group update, linking, delinking and duplication operations from running concurrently. | 107 | /// Lock to prevent object group update, linking, delinking and duplication operations from running concurrently. |
@@ -121,11 +121,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
121 | 121 | ||
122 | public PhysicsScene PhysicsScene | 122 | public PhysicsScene PhysicsScene |
123 | { | 123 | { |
124 | get | 124 | get |
125 | { | 125 | { |
126 | if (_PhyScene == null) | 126 | if (_PhyScene == null) |
127 | _PhyScene = m_parentScene.RequestModuleInterface<PhysicsScene>(); | 127 | _PhyScene = m_parentScene.RequestModuleInterface<PhysicsScene>(); |
128 | return _PhyScene; | 128 | return _PhyScene; |
129 | } | 129 | } |
130 | set | 130 | set |
131 | { | 131 | { |
@@ -215,7 +215,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
215 | // the joint in the Scene does not exist in the PhysicsScene. | 215 | // the joint in the Scene does not exist in the PhysicsScene. |
216 | // | 216 | // |
217 | // To solve this, we have an event in the PhysicsScene that is fired when a joint | 217 | // To solve this, we have an event in the PhysicsScene that is fired when a joint |
218 | // has changed position (because one of its associated PhysicsActors has changed | 218 | // has changed position (because one of its associated PhysicsActors has changed |
219 | // position). | 219 | // position). |
220 | // | 220 | // |
221 | // Therefore, JointMoved and JointDeactivated events will be fired as a result of the following Simulate(). | 221 | // Therefore, JointMoved and JointDeactivated events will be fired as a result of the following Simulate(). |
@@ -244,7 +244,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
244 | 244 | ||
245 | // coarse locations are sent as BYTE, so limited to the 255m max of normal regions | 245 | // coarse locations are sent as BYTE, so limited to the 255m max of normal regions |
246 | // try to work around that scale down X and Y acording to region size, so reducing the resolution | 246 | // try to work around that scale down X and Y acording to region size, so reducing the resolution |
247 | // | 247 | // |
248 | // viewers need to scale up | 248 | // viewers need to scale up |
249 | float scaleX = (float)m_parentScene.RegionInfo.RegionSizeX / (float)Constants.RegionSize; | 249 | float scaleX = (float)m_parentScene.RegionInfo.RegionSizeX / (float)Constants.RegionSize; |
250 | if (scaleX == 0) | 250 | if (scaleX == 0) |
@@ -259,7 +259,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
259 | for (int i = 0; i < Math.Min(presences.Count, maxLocations); ++i) | 259 | for (int i = 0; i < Math.Min(presences.Count, maxLocations); ++i) |
260 | { | 260 | { |
261 | ScenePresence sp = presences[i]; | 261 | ScenePresence sp = presences[i]; |
262 | 262 | ||
263 | // If this presence is a child agent, we don't want its coarse locations | 263 | // If this presence is a child agent, we don't want its coarse locations |
264 | if (sp.IsChildAgent) | 264 | if (sp.IsChildAgent) |
265 | continue; | 265 | continue; |
@@ -346,7 +346,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
346 | 346 | ||
347 | return ret; | 347 | return ret; |
348 | } | 348 | } |
349 | 349 | ||
350 | /// <summary> | 350 | /// <summary> |
351 | /// Add a newly created object to the scene. This will both update the scene, and send information about the | 351 | /// Add a newly created object to the scene. This will both update the scene, and send information about the |
352 | /// new object to all clients interested in the scene. | 352 | /// new object to all clients interested in the scene. |
@@ -372,11 +372,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
372 | 372 | ||
373 | return ret; | 373 | return ret; |
374 | } | 374 | } |
375 | 375 | ||
376 | /// <summary> | 376 | /// <summary> |
377 | /// Add a newly created object to the scene. | 377 | /// Add a newly created object to the scene. |
378 | /// </summary> | 378 | /// </summary> |
379 | /// | 379 | /// |
380 | /// This method does not send updates to the client - callers need to handle this themselves. | 380 | /// This method does not send updates to the client - callers need to handle this themselves. |
381 | /// Caller should also trigger EventManager.TriggerObjectAddedToScene | 381 | /// Caller should also trigger EventManager.TriggerObjectAddedToScene |
382 | /// <param name="sceneObject"></param> | 382 | /// <param name="sceneObject"></param> |
@@ -630,7 +630,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
630 | { | 630 | { |
631 | List<SceneObjectGroup> updates; | 631 | List<SceneObjectGroup> updates; |
632 | 632 | ||
633 | // Some updates add more updates to the updateList. | 633 | // Some updates add more updates to the updateList. |
634 | // Get the current list of updates and clear the list before iterating | 634 | // Get the current list of updates and clear the list before iterating |
635 | lock (m_updateList) | 635 | lock (m_updateList) |
636 | { | 636 | { |
@@ -762,7 +762,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
762 | { | 762 | { |
763 | Dictionary<UUID, ScenePresence> newmap = new Dictionary<UUID, ScenePresence>(m_scenePresenceMap); | 763 | Dictionary<UUID, ScenePresence> newmap = new Dictionary<UUID, ScenePresence>(m_scenePresenceMap); |
764 | List<ScenePresence> newlist = new List<ScenePresence>(m_scenePresenceArray); | 764 | List<ScenePresence> newlist = new List<ScenePresence>(m_scenePresenceArray); |
765 | 765 | ||
766 | // Remove the presence reference from the dictionary | 766 | // Remove the presence reference from the dictionary |
767 | if (newmap.ContainsKey(agentID)) | 767 | if (newmap.ContainsKey(agentID)) |
768 | { | 768 | { |
@@ -874,7 +874,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
874 | #endregion | 874 | #endregion |
875 | 875 | ||
876 | #region Get Methods | 876 | #region Get Methods |
877 | 877 | ||
878 | /// <summary> | 878 | /// <summary> |
879 | /// Get the controlling client for the given avatar, if there is one. | 879 | /// Get the controlling client for the given avatar, if there is one. |
880 | /// | 880 | /// |
@@ -1190,7 +1190,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1190 | return null; | 1190 | return null; |
1191 | return group.GetPart(localID); | 1191 | return group.GetPart(localID); |
1192 | } | 1192 | } |
1193 | 1193 | ||
1194 | /// <summary> | 1194 | /// <summary> |
1195 | /// Get a prim by name from the scene (will return the first | 1195 | /// Get a prim by name from the scene (will return the first |
1196 | /// found, if there are more than one prim with the same name) | 1196 | /// found, if there are more than one prim with the same name) |
@@ -1209,7 +1209,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1209 | foreach (SceneObjectPart p in ((SceneObjectGroup)entity).Parts) | 1209 | foreach (SceneObjectPart p in ((SceneObjectGroup)entity).Parts) |
1210 | { | 1210 | { |
1211 | // m_log.DebugFormat("[SCENE GRAPH]: Part {0} has name {1}", p.UUID, p.Name); | 1211 | // m_log.DebugFormat("[SCENE GRAPH]: Part {0} has name {1}", p.UUID, p.Name); |
1212 | 1212 | ||
1213 | if (p.Name == name) | 1213 | if (p.Name == name) |
1214 | { | 1214 | { |
1215 | sop = p; | 1215 | sop = p; |
@@ -1308,7 +1308,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1308 | /// <summary> | 1308 | /// <summary> |
1309 | /// Performs action on all scene presences. This can ultimately run the actions in parallel but | 1309 | /// Performs action on all scene presences. This can ultimately run the actions in parallel but |
1310 | /// any delegates passed in will need to implement their own locking on data they reference and | 1310 | /// any delegates passed in will need to implement their own locking on data they reference and |
1311 | /// modify outside of the scope of the delegate. | 1311 | /// modify outside of the scope of the delegate. |
1312 | /// </summary> | 1312 | /// </summary> |
1313 | /// <param name="action"></param> | 1313 | /// <param name="action"></param> |
1314 | public void ForEachScenePresence(Action<ScenePresence> action) | 1314 | public void ForEachScenePresence(Action<ScenePresence> action) |
@@ -1343,7 +1343,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1343 | } | 1343 | } |
1344 | } | 1344 | } |
1345 | } | 1345 | } |
1346 | 1346 | ||
1347 | #endregion | 1347 | #endregion |
1348 | 1348 | ||
1349 | #region Client Event handlers | 1349 | #region Client Event handlers |
@@ -1574,7 +1574,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1574 | public void UpdatePrimGroupPosition(uint localId, Vector3 pos, UUID updatingAgentId) | 1574 | public void UpdatePrimGroupPosition(uint localId, Vector3 pos, UUID updatingAgentId) |
1575 | { | 1575 | { |
1576 | SceneObjectGroup group = GetGroupByPrim(localId); | 1576 | SceneObjectGroup group = GetGroupByPrim(localId); |
1577 | 1577 | ||
1578 | if (group != null) | 1578 | if (group != null) |
1579 | { | 1579 | { |
1580 | if (group.IsAttachment || (group.RootPart.Shape.PCode == 9 && group.RootPart.Shape.State != 0)) | 1580 | if (group.IsAttachment || (group.RootPart.Shape.PCode == 9 && group.RootPart.Shape.State != 0)) |
@@ -1589,7 +1589,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1589 | } | 1589 | } |
1590 | else | 1590 | else |
1591 | { | 1591 | { |
1592 | if (m_parentScene.Permissions.CanMoveObject(group.UUID, updatingAgentId) | 1592 | if (m_parentScene.Permissions.CanMoveObject(group.UUID, updatingAgentId) |
1593 | && m_parentScene.Permissions.CanObjectEntry(group.UUID, false, pos)) | 1593 | && m_parentScene.Permissions.CanObjectEntry(group.UUID, false, pos)) |
1594 | { | 1594 | { |
1595 | group.UpdateGroupPosition(pos); | 1595 | group.UpdateGroupPosition(pos); |
@@ -1611,7 +1611,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1611 | protected internal void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient) | 1611 | protected internal void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient) |
1612 | { | 1612 | { |
1613 | SceneObjectGroup group = GetGroupByPrim(localID); | 1613 | SceneObjectGroup group = GetGroupByPrim(localID); |
1614 | 1614 | ||
1615 | if (group != null) | 1615 | if (group != null) |
1616 | { | 1616 | { |
1617 | if (m_parentScene.Permissions.CanEditObject(group.UUID,remoteClient.AgentId)) | 1617 | if (m_parentScene.Permissions.CanEditObject(group.UUID,remoteClient.AgentId)) |
@@ -1730,8 +1730,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1730 | SceneObjectPart part = m_parentScene.GetSceneObjectPart(primLocalID); | 1730 | SceneObjectPart part = m_parentScene.GetSceneObjectPart(primLocalID); |
1731 | if (part != null) | 1731 | if (part != null) |
1732 | { | 1732 | { |
1733 | part.ClickAction = Convert.ToByte(clickAction); | 1733 | part.ClickAction = Convert.ToByte(clickAction); |
1734 | group.HasGroupChanged = true; | 1734 | group.HasGroupChanged = true; |
1735 | } | 1735 | } |
1736 | } | 1736 | } |
1737 | } | 1737 | } |
@@ -1966,7 +1966,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1966 | // However, editing linked parts and unlinking may be different | 1966 | // However, editing linked parts and unlinking may be different |
1967 | // | 1967 | // |
1968 | SceneObjectGroup group = root.ParentGroup; | 1968 | SceneObjectGroup group = root.ParentGroup; |
1969 | 1969 | ||
1970 | List<SceneObjectPart> newSet = new List<SceneObjectPart>(group.Parts); | 1970 | List<SceneObjectPart> newSet = new List<SceneObjectPart>(group.Parts); |
1971 | 1971 | ||
1972 | newSet.Remove(root); | 1972 | newSet.Remove(root); |
@@ -1978,7 +1978,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1978 | group.DelinkFromGroup(p, false); | 1978 | group.DelinkFromGroup(p, false); |
1979 | 1979 | ||
1980 | SceneObjectPart newRoot = newSet[0]; | 1980 | SceneObjectPart newRoot = newSet[0]; |
1981 | 1981 | ||
1982 | // If there is more than one prim remaining, we | 1982 | // If there is more than one prim remaining, we |
1983 | // need to re-link | 1983 | // need to re-link |
1984 | // | 1984 | // |
@@ -1996,7 +1996,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1996 | { | 1996 | { |
1997 | newRoot.TriggerScriptChangedEvent(Changed.LINK); | 1997 | newRoot.TriggerScriptChangedEvent(Changed.LINK); |
1998 | newRoot.ParentGroup.HasGroupChanged = true; | 1998 | newRoot.ParentGroup.HasGroupChanged = true; |
1999 | newRoot.ParentGroup.ScheduleGroupForFullUpdate(); | 1999 | newRoot.ParentGroup.ScheduleGroupForFullUpdate(); |
2000 | } | 2000 | } |
2001 | } | 2001 | } |
2002 | 2002 | ||
@@ -2089,7 +2089,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2089 | public SceneObjectGroup DuplicateObject(uint originalPrimID, Vector3 offset, uint flags, UUID AgentID, UUID GroupID, Quaternion rot) | 2089 | public SceneObjectGroup DuplicateObject(uint originalPrimID, Vector3 offset, uint flags, UUID AgentID, UUID GroupID, Quaternion rot) |
2090 | { | 2090 | { |
2091 | // m_log.DebugFormat( | 2091 | // m_log.DebugFormat( |
2092 | // "[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}", | 2092 | // "[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}", |
2093 | // originalPrimID, offset, AgentID); | 2093 | // originalPrimID, offset, AgentID); |
2094 | 2094 | ||
2095 | SceneObjectGroup original = GetGroupByPrim(originalPrimID); | 2095 | SceneObjectGroup original = GetGroupByPrim(originalPrimID); |
@@ -2194,6 +2194,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2194 | 2194 | ||
2195 | #endregion | 2195 | #endregion |
2196 | 2196 | ||
2197 | 2197 | ||
2198 | } | 2198 | } |
2199 | } | 2199 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs index c5c083a..1e418df 100644 --- a/OpenSim/Region/Framework/Scenes/SceneManager.cs +++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs | |||
@@ -91,12 +91,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
91 | 91 | ||
92 | private static SceneManager m_instance = null; | 92 | private static SceneManager m_instance = null; |
93 | public static SceneManager Instance | 93 | public static SceneManager Instance |
94 | { | 94 | { |
95 | get { | 95 | get { |
96 | if (m_instance == null) | 96 | if (m_instance == null) |
97 | m_instance = new SceneManager(); | 97 | m_instance = new SceneManager(); |
98 | return m_instance; | 98 | return m_instance; |
99 | } | 99 | } |
100 | } | 100 | } |
101 | 101 | ||
102 | private readonly DoubleDictionary<UUID, string, Scene> m_localScenes = new DoubleDictionary<UUID, string, Scene>(); | 102 | private readonly DoubleDictionary<UUID, string, Scene> m_localScenes = new DoubleDictionary<UUID, string, Scene>(); |
@@ -340,7 +340,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
340 | 340 | ||
341 | public bool TrySetCurrentScene(string regionName) | 341 | public bool TrySetCurrentScene(string regionName) |
342 | { | 342 | { |
343 | if ((String.Compare(regionName, "root") == 0) | 343 | if ((String.Compare(regionName, "root") == 0) |
344 | || (String.Compare(regionName, "..") == 0) | 344 | || (String.Compare(regionName, "..") == 0) |
345 | || (String.Compare(regionName, "/") == 0)) | 345 | || (String.Compare(regionName, "/") == 0)) |
346 | { | 346 | { |
@@ -398,7 +398,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
398 | return true; | 398 | return true; |
399 | } | 399 | } |
400 | } | 400 | } |
401 | 401 | ||
402 | scene = null; | 402 | scene = null; |
403 | return false; | 403 | return false; |
404 | } | 404 | } |
@@ -415,7 +415,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
415 | return true; | 415 | return true; |
416 | } | 416 | } |
417 | } | 417 | } |
418 | 418 | ||
419 | scene = null; | 419 | scene = null; |
420 | return false; | 420 | return false; |
421 | } | 421 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs index 98617d1..9f98554 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs | |||
@@ -114,9 +114,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
114 | public bool AddInventoryItem(UUID agentID, uint localID, InventoryItemBase item, UUID copyItemID) | 114 | public bool AddInventoryItem(UUID agentID, uint localID, InventoryItemBase item, UUID copyItemID) |
115 | { | 115 | { |
116 | // m_log.DebugFormat( | 116 | // m_log.DebugFormat( |
117 | // "[PRIM INVENTORY]: Adding inventory item {0} from {1} to part with local ID {2}", | 117 | // "[PRIM INVENTORY]: Adding inventory item {0} from {1} to part with local ID {2}", |
118 | // item.Name, remoteClient.Name, localID); | 118 | // item.Name, remoteClient.Name, localID); |
119 | 119 | ||
120 | UUID newItemId = (copyItemID != UUID.Zero) ? copyItemID : item.ID; | 120 | UUID newItemId = (copyItemID != UUID.Zero) ? copyItemID : item.ID; |
121 | 121 | ||
122 | SceneObjectPart part = GetPart(localID); | 122 | SceneObjectPart part = GetPart(localID); |
@@ -147,8 +147,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
147 | // We're adding this to a prim we don't own. Force | 147 | // We're adding this to a prim we don't own. Force |
148 | // owner change | 148 | // owner change |
149 | taskItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; | 149 | taskItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; |
150 | } | 150 | } |
151 | else | 151 | else |
152 | { | 152 | { |
153 | taskItem.BasePermissions = item.BasePermissions; | 153 | taskItem.BasePermissions = item.BasePermissions; |
154 | taskItem.CurrentPermissions = item.CurrentPermissions; | 154 | taskItem.CurrentPermissions = item.CurrentPermissions; |
@@ -156,13 +156,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
156 | taskItem.GroupPermissions = item.GroupPermissions; | 156 | taskItem.GroupPermissions = item.GroupPermissions; |
157 | taskItem.NextPermissions = item.NextPermissions; | 157 | taskItem.NextPermissions = item.NextPermissions; |
158 | } | 158 | } |
159 | 159 | ||
160 | taskItem.Flags = item.Flags; | 160 | taskItem.Flags = item.Flags; |
161 | 161 | ||
162 | // m_log.DebugFormat( | 162 | // m_log.DebugFormat( |
163 | // "[PRIM INVENTORY]: Flags are 0x{0:X} for item {1} added to part {2} by {3}", | 163 | // "[PRIM INVENTORY]: Flags are 0x{0:X} for item {1} added to part {2} by {3}", |
164 | // taskItem.Flags, taskItem.Name, localID, remoteClient.Name); | 164 | // taskItem.Flags, taskItem.Name, localID, remoteClient.Name); |
165 | 165 | ||
166 | // TODO: These are pending addition of those fields to TaskInventoryItem | 166 | // TODO: These are pending addition of those fields to TaskInventoryItem |
167 | // taskItem.SalePrice = item.SalePrice; | 167 | // taskItem.SalePrice = item.SalePrice; |
168 | // taskItem.SaleType = item.SaleType; | 168 | // taskItem.SaleType = item.SaleType; |
@@ -328,13 +328,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
328 | xmldoc.AppendChild(xmlnode); | 328 | xmldoc.AppendChild(xmlnode); |
329 | XmlElement rootElement = xmldoc.CreateElement("", "ScriptData", | 329 | XmlElement rootElement = xmldoc.CreateElement("", "ScriptData", |
330 | String.Empty); | 330 | String.Empty); |
331 | 331 | ||
332 | xmldoc.AppendChild(rootElement); | 332 | xmldoc.AppendChild(rootElement); |
333 | 333 | ||
334 | 334 | ||
335 | XmlElement wrapper = xmldoc.CreateElement("", "ScriptStates", | 335 | XmlElement wrapper = xmldoc.CreateElement("", "ScriptStates", |
336 | String.Empty); | 336 | String.Empty); |
337 | 337 | ||
338 | rootElement.AppendChild(wrapper); | 338 | rootElement.AppendChild(wrapper); |
339 | 339 | ||
340 | foreach (KeyValuePair<UUID, string> state in states) | 340 | foreach (KeyValuePair<UUID, string> state in states) |
@@ -362,7 +362,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
362 | return; | 362 | return; |
363 | 363 | ||
364 | IScriptModule scriptModule = null; | 364 | IScriptModule scriptModule = null; |
365 | 365 | ||
366 | foreach (IScriptModule sm in s.RequestModuleInterfaces<IScriptModule>()) | 366 | foreach (IScriptModule sm in s.RequestModuleInterfaces<IScriptModule>()) |
367 | { | 367 | { |
368 | if (sm.ScriptEngineName == s.DefaultScriptEngine) | 368 | if (sm.ScriptEngineName == s.DefaultScriptEngine) |
@@ -401,7 +401,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
401 | return; | 401 | return; |
402 | 402 | ||
403 | XmlElement dataE = (XmlElement)dataL[0]; | 403 | XmlElement dataE = (XmlElement)dataL[0]; |
404 | 404 | ||
405 | foreach (XmlNode n in dataE.ChildNodes) | 405 | foreach (XmlNode n in dataE.ChildNodes) |
406 | { | 406 | { |
407 | XmlElement stateE = (XmlElement)n; | 407 | XmlElement stateE = (XmlElement)n; |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index e42b675..8fdb0f1 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -24,7 +24,7 @@ | |||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.ComponentModel; | 29 | using System.ComponentModel; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
@@ -46,7 +46,7 @@ using OpenSim.Services.Interfaces; | |||
46 | 46 | ||
47 | namespace OpenSim.Region.Framework.Scenes | 47 | namespace OpenSim.Region.Framework.Scenes |
48 | { | 48 | { |
49 | 49 | ||
50 | [Flags] | 50 | [Flags] |
51 | public enum scriptEvents | 51 | public enum scriptEvents |
52 | { | 52 | { |
@@ -148,7 +148,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
148 | { | 148 | { |
149 | if (value) | 149 | if (value) |
150 | { | 150 | { |
151 | 151 | ||
152 | if (Backup) | 152 | if (Backup) |
153 | { | 153 | { |
154 | m_scene.SceneGraph.FireChangeBackup(this); | 154 | m_scene.SceneGraph.FireChangeBackup(this); |
@@ -188,7 +188,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
188 | } | 188 | } |
189 | } | 189 | } |
190 | m_hasGroupChanged = value; | 190 | m_hasGroupChanged = value; |
191 | 191 | ||
192 | // m_log.DebugFormat( | 192 | // m_log.DebugFormat( |
193 | // "[SCENE OBJECT GROUP]: HasGroupChanged set to {0} for {1} {2}", m_hasGroupChanged, Name, LocalId); | 193 | // "[SCENE OBJECT GROUP]: HasGroupChanged set to {0} for {1} {2}", m_hasGroupChanged, Name, LocalId); |
194 | } | 194 | } |
@@ -197,7 +197,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
197 | } | 197 | } |
198 | 198 | ||
199 | private bool m_groupContainsForeignPrims = false; | 199 | private bool m_groupContainsForeignPrims = false; |
200 | 200 | ||
201 | /// <summary> | 201 | /// <summary> |
202 | /// Whether the group contains prims that came from a different group. This happens when | 202 | /// Whether the group contains prims that came from a different group. This happens when |
203 | /// linking or delinking groups. The implication is that until the group is persisted, | 203 | /// linking or delinking groups. The implication is that until the group is persisted, |
@@ -232,7 +232,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
232 | m_maxPersistTime = m_scene.m_persistAfter; | 232 | m_maxPersistTime = m_scene.m_persistAfter; |
233 | m_minPersistTime = m_scene.m_dontPersistBefore; | 233 | m_minPersistTime = m_scene.m_dontPersistBefore; |
234 | } | 234 | } |
235 | 235 | ||
236 | long currentTime = DateTime.UtcNow.Ticks; | 236 | long currentTime = DateTime.UtcNow.Ticks; |
237 | 237 | ||
238 | if (timeLastChanged == 0) timeLastChanged = currentTime; | 238 | if (timeLastChanged == 0) timeLastChanged = currentTime; |
@@ -419,7 +419,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
419 | // { | 419 | // { |
420 | // get { return m_rotation; } | 420 | // get { return m_rotation; } |
421 | // set { | 421 | // set { |
422 | // m_rotation = value; | 422 | // m_rotation = value; |
423 | // } | 423 | // } |
424 | // } | 424 | // } |
425 | 425 | ||
@@ -435,27 +435,27 @@ namespace OpenSim.Region.Framework.Scenes | |||
435 | Vector3 minScale = new Vector3(Constants.MaximumRegionSize, Constants.MaximumRegionSize, Constants.MaximumRegionSize); | 435 | Vector3 minScale = new Vector3(Constants.MaximumRegionSize, Constants.MaximumRegionSize, Constants.MaximumRegionSize); |
436 | Vector3 maxScale = Vector3.Zero; | 436 | Vector3 maxScale = Vector3.Zero; |
437 | Vector3 finalScale = new Vector3(0.5f, 0.5f, 0.5f); | 437 | Vector3 finalScale = new Vector3(0.5f, 0.5f, 0.5f); |
438 | 438 | ||
439 | SceneObjectPart[] parts = m_parts.GetArray(); | 439 | SceneObjectPart[] parts = m_parts.GetArray(); |
440 | for (int i = 0; i < parts.Length; i++) | 440 | for (int i = 0; i < parts.Length; i++) |
441 | { | 441 | { |
442 | SceneObjectPart part = parts[i]; | 442 | SceneObjectPart part = parts[i]; |
443 | Vector3 partscale = part.Scale; | 443 | Vector3 partscale = part.Scale; |
444 | Vector3 partoffset = part.OffsetPosition; | 444 | Vector3 partoffset = part.OffsetPosition; |
445 | 445 | ||
446 | minScale.X = (partscale.X + partoffset.X < minScale.X) ? partscale.X + partoffset.X : minScale.X; | 446 | minScale.X = (partscale.X + partoffset.X < minScale.X) ? partscale.X + partoffset.X : minScale.X; |
447 | minScale.Y = (partscale.Y + partoffset.Y < minScale.Y) ? partscale.Y + partoffset.Y : minScale.Y; | 447 | minScale.Y = (partscale.Y + partoffset.Y < minScale.Y) ? partscale.Y + partoffset.Y : minScale.Y; |
448 | minScale.Z = (partscale.Z + partoffset.Z < minScale.Z) ? partscale.Z + partoffset.Z : minScale.Z; | 448 | minScale.Z = (partscale.Z + partoffset.Z < minScale.Z) ? partscale.Z + partoffset.Z : minScale.Z; |
449 | 449 | ||
450 | maxScale.X = (partscale.X + partoffset.X > maxScale.X) ? partscale.X + partoffset.X : maxScale.X; | 450 | maxScale.X = (partscale.X + partoffset.X > maxScale.X) ? partscale.X + partoffset.X : maxScale.X; |
451 | maxScale.Y = (partscale.Y + partoffset.Y > maxScale.Y) ? partscale.Y + partoffset.Y : maxScale.Y; | 451 | maxScale.Y = (partscale.Y + partoffset.Y > maxScale.Y) ? partscale.Y + partoffset.Y : maxScale.Y; |
452 | maxScale.Z = (partscale.Z + partoffset.Z > maxScale.Z) ? partscale.Z + partoffset.Z : maxScale.Z; | 452 | maxScale.Z = (partscale.Z + partoffset.Z > maxScale.Z) ? partscale.Z + partoffset.Z : maxScale.Z; |
453 | } | 453 | } |
454 | 454 | ||
455 | finalScale.X = (minScale.X > maxScale.X) ? minScale.X : maxScale.X; | 455 | finalScale.X = (minScale.X > maxScale.X) ? minScale.X : maxScale.X; |
456 | finalScale.Y = (minScale.Y > maxScale.Y) ? minScale.Y : maxScale.Y; | 456 | finalScale.Y = (minScale.Y > maxScale.Y) ? minScale.Y : maxScale.Y; |
457 | finalScale.Z = (minScale.Z > maxScale.Z) ? minScale.Z : maxScale.Z; | 457 | finalScale.Z = (minScale.Z > maxScale.Z) ? minScale.Z : maxScale.Z; |
458 | 458 | ||
459 | return finalScale; | 459 | return finalScale; |
460 | } | 460 | } |
461 | } | 461 | } |
@@ -520,7 +520,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
520 | /// <remarks> | 520 | /// <remarks> |
521 | /// This is necessary in some cases, particularly when a scene object has just crossed into a region and doesn't | 521 | /// This is necessary in some cases, particularly when a scene object has just crossed into a region and doesn't |
522 | /// have the IsAttachment property yet checked. | 522 | /// have the IsAttachment property yet checked. |
523 | /// | 523 | /// |
524 | /// FIXME: However, this should be fixed so that this property | 524 | /// FIXME: However, this should be fixed so that this property |
525 | /// propertly reflects the underlying status. | 525 | /// propertly reflects the underlying status. |
526 | /// </remarks> | 526 | /// </remarks> |
@@ -530,7 +530,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
530 | return (IsAttachment || | 530 | return (IsAttachment || |
531 | (m_rootPart.Shape.PCode == (byte)PCodeEnum.Primitive && m_rootPart.Shape.State != 0)); | 531 | (m_rootPart.Shape.PCode == (byte)PCodeEnum.Primitive && m_rootPart.Shape.State != 0)); |
532 | } | 532 | } |
533 | 533 | ||
534 | private struct avtocrossInfo | 534 | private struct avtocrossInfo |
535 | { | 535 | { |
536 | public ScenePresence av; | 536 | public ScenePresence av; |
@@ -627,7 +627,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
627 | OpenSim.Services.Interfaces.GridRegion destination = null; | 627 | OpenSim.Services.Interfaces.GridRegion destination = null; |
628 | 628 | ||
629 | if (sog.RootPart.DIE_AT_EDGE) | 629 | if (sog.RootPart.DIE_AT_EDGE) |
630 | { | 630 | { |
631 | try | 631 | try |
632 | { | 632 | { |
633 | sogScene.DeleteSceneObject(sog, false); | 633 | sogScene.DeleteSceneObject(sog, false); |
@@ -648,7 +648,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
648 | localIDs.Add(sog.RootPart.LocalId); | 648 | localIDs.Add(sog.RootPart.LocalId); |
649 | sogScene.AddReturn(sog.OwnerID, sog.Name, sog.AbsolutePosition, | 649 | sogScene.AddReturn(sog.OwnerID, sog.Name, sog.AbsolutePosition, |
650 | "Returned at region cross"); | 650 | "Returned at region cross"); |
651 | sogScene.DeRezObjects(null, localIDs, UUID.Zero, DeRezAction.Return, UUID.Zero); | 651 | sogScene.DeRezObjects(null, localIDs, UUID.Zero, DeRezAction.Return, UUID.Zero); |
652 | } | 652 | } |
653 | catch (Exception) | 653 | catch (Exception) |
654 | { | 654 | { |
@@ -754,7 +754,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
754 | // avatar cross failed we need do dedicated standUp | 754 | // avatar cross failed we need do dedicated standUp |
755 | // part of it was done at CrossAgentToNewRegionAsync | 755 | // part of it was done at CrossAgentToNewRegionAsync |
756 | // so for now just remove the sog controls | 756 | // so for now just remove the sog controls |
757 | // this may need extra care | 757 | // this may need extra care |
758 | av.UnRegisterSeatControls(sog.UUID); | 758 | av.UnRegisterSeatControls(sog.UUID); |
759 | } | 759 | } |
760 | 760 | ||
@@ -869,7 +869,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
869 | public override UUID UUID | 869 | public override UUID UUID |
870 | { | 870 | { |
871 | get { return m_rootPart.UUID; } | 871 | get { return m_rootPart.UUID; } |
872 | set | 872 | set |
873 | { | 873 | { |
874 | lock (m_parts.SyncRoot) | 874 | lock (m_parts.SyncRoot) |
875 | { | 875 | { |
@@ -931,7 +931,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
931 | { | 931 | { |
932 | get { return true; } | 932 | get { return true; } |
933 | } | 933 | } |
934 | 934 | ||
935 | public bool IsSelected | 935 | public bool IsSelected |
936 | { | 936 | { |
937 | get { return m_isSelected; } | 937 | get { return m_isSelected; } |
@@ -944,7 +944,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
944 | // but ode engines should only really need to know about root part | 944 | // but ode engines should only really need to know about root part |
945 | // so they can put entire object simulation on hold and not colliding | 945 | // so they can put entire object simulation on hold and not colliding |
946 | // keep as was for now | 946 | // keep as was for now |
947 | 947 | ||
948 | PhysicsActor pa = m_rootPart.PhysActor; | 948 | PhysicsActor pa = m_rootPart.PhysActor; |
949 | if (pa != null) | 949 | if (pa != null) |
950 | { | 950 | { |
@@ -1107,7 +1107,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1107 | /// </summary> | 1107 | /// </summary> |
1108 | public SceneObjectGroup() | 1108 | public SceneObjectGroup() |
1109 | { | 1109 | { |
1110 | 1110 | ||
1111 | } | 1111 | } |
1112 | 1112 | ||
1113 | /// <summary> | 1113 | /// <summary> |
@@ -1152,7 +1152,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1152 | if (itemid != UUID.Zero) | 1152 | if (itemid != UUID.Zero) |
1153 | m_savedScriptState[itemid] = node.InnerXml; | 1153 | m_savedScriptState[itemid] = node.InnerXml; |
1154 | } | 1154 | } |
1155 | } | 1155 | } |
1156 | } | 1156 | } |
1157 | } | 1157 | } |
1158 | 1158 | ||
@@ -1211,11 +1211,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1211 | 1211 | ||
1212 | if (!Backup) | 1212 | if (!Backup) |
1213 | m_scene.EventManager.OnBackup += ProcessBackup; | 1213 | m_scene.EventManager.OnBackup += ProcessBackup; |
1214 | 1214 | ||
1215 | Backup = true; | 1215 | Backup = true; |
1216 | } | 1216 | } |
1217 | } | 1217 | } |
1218 | 1218 | ||
1219 | /// <summary> | 1219 | /// <summary> |
1220 | /// Attach this object to a scene. It will also now appear to agents. | 1220 | /// Attach this object to a scene. It will also now appear to agents. |
1221 | /// </summary> | 1221 | /// </summary> |
@@ -1378,7 +1378,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1378 | backBottomRight.Y = orig.Y + (part.Scale.Y / 2); | 1378 | backBottomRight.Y = orig.Y + (part.Scale.Y / 2); |
1379 | backBottomRight.Z = orig.Z - (part.Scale.Z / 2); | 1379 | backBottomRight.Z = orig.Z - (part.Scale.Z / 2); |
1380 | 1380 | ||
1381 | 1381 | ||
1382 | 1382 | ||
1383 | //m_log.InfoFormat("pre corner 1 is {0} {1} {2}", frontTopLeft.X, frontTopLeft.Y, frontTopLeft.Z); | 1383 | //m_log.InfoFormat("pre corner 1 is {0} {1} {2}", frontTopLeft.X, frontTopLeft.Y, frontTopLeft.Z); |
1384 | //m_log.InfoFormat("pre corner 2 is {0} {1} {2}", frontTopRight.X, frontTopRight.Y, frontTopRight.Z); | 1384 | //m_log.InfoFormat("pre corner 2 is {0} {1} {2}", frontTopRight.X, frontTopRight.Y, frontTopRight.Z); |
@@ -1675,7 +1675,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1675 | } | 1675 | } |
1676 | 1676 | ||
1677 | int nparts = parts.Length; | 1677 | int nparts = parts.Length; |
1678 | 1678 | ||
1679 | 1679 | ||
1680 | for (int i = 0; i < nparts; i++) | 1680 | for (int i = 0; i < nparts; i++) |
1681 | { | 1681 | { |
@@ -1692,7 +1692,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1692 | { | 1692 | { |
1693 | linksetResCost = 0; | 1693 | linksetResCost = 0; |
1694 | linksetPhysCost = 0; | 1694 | linksetPhysCost = 0; |
1695 | partCost = 0; | 1695 | partCost = 0; |
1696 | partPhysCost = 0; | 1696 | partPhysCost = 0; |
1697 | 1697 | ||
1698 | for (int i = 0; i < nparts; i++) | 1698 | for (int i = 0; i < nparts; i++) |
@@ -1838,7 +1838,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1838 | else | 1838 | else |
1839 | { | 1839 | { |
1840 | m_log.WarnFormat( | 1840 | m_log.WarnFormat( |
1841 | "[SOG]: Tried to add attachment {0} to avatar with UUID {1} in region {2} but the avatar is not present", | 1841 | "[SOG]: Tried to add attachment {0} to avatar with UUID {1} in region {2} but the avatar is not present", |
1842 | UUID, avatar.ControllingClient.AgentId, Scene.RegionInfo.RegionName); | 1842 | UUID, avatar.ControllingClient.AgentId, Scene.RegionInfo.RegionName); |
1843 | } | 1843 | } |
1844 | } | 1844 | } |
@@ -1925,7 +1925,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1925 | { | 1925 | { |
1926 | return Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f); | 1926 | return Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f); |
1927 | } | 1927 | } |
1928 | 1928 | ||
1929 | /// <summary> | 1929 | /// <summary> |
1930 | /// Set a part to act as the root part for this scene object | 1930 | /// Set a part to act as the root part for this scene object |
1931 | /// </summary> | 1931 | /// </summary> |
@@ -1940,7 +1940,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1940 | if (!IsAttachment) | 1940 | if (!IsAttachment) |
1941 | part.ParentID = 0; | 1941 | part.ParentID = 0; |
1942 | part.LinkNum = 0; | 1942 | part.LinkNum = 0; |
1943 | 1943 | ||
1944 | m_parts.Add(m_rootPart.UUID, m_rootPart); | 1944 | m_parts.Add(m_rootPart.UUID, m_rootPart); |
1945 | } | 1945 | } |
1946 | 1946 | ||
@@ -1991,19 +1991,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
1991 | // justincc: I don't believe this hack is needed any longer, especially since the physics | 1991 | // justincc: I don't believe this hack is needed any longer, especially since the physics |
1992 | // parts of set AbsolutePosition were already commented out. By changing HasGroupChanged to false | 1992 | // parts of set AbsolutePosition were already commented out. By changing HasGroupChanged to false |
1993 | // this method was preventing proper reload of scene objects. | 1993 | // this method was preventing proper reload of scene objects. |
1994 | 1994 | ||
1995 | // dahlia: I had to uncomment it, without it meshing was failing on some prims and objects | 1995 | // dahlia: I had to uncomment it, without it meshing was failing on some prims and objects |
1996 | // at region startup | 1996 | // at region startup |
1997 | 1997 | ||
1998 | // teravus: After this was removed from the linking algorithm, Linked prims no longer collided | 1998 | // teravus: After this was removed from the linking algorithm, Linked prims no longer collided |
1999 | // properly when non-physical if they havn't been moved. This breaks ALL builds. | 1999 | // properly when non-physical if they havn't been moved. This breaks ALL builds. |
2000 | // see: http://opensimulator.org/mantis/view.php?id=3108 | 2000 | // see: http://opensimulator.org/mantis/view.php?id=3108 |
2001 | 2001 | ||
2002 | // Here's the deal, this is ABSOLUTELY CRITICAL so the physics scene gets the update about the | 2002 | // Here's the deal, this is ABSOLUTELY CRITICAL so the physics scene gets the update about the |
2003 | // position of linkset prims. IF YOU CHANGE THIS, YOU MUST TEST colliding with just linked and | 2003 | // position of linkset prims. IF YOU CHANGE THIS, YOU MUST TEST colliding with just linked and |
2004 | // unmoved prims! As soon as you move a Prim/group, it will collide properly because Absolute | 2004 | // unmoved prims! As soon as you move a Prim/group, it will collide properly because Absolute |
2005 | // Position has been set! | 2005 | // Position has been set! |
2006 | 2006 | ||
2007 | public void ResetChildPrimPhysicsPositions() | 2007 | public void ResetChildPrimPhysicsPositions() |
2008 | { | 2008 | { |
2009 | // Setting this SOG's absolute position also loops through and sets the positions | 2009 | // Setting this SOG's absolute position also loops through and sets the positions |
@@ -2219,9 +2219,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2219 | 2219 | ||
2220 | if (m_rootPart.PhysActor != null) | 2220 | if (m_rootPart.PhysActor != null) |
2221 | m_rootPart.PhysActor.Building = false; | 2221 | m_rootPart.PhysActor.Building = false; |
2222 | } | 2222 | } |
2223 | else | 2223 | else |
2224 | { | 2224 | { |
2225 | // Apply physics to the root prim | 2225 | // Apply physics to the root prim |
2226 | m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_rootPart.VolumeDetectActive, false); | 2226 | m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_rootPart.VolumeDetectActive, false); |
2227 | } | 2227 | } |
@@ -2309,7 +2309,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2309 | 2309 | ||
2310 | DetachFromBackup(); | 2310 | DetachFromBackup(); |
2311 | m_log.DebugFormat( | 2311 | m_log.DebugFormat( |
2312 | "[SCENE OBJECT GROUP]: Returning object {0} due to parcel autoreturn", | 2312 | "[SCENE OBJECT GROUP]: Returning object {0} due to parcel autoreturn", |
2313 | RootPart.UUID); | 2313 | RootPart.UUID); |
2314 | m_scene.AddReturn(OwnerID == GroupID ? LastOwnerID : OwnerID, Name, AbsolutePosition, "parcel autoreturn"); | 2314 | m_scene.AddReturn(OwnerID == GroupID ? LastOwnerID : OwnerID, Name, AbsolutePosition, "parcel autoreturn"); |
2315 | m_scene.DeRezObjects(null, new List<uint>() { RootPart.LocalId }, UUID.Zero, | 2315 | m_scene.DeRezObjects(null, new List<uint>() { RootPart.LocalId }, UUID.Zero, |
@@ -2364,9 +2364,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2364 | 2364 | ||
2365 | datastore.StoreObject(backup_group, m_scene.RegionInfo.RegionID); | 2365 | datastore.StoreObject(backup_group, m_scene.RegionInfo.RegionID); |
2366 | 2366 | ||
2367 | backup_group.ForEachPart(delegate(SceneObjectPart part) | 2367 | backup_group.ForEachPart(delegate(SceneObjectPart part) |
2368 | { | 2368 | { |
2369 | part.Inventory.ProcessInventoryBackup(datastore); | 2369 | part.Inventory.ProcessInventoryBackup(datastore); |
2370 | 2370 | ||
2371 | if(part.KeyframeMotion != null) | 2371 | if(part.KeyframeMotion != null) |
2372 | { | 2372 | { |
@@ -2389,7 +2389,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2389 | catch (Exception e) | 2389 | catch (Exception e) |
2390 | { | 2390 | { |
2391 | m_log.ErrorFormat( | 2391 | m_log.ErrorFormat( |
2392 | "[SCENE]: Storing of {0}, {1} in {2} failed with exception {3}{4}", | 2392 | "[SCENE]: Storing of {0}, {1} in {2} failed with exception {3}{4}", |
2393 | Name, UUID, m_scene.RegionInfo.RegionName, e.Message, e.StackTrace); | 2393 | Name, UUID, m_scene.RegionInfo.RegionName, e.Message, e.StackTrace); |
2394 | } | 2394 | } |
2395 | } | 2395 | } |
@@ -2427,22 +2427,22 @@ namespace OpenSim.Region.Framework.Scenes | |||
2427 | { | 2427 | { |
2428 | m_dupeInProgress = true; | 2428 | m_dupeInProgress = true; |
2429 | SceneObjectGroup dupe = (SceneObjectGroup)MemberwiseClone(); | 2429 | SceneObjectGroup dupe = (SceneObjectGroup)MemberwiseClone(); |
2430 | 2430 | ||
2431 | dupe.m_parts = new MapAndArray<OpenMetaverse.UUID, SceneObjectPart>(); | 2431 | dupe.m_parts = new MapAndArray<OpenMetaverse.UUID, SceneObjectPart>(); |
2432 | 2432 | ||
2433 | // a copy isnt backedup | 2433 | // a copy isnt backedup |
2434 | dupe.Backup = false; | 2434 | dupe.Backup = false; |
2435 | dupe.InvalidBoundsRadius(); | 2435 | dupe.InvalidBoundsRadius(); |
2436 | 2436 | ||
2437 | // a copy is not in transit hopefully | 2437 | // a copy is not in transit hopefully |
2438 | dupe.inTransit = false; | 2438 | dupe.inTransit = false; |
2439 | 2439 | ||
2440 | // new group as no sitting avatars | 2440 | // new group as no sitting avatars |
2441 | dupe.m_sittingAvatars = new List<ScenePresence>(); | 2441 | dupe.m_sittingAvatars = new List<ScenePresence>(); |
2442 | 2442 | ||
2443 | dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed); | 2443 | dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed); |
2444 | dupe.m_rootPart.LinkNum = m_rootPart.LinkNum; | 2444 | dupe.m_rootPart.LinkNum = m_rootPart.LinkNum; |
2445 | 2445 | ||
2446 | 2446 | ||
2447 | if (userExposed) | 2447 | if (userExposed) |
2448 | dupe.m_rootPart.TrimPermissions(); | 2448 | dupe.m_rootPart.TrimPermissions(); |
@@ -2587,7 +2587,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2587 | 2587 | ||
2588 | if (pa != null) | 2588 | if (pa != null) |
2589 | { | 2589 | { |
2590 | // false to be applied as a impulse | 2590 | // false to be applied as a impulse |
2591 | pa.AddForce(impulse, false); | 2591 | pa.AddForce(impulse, false); |
2592 | m_scene.PhysicsScene.AddPhysicsActorTaint(pa); | 2592 | m_scene.PhysicsScene.AddPhysicsActorTaint(pa); |
2593 | } | 2593 | } |
@@ -2723,7 +2723,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2723 | if(IsAttachment) | 2723 | if(IsAttachment) |
2724 | { | 2724 | { |
2725 | ScenePresence avatar = m_scene.GetScenePresence(AttachedAvatar); | 2725 | ScenePresence avatar = m_scene.GetScenePresence(AttachedAvatar); |
2726 | if (avatar != null) | 2726 | if (avatar != null) |
2727 | pa = avatar.PhysicsActor; | 2727 | pa = avatar.PhysicsActor; |
2728 | } | 2728 | } |
2729 | else | 2729 | else |
@@ -2813,7 +2813,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2813 | public void ServiceObjectPropertiesFamilyRequest(IClientAPI remoteClient, UUID AgentID, uint RequestFlags) | 2813 | public void ServiceObjectPropertiesFamilyRequest(IClientAPI remoteClient, UUID AgentID, uint RequestFlags) |
2814 | { | 2814 | { |
2815 | remoteClient.SendObjectPropertiesFamilyData(RootPart, RequestFlags); | 2815 | remoteClient.SendObjectPropertiesFamilyData(RootPart, RequestFlags); |
2816 | 2816 | ||
2817 | // remoteClient.SendObjectPropertiesFamilyData(RequestFlags, RootPart.UUID, RootPart.OwnerID, RootPart.GroupID, RootPart.BaseMask, | 2817 | // remoteClient.SendObjectPropertiesFamilyData(RequestFlags, RootPart.UUID, RootPart.OwnerID, RootPart.GroupID, RootPart.BaseMask, |
2818 | // RootPart.OwnerMask, RootPart.GroupMask, RootPart.EveryoneMask, RootPart.NextOwnerMask, | 2818 | // RootPart.OwnerMask, RootPart.GroupMask, RootPart.EveryoneMask, RootPart.NextOwnerMask, |
2819 | // RootPart.OwnershipCost, RootPart.ObjectSaleType, RootPart.SalePrice, RootPart.Category, | 2819 | // RootPart.OwnershipCost, RootPart.ObjectSaleType, RootPart.SalePrice, RootPart.Category, |
@@ -2844,7 +2844,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2844 | // return; | 2844 | // return; |
2845 | 2845 | ||
2846 | // If we somehow got here to updating the SOG and its root part is not scheduled for update, | 2846 | // If we somehow got here to updating the SOG and its root part is not scheduled for update, |
2847 | // check to see if the physical position or rotation warrant an update. | 2847 | // check to see if the physical position or rotation warrant an update. |
2848 | if (m_rootPart.UpdateFlag == UpdateRequired.NONE) | 2848 | if (m_rootPart.UpdateFlag == UpdateRequired.NONE) |
2849 | { | 2849 | { |
2850 | // rootpart SendScheduledUpdates will check if a update is needed | 2850 | // rootpart SendScheduledUpdates will check if a update is needed |
@@ -2885,7 +2885,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2885 | { | 2885 | { |
2886 | // if (IsAttachment) | 2886 | // if (IsAttachment) |
2887 | // m_log.DebugFormat("[SOG]: Scheduling full update for {0} {1}", Name, LocalId); | 2887 | // m_log.DebugFormat("[SOG]: Scheduling full update for {0} {1}", Name, LocalId); |
2888 | 2888 | ||
2889 | checkAtTargets(); | 2889 | checkAtTargets(); |
2890 | RootPart.ScheduleFullUpdate(); | 2890 | RootPart.ScheduleFullUpdate(); |
2891 | 2891 | ||
@@ -2919,11 +2919,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
2919 | /// Immediately send a full update for this scene object. | 2919 | /// Immediately send a full update for this scene object. |
2920 | /// </summary> | 2920 | /// </summary> |
2921 | public void SendGroupFullUpdate() | 2921 | public void SendGroupFullUpdate() |
2922 | { | 2922 | { |
2923 | if (IsDeleted) | 2923 | if (IsDeleted) |
2924 | return; | 2924 | return; |
2925 | 2925 | ||
2926 | // m_log.DebugFormat("[SOG]: Sending immediate full group update for {0} {1}", Name, UUID); | 2926 | // m_log.DebugFormat("[SOG]: Sending immediate full group update for {0} {1}", Name, UUID); |
2927 | 2927 | ||
2928 | if (IsAttachment) | 2928 | if (IsAttachment) |
2929 | { | 2929 | { |
@@ -2964,7 +2964,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2964 | { | 2964 | { |
2965 | if (m_scene == null) // Need to check here as it's null during object creation | 2965 | if (m_scene == null) // Need to check here as it's null during object creation |
2966 | return; | 2966 | return; |
2967 | 2967 | ||
2968 | m_scene.SceneGraph.AddToUpdateList(this); | 2968 | m_scene.SceneGraph.AddToUpdateList(this); |
2969 | } | 2969 | } |
2970 | 2970 | ||
@@ -3139,7 +3139,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3139 | Vector3 oldGroupPosition = linkPart.GroupPosition; | 3139 | Vector3 oldGroupPosition = linkPart.GroupPosition; |
3140 | Quaternion oldRootRotation = linkPart.RotationOffset; | 3140 | Quaternion oldRootRotation = linkPart.RotationOffset; |
3141 | 3141 | ||
3142 | // A linked SOP remembers its location and rotation relative to the root of a group. | 3142 | // A linked SOP remembers its location and rotation relative to the root of a group. |
3143 | // Convert the root of the group being linked to be relative to the | 3143 | // Convert the root of the group being linked to be relative to the |
3144 | // root of the group being linked to. | 3144 | // root of the group being linked to. |
3145 | // Note: Some of the assignments have complex side effects. | 3145 | // Note: Some of the assignments have complex side effects. |
@@ -3247,7 +3247,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3247 | objectGroup.IsDeleted = true; | 3247 | objectGroup.IsDeleted = true; |
3248 | 3248 | ||
3249 | objectGroup.m_parts.Clear(); | 3249 | objectGroup.m_parts.Clear(); |
3250 | 3250 | ||
3251 | // Can't do this yet since backup still makes use of the root part without any synchronization | 3251 | // Can't do this yet since backup still makes use of the root part without any synchronization |
3252 | // objectGroup.m_rootPart = null; | 3252 | // objectGroup.m_rootPart = null; |
3253 | 3253 | ||
@@ -3258,8 +3258,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3258 | 3258 | ||
3259 | AttachToBackup(); | 3259 | AttachToBackup(); |
3260 | 3260 | ||
3261 | // Here's the deal, this is ABSOLUTELY CRITICAL so the physics scene gets the update about the | 3261 | // Here's the deal, this is ABSOLUTELY CRITICAL so the physics scene gets the update about the |
3262 | // position of linkset prims. IF YOU CHANGE THIS, YOU MUST TEST colliding with just linked and | 3262 | // position of linkset prims. IF YOU CHANGE THIS, YOU MUST TEST colliding with just linked and |
3263 | // unmoved prims! | 3263 | // unmoved prims! |
3264 | ResetChildPrimPhysicsPositions(); | 3264 | ResetChildPrimPhysicsPositions(); |
3265 | 3265 | ||
@@ -3453,7 +3453,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3453 | lock (m_parts.SyncRoot) | 3453 | lock (m_parts.SyncRoot) |
3454 | if(!m_parts.Remove(linkPart.UUID)) | 3454 | if(!m_parts.Remove(linkPart.UUID)) |
3455 | continue; | 3455 | continue; |
3456 | 3456 | ||
3457 | linkPart.ClearUndoState(); | 3457 | linkPart.ClearUndoState(); |
3458 | 3458 | ||
3459 | Vector3 worldPos = linkPart.GetWorldPosition(); | 3459 | Vector3 worldPos = linkPart.GetWorldPosition(); |
@@ -3580,7 +3580,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3580 | part.setOffsetPosition(newPos - AbsolutePosition); | 3580 | part.setOffsetPosition(newPos - AbsolutePosition); |
3581 | 3581 | ||
3582 | // (radams1 20120711: I don't know why part.OffsetPosition is set multiple times. | 3582 | // (radams1 20120711: I don't know why part.OffsetPosition is set multiple times. |
3583 | // It would have the affect of setting the physics engine position multiple | 3583 | // It would have the affect of setting the physics engine position multiple |
3584 | // times. In theory, that is not necessary but I don't have a good linkset | 3584 | // times. In theory, that is not necessary but I don't have a good linkset |
3585 | // test to know that cleaning up this code wouldn't break things.) | 3585 | // test to know that cleaning up this code wouldn't break things.) |
3586 | 3586 | ||
@@ -3685,29 +3685,29 @@ namespace OpenSim.Region.Framework.Scenes | |||
3685 | /// <param name="remoteClient"></param> | 3685 | /// <param name="remoteClient"></param> |
3686 | public void SpinMovement(Quaternion newOrientation, IClientAPI remoteClient) | 3686 | public void SpinMovement(Quaternion newOrientation, IClientAPI remoteClient) |
3687 | { | 3687 | { |
3688 | // The incoming newOrientation, sent by the client, "seems" to be the | 3688 | // The incoming newOrientation, sent by the client, "seems" to be the |
3689 | // desired target orientation. This needs further verification; in particular, | 3689 | // desired target orientation. This needs further verification; in particular, |
3690 | // one would expect that the initial incoming newOrientation should be | 3690 | // one would expect that the initial incoming newOrientation should be |
3691 | // fairly close to the original prim's physical orientation, | 3691 | // fairly close to the original prim's physical orientation, |
3692 | // m_rootPart.PhysActor.Orientation. This however does not seem to be the | 3692 | // m_rootPart.PhysActor.Orientation. This however does not seem to be the |
3693 | // case (might just be an issue with different quaternions representing the | 3693 | // case (might just be an issue with different quaternions representing the |
3694 | // same rotation, or it might be a coordinate system issue). | 3694 | // same rotation, or it might be a coordinate system issue). |
3695 | // | 3695 | // |
3696 | // Since it's not clear what the relationship is between the PhysActor.Orientation | 3696 | // Since it's not clear what the relationship is between the PhysActor.Orientation |
3697 | // and the incoming orientations sent by the client, we take an alternative approach | 3697 | // and the incoming orientations sent by the client, we take an alternative approach |
3698 | // of calculating the delta rotation between the orientations being sent by the | 3698 | // of calculating the delta rotation between the orientations being sent by the |
3699 | // client. (Since a spin is invoked by ctrl+shift+drag in the client, we expect | 3699 | // client. (Since a spin is invoked by ctrl+shift+drag in the client, we expect |
3700 | // a steady stream of several new orientations coming in from the client.) | 3700 | // a steady stream of several new orientations coming in from the client.) |
3701 | // This ensures that the delta rotations are being calculated from self-consistent | 3701 | // This ensures that the delta rotations are being calculated from self-consistent |
3702 | // pairs of old/new rotations. Given the delta rotation, we apply a torque around | 3702 | // pairs of old/new rotations. Given the delta rotation, we apply a torque around |
3703 | // the delta rotation axis, scaled by the object mass times an arbitrary scaling | 3703 | // the delta rotation axis, scaled by the object mass times an arbitrary scaling |
3704 | // factor (to ensure the resulting torque is not "too strong" or "too weak"). | 3704 | // factor (to ensure the resulting torque is not "too strong" or "too weak"). |
3705 | // | 3705 | // |
3706 | // Ideally we need to calculate (probably iteratively) the exact torque or series | 3706 | // Ideally we need to calculate (probably iteratively) the exact torque or series |
3707 | // of torques needed to arrive exactly at the destination orientation. However, since | 3707 | // of torques needed to arrive exactly at the destination orientation. However, since |
3708 | // it is not yet clear how to map the destination orientation (provided by the viewer) | 3708 | // it is not yet clear how to map the destination orientation (provided by the viewer) |
3709 | // into PhysActor orientations (needed by the physics engine), we omit this step. | 3709 | // into PhysActor orientations (needed by the physics engine), we omit this step. |
3710 | // This means that the resulting torque will at least be in the correct direction, | 3710 | // This means that the resulting torque will at least be in the correct direction, |
3711 | // but it will result in over-shoot or under-shoot of the target orientation. | 3711 | // but it will result in over-shoot or under-shoot of the target orientation. |
3712 | // For the end user, this means that ctrl+shift+drag can be used for relative, | 3712 | // For the end user, this means that ctrl+shift+drag can be used for relative, |
3713 | // but not absolute, adjustments of orientation for physical prims. | 3713 | // but not absolute, adjustments of orientation for physical prims. |
@@ -3750,7 +3750,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3750 | if(rotationAngle > 0) | 3750 | if(rotationAngle > 0) |
3751 | spinforce = spinforce * pa.Mass * 0.1f; // 0.1 is an arbitrary torque scaling factor | 3751 | spinforce = spinforce * pa.Mass * 0.1f; // 0.1 is an arbitrary torque scaling factor |
3752 | else | 3752 | else |
3753 | spinforce = spinforce * pa.Mass * -0.1f; // 0.1 is an arbitrary torque scaling | 3753 | spinforce = spinforce * pa.Mass * -0.1f; // 0.1 is an arbitrary torque scaling |
3754 | pa.AddAngularForce(spinforce,true); | 3754 | pa.AddAngularForce(spinforce,true); |
3755 | m_scene.PhysicsScene.AddPhysicsActorTaint(pa); | 3755 | m_scene.PhysicsScene.AddPhysicsActorTaint(pa); |
3756 | } | 3756 | } |
@@ -3870,8 +3870,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3870 | if (selectionPart != null) | 3870 | if (selectionPart != null) |
3871 | { | 3871 | { |
3872 | SceneObjectPart[] parts = m_parts.GetArray(); | 3872 | SceneObjectPart[] parts = m_parts.GetArray(); |
3873 | 3873 | ||
3874 | if (Scene != null && UsePhysics) | 3874 | if (Scene != null && UsePhysics) |
3875 | { | 3875 | { |
3876 | int maxprims = m_scene.m_linksetPhysCapacity; | 3876 | int maxprims = m_scene.m_linksetPhysCapacity; |
3877 | bool checkShape = (maxprims > 0 && | 3877 | bool checkShape = (maxprims > 0 && |
@@ -3975,7 +3975,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3975 | RootPart.OwnerMask = (RootPart.OwnerMask & lockBit) | ((newOwnerMask | foldedPerms) & lockMask); | 3975 | RootPart.OwnerMask = (RootPart.OwnerMask & lockBit) | ((newOwnerMask | foldedPerms) & lockMask); |
3976 | 3976 | ||
3977 | // m_log.DebugFormat( | 3977 | // m_log.DebugFormat( |
3978 | // "[SCENE OBJECT GROUP]: RootPart.OwnerMask now {0} for {1} in {2}", | 3978 | // "[SCENE OBJECT GROUP]: RootPart.OwnerMask now {0} for {1} in {2}", |
3979 | // (OpenMetaverse.PermissionMask)RootPart.OwnerMask, Name, Scene.Name); | 3979 | // (OpenMetaverse.PermissionMask)RootPart.OwnerMask, Name, Scene.Name); |
3980 | 3980 | ||
3981 | RootPart.ScheduleFullUpdate(); | 3981 | RootPart.ScheduleFullUpdate(); |
@@ -4273,7 +4273,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4273 | { | 4273 | { |
4274 | if (Scene == null || IsDeleted || inTransit) | 4274 | if (Scene == null || IsDeleted || inTransit) |
4275 | return 1.0f; | 4275 | return 1.0f; |
4276 | 4276 | ||
4277 | float maxsize = Scene.m_maxNonphys; | 4277 | float maxsize = Scene.m_maxNonphys; |
4278 | PhysicsActor pa = m_rootPart.PhysActor; | 4278 | PhysicsActor pa = m_rootPart.PhysActor; |
4279 | // assuming physics is more restrictive | 4279 | // assuming physics is more restrictive |
@@ -4282,7 +4282,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4282 | 4282 | ||
4283 | SceneObjectPart[] parts = m_parts.GetArray(); | 4283 | SceneObjectPart[] parts = m_parts.GetArray(); |
4284 | float larger = float.MinValue; | 4284 | float larger = float.MinValue; |
4285 | 4285 | ||
4286 | for(int i = 0; i < parts.Length; i++) | 4286 | for(int i = 0; i < parts.Length; i++) |
4287 | { | 4287 | { |
4288 | SceneObjectPart obPart = parts[i]; | 4288 | SceneObjectPart obPart = parts[i]; |
@@ -4310,7 +4310,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4310 | { | 4310 | { |
4311 | if (Scene == null || IsDeleted || inTransit) | 4311 | if (Scene == null || IsDeleted || inTransit) |
4312 | return 1.0f; | 4312 | return 1.0f; |
4313 | 4313 | ||
4314 | float minsize = Scene.m_minNonphys; | 4314 | float minsize = Scene.m_minNonphys; |
4315 | PhysicsActor pa = m_rootPart.PhysActor; | 4315 | PhysicsActor pa = m_rootPart.PhysActor; |
4316 | // assuming physics is more restrictive | 4316 | // assuming physics is more restrictive |
@@ -4319,7 +4319,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4319 | 4319 | ||
4320 | SceneObjectPart[] parts = m_parts.GetArray(); | 4320 | SceneObjectPart[] parts = m_parts.GetArray(); |
4321 | float smaller = float.MaxValue; | 4321 | float smaller = float.MaxValue; |
4322 | 4322 | ||
4323 | for(int i = 0; i < parts.Length; i++) | 4323 | for(int i = 0; i < parts.Length; i++) |
4324 | { | 4324 | { |
4325 | SceneObjectPart obPart = parts[i]; | 4325 | SceneObjectPart obPart = parts[i]; |
@@ -4388,7 +4388,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4388 | /// </summary> | 4388 | /// </summary> |
4389 | /// <param name="pos"></param> | 4389 | /// <param name="pos"></param> |
4390 | /// <param name="localID"></param> | 4390 | /// <param name="localID"></param> |
4391 | /// | 4391 | /// |
4392 | 4392 | ||
4393 | public void UpdateSinglePosition(Vector3 pos, uint localID) | 4393 | public void UpdateSinglePosition(Vector3 pos, uint localID) |
4394 | { | 4394 | { |
@@ -4443,7 +4443,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4443 | } | 4443 | } |
4444 | 4444 | ||
4445 | AbsolutePosition = newPos; | 4445 | AbsolutePosition = newPos; |
4446 | 4446 | ||
4447 | if (IsAttachment) | 4447 | if (IsAttachment) |
4448 | m_rootPart.AttachedPos = newPos; | 4448 | m_rootPart.AttachedPos = newPos; |
4449 | 4449 | ||
@@ -4469,7 +4469,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4469 | public void UpdateGroupRotationR(Quaternion rot) | 4469 | public void UpdateGroupRotationR(Quaternion rot) |
4470 | { | 4470 | { |
4471 | m_rootPart.UpdateRotation(rot); | 4471 | m_rootPart.UpdateRotation(rot); |
4472 | 4472 | ||
4473 | /* this is done by rootpart RotationOffset set called by UpdateRotation | 4473 | /* this is done by rootpart RotationOffset set called by UpdateRotation |
4474 | PhysicsActor actor = m_rootPart.PhysActor; | 4474 | PhysicsActor actor = m_rootPart.PhysActor; |
4475 | if (actor != null) | 4475 | if (actor != null) |
@@ -4747,7 +4747,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4747 | if (setX || setY || setZ) | 4747 | if (setX || setY || setZ) |
4748 | { | 4748 | { |
4749 | bool lockaxis = (rotate10 == 0); // zero means axis locked | 4749 | bool lockaxis = (rotate10 == 0); // zero means axis locked |
4750 | 4750 | ||
4751 | byte locks = RootPart.RotationAxisLocks; | 4751 | byte locks = RootPart.RotationAxisLocks; |
4752 | 4752 | ||
4753 | if (setX) | 4753 | if (setX) |
@@ -4757,7 +4757,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4757 | else | 4757 | else |
4758 | locks &= (byte)SceneObjectGroup.axisSelect.NOT_STATUS_ROTATE_X; | 4758 | locks &= (byte)SceneObjectGroup.axisSelect.NOT_STATUS_ROTATE_X; |
4759 | } | 4759 | } |
4760 | 4760 | ||
4761 | if (setY) | 4761 | if (setY) |
4762 | { | 4762 | { |
4763 | if(lockaxis) | 4763 | if(lockaxis) |
@@ -4791,7 +4791,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4791 | if (axis == (int)SceneObjectGroup.axisSelect.STATUS_ROTATE_X) | 4791 | if (axis == (int)SceneObjectGroup.axisSelect.STATUS_ROTATE_X) |
4792 | return (rotAxislocks & (byte)SceneObjectGroup.axisSelect.STATUS_ROTATE_X) == 0 ? 1:0; | 4792 | return (rotAxislocks & (byte)SceneObjectGroup.axisSelect.STATUS_ROTATE_X) == 0 ? 1:0; |
4793 | 4793 | ||
4794 | return 0; | 4794 | return 0; |
4795 | } | 4795 | } |
4796 | 4796 | ||
4797 | public int registerRotTargetWaypoint(Quaternion target, float tolerance) | 4797 | public int registerRotTargetWaypoint(Quaternion target, float tolerance) |
@@ -4837,7 +4837,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4837 | m_scene.AddGroupTarget(this); | 4837 | m_scene.AddGroupTarget(this); |
4838 | return (int)handle; | 4838 | return (int)handle; |
4839 | } | 4839 | } |
4840 | 4840 | ||
4841 | public void unregisterTargetWaypoint(int handle) | 4841 | public void unregisterTargetWaypoint(int handle) |
4842 | { | 4842 | { |
4843 | lock (m_targets) | 4843 | lock (m_targets) |
@@ -4879,14 +4879,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
4879 | } | 4879 | } |
4880 | } | 4880 | } |
4881 | } | 4881 | } |
4882 | 4882 | ||
4883 | if (atTargets.Count > 0) | 4883 | if (atTargets.Count > 0) |
4884 | { | 4884 | { |
4885 | SceneObjectPart[] parts = m_parts.GetArray(); | 4885 | SceneObjectPart[] parts = m_parts.GetArray(); |
4886 | uint[] localids = new uint[parts.Length]; | 4886 | uint[] localids = new uint[parts.Length]; |
4887 | for (int i = 0; i < parts.Length; i++) | 4887 | for (int i = 0; i < parts.Length; i++) |
4888 | localids[i] = parts[i].LocalId; | 4888 | localids[i] = parts[i].LocalId; |
4889 | 4889 | ||
4890 | for (int ctr = 0; ctr < localids.Length; ctr++) | 4890 | for (int ctr = 0; ctr < localids.Length; ctr++) |
4891 | { | 4891 | { |
4892 | foreach (uint target in atTargets.Keys) | 4892 | foreach (uint target in atTargets.Keys) |
@@ -4896,10 +4896,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
4896 | localids[ctr], att.handle, att.targetPos, m_rootPart.GroupPosition); | 4896 | localids[ctr], att.handle, att.targetPos, m_rootPart.GroupPosition); |
4897 | } | 4897 | } |
4898 | } | 4898 | } |
4899 | 4899 | ||
4900 | return; | 4900 | return; |
4901 | } | 4901 | } |
4902 | 4902 | ||
4903 | if (m_scriptListens_notAtTarget && !at_target) | 4903 | if (m_scriptListens_notAtTarget && !at_target) |
4904 | { | 4904 | { |
4905 | //trigger not_at_target | 4905 | //trigger not_at_target |
@@ -4907,7 +4907,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4907 | uint[] localids = new uint[parts.Length]; | 4907 | uint[] localids = new uint[parts.Length]; |
4908 | for (int i = 0; i < parts.Length; i++) | 4908 | for (int i = 0; i < parts.Length; i++) |
4909 | localids[i] = parts[i].LocalId; | 4909 | localids[i] = parts[i].LocalId; |
4910 | 4910 | ||
4911 | for (int ctr = 0; ctr < localids.Length; ctr++) | 4911 | for (int ctr = 0; ctr < localids.Length; ctr++) |
4912 | { | 4912 | { |
4913 | m_scene.EventManager.TriggerNotAtTargetEvent(localids[ctr]); | 4913 | m_scene.EventManager.TriggerNotAtTargetEvent(localids[ctr]); |
@@ -4994,7 +4994,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4994 | // http://wiki.secondlife.com/wiki/llGetGeometricCenter | 4994 | // http://wiki.secondlife.com/wiki/llGetGeometricCenter |
4995 | // ignoring tortured prims details since sl also seems to ignore | 4995 | // ignoring tortured prims details since sl also seems to ignore |
4996 | // so no real use in doing it on physics | 4996 | // so no real use in doing it on physics |
4997 | 4997 | ||
4998 | Vector3 gc = Vector3.Zero; | 4998 | Vector3 gc = Vector3.Zero; |
4999 | 4999 | ||
5000 | SceneObjectPart[] parts = m_parts.GetArray(); | 5000 | SceneObjectPart[] parts = m_parts.GetArray(); |
@@ -5034,7 +5034,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5034 | Vector3 tmp = pa.CenterOfMass; | 5034 | Vector3 tmp = pa.CenterOfMass; |
5035 | return tmp; | 5035 | return tmp; |
5036 | } | 5036 | } |
5037 | 5037 | ||
5038 | Vector3 Ptot = Vector3.Zero; | 5038 | Vector3 Ptot = Vector3.Zero; |
5039 | float totmass = 0f; | 5039 | float totmass = 0f; |
5040 | float m; | 5040 | float m; |
@@ -5072,7 +5072,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5072 | } | 5072 | } |
5073 | 5073 | ||
5074 | HasGroupChanged = true; | 5074 | HasGroupChanged = true; |
5075 | 5075 | ||
5076 | // Don't trigger the update here - otherwise some client issues occur when multiple updates are scheduled | 5076 | // Don't trigger the update here - otherwise some client issues occur when multiple updates are scheduled |
5077 | // for the same object with very different properties. The caller must schedule the update. | 5077 | // for the same object with very different properties. The caller must schedule the update. |
5078 | //ScheduleGroupForFullUpdate(); | 5078 | //ScheduleGroupForFullUpdate(); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index b95b5be..b97cceb 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -134,7 +134,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
134 | ); | 134 | ); |
135 | private const scriptEvents PhyscicsVolumeDtcSubsEvents = ( | 135 | private const scriptEvents PhyscicsVolumeDtcSubsEvents = ( |
136 | scriptEvents.collision_start | scriptEvents.collision_end | 136 | scriptEvents.collision_start | scriptEvents.collision_end |
137 | ); | 137 | ); |
138 | 138 | ||
139 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 139 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
140 | 140 | ||
@@ -148,8 +148,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
148 | /// <summary> | 148 | /// <summary> |
149 | /// Dynamic objects that can be created and deleted as required. | 149 | /// Dynamic objects that can be created and deleted as required. |
150 | /// </summary> | 150 | /// </summary> |
151 | public DOMap DynObjs | 151 | public DOMap DynObjs |
152 | { | 152 | { |
153 | get | 153 | get |
154 | { | 154 | { |
155 | if (m_dynObjs == null) | 155 | if (m_dynObjs == null) |
@@ -163,16 +163,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
163 | m_dynObjs = value; | 163 | m_dynObjs = value; |
164 | } | 164 | } |
165 | } | 165 | } |
166 | 166 | ||
167 | /// <value> | 167 | /// <value> |
168 | /// Is this a root part? | 168 | /// Is this a root part? |
169 | /// </value> | 169 | /// </value> |
170 | /// <remarks> | 170 | /// <remarks> |
171 | /// This will return true even if the whole object is attached to an avatar. | 171 | /// This will return true even if the whole object is attached to an avatar. |
172 | /// </remarks> | 172 | /// </remarks> |
173 | public bool IsRoot | 173 | public bool IsRoot |
174 | { | 174 | { |
175 | get { return Object.ReferenceEquals(ParentGroup.RootPart, this); } | 175 | get { return Object.ReferenceEquals(ParentGroup.RootPart, this); } |
176 | } | 176 | } |
177 | 177 | ||
178 | /// <summary> | 178 | /// <summary> |
@@ -192,11 +192,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
192 | #region Fields | 192 | #region Fields |
193 | 193 | ||
194 | public bool AllowedDrop; | 194 | public bool AllowedDrop; |
195 | 195 | ||
196 | public bool DIE_AT_EDGE; | 196 | public bool DIE_AT_EDGE; |
197 | 197 | ||
198 | public bool RETURN_AT_EDGE; | 198 | public bool RETURN_AT_EDGE; |
199 | 199 | ||
200 | public bool BlockGrab { get; set; } | 200 | public bool BlockGrab { get; set; } |
201 | 201 | ||
202 | public bool StatusSandbox; | 202 | public bool StatusSandbox; |
@@ -221,7 +221,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
221 | // Note: This isn't persisted in the database right now, as the fields for that aren't just there yet. | 221 | // Note: This isn't persisted in the database right now, as the fields for that aren't just there yet. |
222 | // Not a big problem as long as the script that sets it remains in the prim on startup. | 222 | // Not a big problem as long as the script that sets it remains in the prim on startup. |
223 | // for SL compatibility it should be persisted though (set sound / displaytext / particlesystem, kill script) | 223 | // for SL compatibility it should be persisted though (set sound / displaytext / particlesystem, kill script) |
224 | 224 | ||
225 | public UUID Sound; | 225 | public UUID Sound; |
226 | 226 | ||
227 | public byte SoundFlags; | 227 | public byte SoundFlags; |
@@ -254,7 +254,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
254 | 254 | ||
255 | [XmlIgnore] | 255 | [XmlIgnore] |
256 | public int STATUS_ROTATE_X; // this should not be used | 256 | public int STATUS_ROTATE_X; // this should not be used |
257 | 257 | ||
258 | [XmlIgnore] | 258 | [XmlIgnore] |
259 | public int STATUS_ROTATE_Y; // this should not be used | 259 | public int STATUS_ROTATE_Y; // this should not be used |
260 | 260 | ||
@@ -262,13 +262,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
262 | public int STATUS_ROTATE_Z; // this should not be used | 262 | public int STATUS_ROTATE_Z; // this should not be used |
263 | 263 | ||
264 | private Dictionary<int, string> m_CollisionFilter = new Dictionary<int, string>(); | 264 | private Dictionary<int, string> m_CollisionFilter = new Dictionary<int, string>(); |
265 | 265 | ||
266 | /// <value> | 266 | /// <value> |
267 | /// The UUID of the user inventory item from which this object was rezzed if this is a root part. | 267 | /// The UUID of the user inventory item from which this object was rezzed if this is a root part. |
268 | /// If UUID.Zero then either this is not a root part or there is no connection with a user inventory item. | 268 | /// If UUID.Zero then either this is not a root part or there is no connection with a user inventory item. |
269 | /// </value> | 269 | /// </value> |
270 | private UUID m_fromUserInventoryItemID; | 270 | private UUID m_fromUserInventoryItemID; |
271 | 271 | ||
272 | public UUID FromUserInventoryItemID | 272 | public UUID FromUserInventoryItemID |
273 | { | 273 | { |
274 | get { return m_fromUserInventoryItemID; } | 274 | get { return m_fromUserInventoryItemID; } |
@@ -289,7 +289,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
289 | 289 | ||
290 | public bool VolumeDetectActive | 290 | public bool VolumeDetectActive |
291 | { | 291 | { |
292 | get | 292 | get |
293 | { | 293 | { |
294 | return (Flags & (PrimFlags)primFlagVolumeDetect) != 0; | 294 | return (Flags & (PrimFlags)primFlagVolumeDetect) != 0; |
295 | } | 295 | } |
@@ -313,7 +313,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
313 | 313 | ||
314 | /// <summary> | 314 | /// <summary> |
315 | /// This part's inventory | 315 | /// This part's inventory |
316 | /// </summary> | 316 | /// </summary> |
317 | public IEntityInventory Inventory | 317 | public IEntityInventory Inventory |
318 | { | 318 | { |
319 | get { return m_inventory; } | 319 | get { return m_inventory; } |
@@ -321,20 +321,20 @@ namespace OpenSim.Region.Framework.Scenes | |||
321 | protected SceneObjectPartInventory m_inventory; | 321 | protected SceneObjectPartInventory m_inventory; |
322 | 322 | ||
323 | public bool Undoing; | 323 | public bool Undoing; |
324 | 324 | ||
325 | public bool IgnoreUndoUpdate = false; | 325 | public bool IgnoreUndoUpdate = false; |
326 | 326 | ||
327 | public PrimFlags LocalFlags; | 327 | public PrimFlags LocalFlags; |
328 | 328 | ||
329 | private float m_damage = -1.0f; | 329 | private float m_damage = -1.0f; |
330 | private byte[] m_TextureAnimation; | 330 | private byte[] m_TextureAnimation; |
331 | private byte m_clickAction; | 331 | private byte m_clickAction; |
332 | private Color m_color = Color.Black; | 332 | private Color m_color = Color.Black; |
333 | private readonly List<uint> m_lastColliders = new List<uint>(); | 333 | private readonly List<uint> m_lastColliders = new List<uint>(); |
334 | private int m_linkNum; | 334 | private int m_linkNum; |
335 | 335 | ||
336 | private int m_scriptAccessPin; | 336 | private int m_scriptAccessPin; |
337 | 337 | ||
338 | private readonly Dictionary<UUID, scriptEvents> m_scriptEvents = new Dictionary<UUID, scriptEvents>(); | 338 | private readonly Dictionary<UUID, scriptEvents> m_scriptEvents = new Dictionary<UUID, scriptEvents>(); |
339 | private string m_sitName = String.Empty; | 339 | private string m_sitName = String.Empty; |
340 | private Quaternion m_sitTargetOrientation = Quaternion.Identity; | 340 | private Quaternion m_sitTargetOrientation = Quaternion.Identity; |
@@ -403,7 +403,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
403 | private UUID m_collisionSound; | 403 | private UUID m_collisionSound; |
404 | private float m_collisionSoundVolume; | 404 | private float m_collisionSoundVolume; |
405 | 405 | ||
406 | private int LastColSoundSentTime; | 406 | private int LastColSoundSentTime; |
407 | 407 | ||
408 | private SOPVehicle m_vehicleParams = null; | 408 | private SOPVehicle m_vehicleParams = null; |
409 | 409 | ||
@@ -454,7 +454,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
454 | /// <param name="rotationOffset"></param> | 454 | /// <param name="rotationOffset"></param> |
455 | /// <param name="offsetPosition"></param> | 455 | /// <param name="offsetPosition"></param> |
456 | public SceneObjectPart( | 456 | public SceneObjectPart( |
457 | UUID ownerID, PrimitiveBaseShape shape, Vector3 groupPosition, | 457 | UUID ownerID, PrimitiveBaseShape shape, Vector3 groupPosition, |
458 | Quaternion rotationOffset, Vector3 offsetPosition) : this() | 458 | Quaternion rotationOffset, Vector3 offsetPosition) : this() |
459 | { | 459 | { |
460 | m_name = "Object"; | 460 | m_name = "Object"; |
@@ -505,7 +505,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
505 | private bool m_createSelected = false; | 505 | private bool m_createSelected = false; |
506 | 506 | ||
507 | private UUID _creatorID; | 507 | private UUID _creatorID; |
508 | public UUID CreatorID | 508 | public UUID CreatorID |
509 | { | 509 | { |
510 | get { return _creatorID; } | 510 | get { return _creatorID; } |
511 | set { _creatorID = value; } | 511 | set { _creatorID = value; } |
@@ -515,7 +515,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
515 | /// <summary> | 515 | /// <summary> |
516 | /// Data about the creator in the form home_url;name | 516 | /// Data about the creator in the form home_url;name |
517 | /// </summary> | 517 | /// </summary> |
518 | public string CreatorData | 518 | public string CreatorData |
519 | { | 519 | { |
520 | get { return m_creatorData; } | 520 | get { return m_creatorData; } |
521 | set { m_creatorData = value; } | 521 | set { m_creatorData = value; } |
@@ -565,7 +565,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
565 | } | 565 | } |
566 | 566 | ||
567 | /// <summary> | 567 | /// <summary> |
568 | /// A relic from when we we thought that prims contained folder objects. In | 568 | /// A relic from when we we thought that prims contained folder objects. In |
569 | /// reality, prim == folder | 569 | /// reality, prim == folder |
570 | /// Exposing this is not particularly good, but it's one of the least evils at the moment to see | 570 | /// Exposing this is not particularly good, but it's one of the least evils at the moment to see |
571 | /// folder id from prim inventory item data, since it's not (yet) actually stored with the prim. | 571 | /// folder id from prim inventory item data, since it's not (yet) actually stored with the prim. |
@@ -611,10 +611,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
611 | public UUID UUID | 611 | public UUID UUID |
612 | { | 612 | { |
613 | get { return m_uuid; } | 613 | get { return m_uuid; } |
614 | set | 614 | set |
615 | { | 615 | { |
616 | m_uuid = value; | 616 | m_uuid = value; |
617 | 617 | ||
618 | // This is necessary so that TaskInventoryItem parent ids correctly reference the new uuid of this part | 618 | // This is necessary so that TaskInventoryItem parent ids correctly reference the new uuid of this part |
619 | if (Inventory != null) | 619 | if (Inventory != null) |
620 | Inventory.ResetObjectID(); | 620 | Inventory.ResetObjectID(); |
@@ -634,8 +634,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
634 | public virtual string Name | 634 | public virtual string Name |
635 | { | 635 | { |
636 | get { return m_name; } | 636 | get { return m_name; } |
637 | set | 637 | set |
638 | { | 638 | { |
639 | m_name = value; | 639 | m_name = value; |
640 | 640 | ||
641 | PhysicsActor pa = PhysActor; | 641 | PhysicsActor pa = PhysActor; |
@@ -678,11 +678,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
678 | m_isSelected = value; | 678 | m_isSelected = value; |
679 | if (ParentGroup != null) | 679 | if (ParentGroup != null) |
680 | ParentGroup.PartSelectChanged(value); | 680 | ParentGroup.PartSelectChanged(value); |
681 | 681 | ||
682 | } | 682 | } |
683 | } | 683 | } |
684 | 684 | ||
685 | 685 | ||
686 | public Dictionary<int, string> CollisionFilter | 686 | public Dictionary<int, string> CollisionFilter |
687 | { | 687 | { |
688 | get { return m_CollisionFilter; } | 688 | get { return m_CollisionFilter; } |
@@ -704,14 +704,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
704 | set { m_APIDTarget = value; } | 704 | set { m_APIDTarget = value; } |
705 | } | 705 | } |
706 | 706 | ||
707 | 707 | ||
708 | protected float APIDDamp | 708 | protected float APIDDamp |
709 | { | 709 | { |
710 | get { return m_APIDDamp; } | 710 | get { return m_APIDDamp; } |
711 | set { m_APIDDamp = value; } | 711 | set { m_APIDDamp = value; } |
712 | } | 712 | } |
713 | 713 | ||
714 | 714 | ||
715 | protected float APIDStrength | 715 | protected float APIDStrength |
716 | { | 716 | { |
717 | get { return m_APIDStrength; } | 717 | get { return m_APIDStrength; } |
@@ -769,21 +769,21 @@ namespace OpenSim.Region.Framework.Scenes | |||
769 | set { m_particleSystem = value; } | 769 | set { m_particleSystem = value; } |
770 | } | 770 | } |
771 | 771 | ||
772 | 772 | ||
773 | public DateTime Expires | 773 | public DateTime Expires |
774 | { | 774 | { |
775 | get { return m_expires; } | 775 | get { return m_expires; } |
776 | set { m_expires = value; } | 776 | set { m_expires = value; } |
777 | } | 777 | } |
778 | 778 | ||
779 | 779 | ||
780 | public DateTime Rezzed | 780 | public DateTime Rezzed |
781 | { | 781 | { |
782 | get { return m_rezzed; } | 782 | get { return m_rezzed; } |
783 | set { m_rezzed = value; } | 783 | set { m_rezzed = value; } |
784 | } | 784 | } |
785 | 785 | ||
786 | 786 | ||
787 | public float Damage | 787 | public float Damage |
788 | { | 788 | { |
789 | get { return m_damage; } | 789 | get { return m_damage; } |
@@ -798,7 +798,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
798 | /// <summary> | 798 | /// <summary> |
799 | /// The position of the entire group that this prim belongs to. | 799 | /// The position of the entire group that this prim belongs to. |
800 | /// </summary> | 800 | /// </summary> |
801 | /// | 801 | /// |
802 | 802 | ||
803 | public Vector3 GroupPosition | 803 | public Vector3 GroupPosition |
804 | { | 804 | { |
@@ -837,7 +837,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
837 | // Root prim actually goes at Position | 837 | // Root prim actually goes at Position |
838 | if (ParentID == 0) | 838 | if (ParentID == 0) |
839 | { | 839 | { |
840 | actor.Position = value; | 840 | actor.Position = value; |
841 | } | 841 | } |
842 | else | 842 | else |
843 | { | 843 | { |
@@ -955,7 +955,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
955 | 955 | ||
956 | return m_rotationOffset; | 956 | return m_rotationOffset; |
957 | } | 957 | } |
958 | 958 | ||
959 | set | 959 | set |
960 | { | 960 | { |
961 | // StoreUndoState(); | 961 | // StoreUndoState(); |
@@ -1066,24 +1066,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
1066 | if ((actor != null) && actor.IsPhysical && ParentGroup.RootPart == this && VehicleType == (int)Vehicle.TYPE_NONE) | 1066 | if ((actor != null) && actor.IsPhysical && ParentGroup.RootPart == this && VehicleType == (int)Vehicle.TYPE_NONE) |
1067 | { | 1067 | { |
1068 | actor.RotationalVelocity = m_angularVelocity; | 1068 | actor.RotationalVelocity = m_angularVelocity; |
1069 | } | 1069 | } |
1070 | } | 1070 | } |
1071 | } | 1071 | } |
1072 | 1072 | ||
1073 | /// <summary></summary> | 1073 | /// <summary></summary> |
1074 | public Vector3 Acceleration | 1074 | public Vector3 Acceleration |
1075 | { | 1075 | { |
1076 | get | 1076 | get |
1077 | { | 1077 | { |
1078 | PhysicsActor actor = PhysActor; | 1078 | PhysicsActor actor = PhysActor; |
1079 | if (actor != null) | 1079 | if (actor != null) |
1080 | { | 1080 | { |
1081 | m_acceleration = actor.Acceleration; | 1081 | m_acceleration = actor.Acceleration; |
1082 | } | 1082 | } |
1083 | return m_acceleration; | 1083 | return m_acceleration; |
1084 | } | 1084 | } |
1085 | 1085 | ||
1086 | set | 1086 | set |
1087 | { | 1087 | { |
1088 | if (Util.IsNanOrInfinity(value)) | 1088 | if (Util.IsNanOrInfinity(value)) |
1089 | m_acceleration = Vector3.Zero; | 1089 | m_acceleration = Vector3.Zero; |
@@ -1217,23 +1217,23 @@ namespace OpenSim.Region.Framework.Scenes | |||
1217 | else | 1217 | else |
1218 | b = sz; | 1218 | b = sz; |
1219 | } | 1219 | } |
1220 | 1220 | ||
1221 | return a * b; | 1221 | return a * b; |
1222 | } | 1222 | } |
1223 | 1223 | ||
1224 | public UpdateRequired UpdateFlag { get; set; } | 1224 | public UpdateRequired UpdateFlag { get; set; } |
1225 | 1225 | ||
1226 | /// <summary> | 1226 | /// <summary> |
1227 | /// Used for media on a prim. | 1227 | /// Used for media on a prim. |
1228 | /// </summary> | 1228 | /// </summary> |
1229 | /// Do not change this value directly - always do it through an IMoapModule. | 1229 | /// Do not change this value directly - always do it through an IMoapModule. |
1230 | public string MediaUrl | 1230 | public string MediaUrl |
1231 | { | 1231 | { |
1232 | get | 1232 | get |
1233 | { | 1233 | { |
1234 | return m_mediaUrl; | 1234 | return m_mediaUrl; |
1235 | } | 1235 | } |
1236 | 1236 | ||
1237 | set | 1237 | set |
1238 | { | 1238 | { |
1239 | m_mediaUrl = value; | 1239 | m_mediaUrl = value; |
@@ -1246,10 +1246,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
1246 | public bool CreateSelected | 1246 | public bool CreateSelected |
1247 | { | 1247 | { |
1248 | get { return m_createSelected; } | 1248 | get { return m_createSelected; } |
1249 | set | 1249 | set |
1250 | { | 1250 | { |
1251 | // m_log.DebugFormat("[SOP]: Setting CreateSelected to {0} for {1} {2}", value, Name, UUID); | 1251 | // m_log.DebugFormat("[SOP]: Setting CreateSelected to {0} for {1} {2}", value, Name, UUID); |
1252 | m_createSelected = value; | 1252 | m_createSelected = value; |
1253 | } | 1253 | } |
1254 | } | 1254 | } |
1255 | 1255 | ||
@@ -1423,7 +1423,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1423 | } | 1423 | } |
1424 | 1424 | ||
1425 | /// <summary> | 1425 | /// <summary> |
1426 | /// Property flags. See OpenMetaverse.PrimFlags | 1426 | /// Property flags. See OpenMetaverse.PrimFlags |
1427 | /// </summary> | 1427 | /// </summary> |
1428 | /// <remarks> | 1428 | /// <remarks> |
1429 | /// Example properties are PrimFlags.Phantom and PrimFlags.DieAtEdge | 1429 | /// Example properties are PrimFlags.Phantom and PrimFlags.DieAtEdge |
@@ -1431,18 +1431,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
1431 | public PrimFlags Flags | 1431 | public PrimFlags Flags |
1432 | { | 1432 | { |
1433 | get { return _flags; } | 1433 | get { return _flags; } |
1434 | set | 1434 | set |
1435 | { | 1435 | { |
1436 | // m_log.DebugFormat("[SOP]: Setting flags for {0} {1} to {2}", UUID, Name, value); | 1436 | // m_log.DebugFormat("[SOP]: Setting flags for {0} {1} to {2}", UUID, Name, value); |
1437 | _flags = value; | 1437 | _flags = value; |
1438 | } | 1438 | } |
1439 | } | 1439 | } |
1440 | 1440 | ||
1441 | [XmlIgnore] | 1441 | [XmlIgnore] |
1442 | public bool IsOccupied // KF If an av is sittingon this prim | 1442 | public bool IsOccupied // KF If an av is sittingon this prim |
1443 | { | 1443 | { |
1444 | get { return m_occupied; } | 1444 | get { return m_occupied; } |
1445 | set { m_occupied = value; } | 1445 | set { m_occupied = value; } |
1446 | } | 1446 | } |
1447 | 1447 | ||
1448 | /// <summary> | 1448 | /// <summary> |
@@ -1474,7 +1474,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1474 | } | 1474 | } |
1475 | 1475 | ||
1476 | private UUID _parentUUID = UUID.Zero; | 1476 | private UUID _parentUUID = UUID.Zero; |
1477 | 1477 | ||
1478 | public UUID ParentUUID | 1478 | public UUID ParentUUID |
1479 | { | 1479 | { |
1480 | get | 1480 | get |
@@ -1487,7 +1487,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1487 | 1487 | ||
1488 | set { _parentUUID = value; } | 1488 | set { _parentUUID = value; } |
1489 | } | 1489 | } |
1490 | 1490 | ||
1491 | public string SitAnimation | 1491 | public string SitAnimation |
1492 | { | 1492 | { |
1493 | get { return m_sitAnimation; } | 1493 | get { return m_sitAnimation; } |
@@ -1519,7 +1519,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1519 | { | 1519 | { |
1520 | get { return m_collisionSound; } | 1520 | get { return m_collisionSound; } |
1521 | set | 1521 | set |
1522 | { | 1522 | { |
1523 | m_collisionSound = value; | 1523 | m_collisionSound = value; |
1524 | 1524 | ||
1525 | if (value == invalidCollisionSoundUUID) | 1525 | if (value == invalidCollisionSoundUUID) |
@@ -1589,7 +1589,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1589 | { | 1589 | { |
1590 | if (ParentGroup.RootPart == this) | 1590 | if (ParentGroup.RootPart == this) |
1591 | return m_torque; | 1591 | return m_torque; |
1592 | 1592 | ||
1593 | return ParentGroup.RootPart.Torque; | 1593 | return ParentGroup.RootPart.Torque; |
1594 | } | 1594 | } |
1595 | 1595 | ||
@@ -1733,7 +1733,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1733 | set | 1733 | set |
1734 | { | 1734 | { |
1735 | byte oldv = m_physicsShapeType; | 1735 | byte oldv = m_physicsShapeType; |
1736 | 1736 | ||
1737 | if (value >= 0 && value <= (byte)PhysShapeType.convex) | 1737 | if (value >= 0 && value <= (byte)PhysShapeType.convex) |
1738 | { | 1738 | { |
1739 | if (value == (byte)PhysShapeType.none && ParentGroup != null && ParentGroup.RootPart == this) | 1739 | if (value == (byte)PhysShapeType.none && ParentGroup != null && ParentGroup.RootPart == this) |
@@ -1966,7 +1966,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1966 | Utils.FloatToBytes(pTexAnim.Start).CopyTo(data, pos); | 1966 | Utils.FloatToBytes(pTexAnim.Start).CopyTo(data, pos); |
1967 | Utils.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4); | 1967 | Utils.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4); |
1968 | Utils.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8); | 1968 | Utils.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8); |
1969 | 1969 | ||
1970 | } | 1970 | } |
1971 | m_TextureAnimation = data; | 1971 | m_TextureAnimation = data; |
1972 | } | 1972 | } |
@@ -2063,7 +2063,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2063 | 2063 | ||
2064 | root.AngularVelocity = pAngVel; | 2064 | root.AngularVelocity = pAngVel; |
2065 | } | 2065 | } |
2066 | 2066 | ||
2067 | 2067 | ||
2068 | /// <summary> | 2068 | /// <summary> |
2069 | /// hook to the physics scene to apply angular impulse | 2069 | /// hook to the physics scene to apply angular impulse |
@@ -2095,7 +2095,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2095 | /// </summary> | 2095 | /// </summary> |
2096 | /// <param name="impulsei">Vector force</param> | 2096 | /// <param name="impulsei">Vector force</param> |
2097 | /// <param name="localGlobalTF">true for the local frame, false for the global frame</param> | 2097 | /// <param name="localGlobalTF">true for the local frame, false for the global frame</param> |
2098 | 2098 | ||
2099 | // this is actualy Set Torque.. keeping naming so not to edit lslapi also | 2099 | // this is actualy Set Torque.. keeping naming so not to edit lslapi also |
2100 | public void SetAngularImpulse(Vector3 torquei, bool localGlobalTF) | 2100 | public void SetAngularImpulse(Vector3 torquei, bool localGlobalTF) |
2101 | { | 2101 | { |
@@ -2116,7 +2116,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2116 | /// <param name="VolumeDetectActive"></param> | 2116 | /// <param name="VolumeDetectActive"></param> |
2117 | /// <param name="building"></param> | 2117 | /// <param name="building"></param> |
2118 | 2118 | ||
2119 | public void ApplyPhysics(uint _ObjectFlags, bool _VolumeDetectActive, bool building) | 2119 | public void ApplyPhysics(uint _ObjectFlags, bool _VolumeDetectActive, bool building) |
2120 | { | 2120 | { |
2121 | VolumeDetectActive = _VolumeDetectActive; | 2121 | VolumeDetectActive = _VolumeDetectActive; |
2122 | 2122 | ||
@@ -2177,7 +2177,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2177 | /// <returns></returns> | 2177 | /// <returns></returns> |
2178 | public SceneObjectPart Copy(uint plocalID, UUID AgentID, UUID GroupID, int linkNum, bool userExposed) | 2178 | public SceneObjectPart Copy(uint plocalID, UUID AgentID, UUID GroupID, int linkNum, bool userExposed) |
2179 | { | 2179 | { |
2180 | // FIXME: This is dangerous since it's easy to forget to reset some references when necessary and end up | 2180 | // FIXME: This is dangerous since it's easy to forget to reset some references when necessary and end up |
2181 | // with bugs that only occur in some circumstances (e.g. crossing between regions on the same simulator | 2181 | // with bugs that only occur in some circumstances (e.g. crossing between regions on the same simulator |
2182 | // but not between regions on different simulators). Really, all copying should be done explicitly. | 2182 | // but not between regions on different simulators). Really, all copying should be done explicitly. |
2183 | SceneObjectPart dupe = (SceneObjectPart)MemberwiseClone(); | 2183 | SceneObjectPart dupe = (SceneObjectPart)MemberwiseClone(); |
@@ -2242,20 +2242,20 @@ namespace OpenSim.Region.Framework.Scenes | |||
2242 | dupe.PayPrice = (int[])PayPrice.Clone(); | 2242 | dupe.PayPrice = (int[])PayPrice.Clone(); |
2243 | 2243 | ||
2244 | dupe.DynAttrs.CopyFrom(DynAttrs); | 2244 | dupe.DynAttrs.CopyFrom(DynAttrs); |
2245 | 2245 | ||
2246 | if (userExposed) | 2246 | if (userExposed) |
2247 | { | 2247 | { |
2248 | bool UsePhysics = ((dupe.Flags & PrimFlags.Physics) != 0); | 2248 | bool UsePhysics = ((dupe.Flags & PrimFlags.Physics) != 0); |
2249 | dupe.DoPhysicsPropertyUpdate(UsePhysics, true); | 2249 | dupe.DoPhysicsPropertyUpdate(UsePhysics, true); |
2250 | } | 2250 | } |
2251 | 2251 | ||
2252 | if (dupe.PhysActor != null) | 2252 | if (dupe.PhysActor != null) |
2253 | dupe.PhysActor.LocalID = plocalID; | 2253 | dupe.PhysActor.LocalID = plocalID; |
2254 | 2254 | ||
2255 | ParentGroup.Scene.EventManager.TriggerOnSceneObjectPartCopy(dupe, this, userExposed); | 2255 | ParentGroup.Scene.EventManager.TriggerOnSceneObjectPartCopy(dupe, this, userExposed); |
2256 | 2256 | ||
2257 | // m_log.DebugFormat("[SCENE OBJECT PART]: Clone of {0} {1} finished", Name, UUID); | 2257 | // m_log.DebugFormat("[SCENE OBJECT PART]: Clone of {0} {1} finished", Name, UUID); |
2258 | 2258 | ||
2259 | return dupe; | 2259 | return dupe; |
2260 | } | 2260 | } |
2261 | 2261 | ||
@@ -2428,7 +2428,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2428 | pa.link(parentPa); | 2428 | pa.link(parentPa); |
2429 | } | 2429 | } |
2430 | } | 2430 | } |
2431 | } | 2431 | } |
2432 | } | 2432 | } |
2433 | 2433 | ||
2434 | bool phan = ((Flags & PrimFlags.Phantom) != 0); | 2434 | bool phan = ((Flags & PrimFlags.Phantom) != 0); |
@@ -2528,7 +2528,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2528 | 2528 | ||
2529 | public uint GetEffectiveObjectFlags() | 2529 | public uint GetEffectiveObjectFlags() |
2530 | { | 2530 | { |
2531 | // Commenting this section of code out since it doesn't actually do anything, as enums are handled by | 2531 | // Commenting this section of code out since it doesn't actually do anything, as enums are handled by |
2532 | // value rather than reference | 2532 | // value rather than reference |
2533 | // PrimFlags f = _flags; | 2533 | // PrimFlags f = _flags; |
2534 | // if (m_parentGroup == null || m_parentGroup.RootPart == this) | 2534 | // if (m_parentGroup == null || m_parentGroup.RootPart == this) |
@@ -2820,7 +2820,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2820 | 2820 | ||
2821 | ColliderArgs LandCollidingMessage = new ColliderArgs(); | 2821 | ColliderArgs LandCollidingMessage = new ColliderArgs(); |
2822 | List<DetectedObject> colliding = new List<DetectedObject>(); | 2822 | List<DetectedObject> colliding = new List<DetectedObject>(); |
2823 | 2823 | ||
2824 | colliding.Add(CreateDetObjectForGround()); | 2824 | colliding.Add(CreateDetObjectForGround()); |
2825 | LandCollidingMessage.Colliders = colliding; | 2825 | LandCollidingMessage.Colliders = colliding; |
2826 | 2826 | ||
@@ -2969,9 +2969,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2969 | // Note: This is only being called on the root prim at this time. | 2969 | // Note: This is only being called on the root prim at this time. |
2970 | 2970 | ||
2971 | m_log.ErrorFormat( | 2971 | m_log.ErrorFormat( |
2972 | "[SCENE OBJECT PART]: Physical object {0}, localID {1} went out of bounds at {2} in {3}. Stopping at {4} and making non-physical.", | 2972 | "[SCENE OBJECT PART]: Physical object {0}, localID {1} went out of bounds at {2} in {3}. Stopping at {4} and making non-physical.", |
2973 | Name, LocalId, pos, ParentGroup.Scene.Name, AbsolutePosition); | 2973 | Name, LocalId, pos, ParentGroup.Scene.Name, AbsolutePosition); |
2974 | 2974 | ||
2975 | RemFlag(PrimFlags.Physics); | 2975 | RemFlag(PrimFlags.Physics); |
2976 | DoPhysicsPropertyUpdate(false, true); | 2976 | DoPhysicsPropertyUpdate(false, true); |
2977 | } | 2977 | } |
@@ -3026,7 +3026,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3026 | //m_log.Debug("prev: " + prevflag.ToString() + " curr: " + Flags.ToString()); | 3026 | //m_log.Debug("prev: " + prevflag.ToString() + " curr: " + Flags.ToString()); |
3027 | //ScheduleFullUpdate(); | 3027 | //ScheduleFullUpdate(); |
3028 | } | 3028 | } |
3029 | 3029 | ||
3030 | public void RemoveScriptEvents(UUID scriptid) | 3030 | public void RemoveScriptEvents(UUID scriptid) |
3031 | { | 3031 | { |
3032 | lock (m_scriptEvents) | 3032 | lock (m_scriptEvents) |
@@ -3089,7 +3089,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3089 | ParentGroup.HasGroupChanged = true; | 3089 | ParentGroup.HasGroupChanged = true; |
3090 | ScheduleFullUpdate(); | 3090 | ScheduleFullUpdate(); |
3091 | } | 3091 | } |
3092 | 3092 | ||
3093 | public void RotLookAt(Quaternion target, float strength, float damping) | 3093 | public void RotLookAt(Quaternion target, float strength, float damping) |
3094 | { | 3094 | { |
3095 | if(ParentGroup.IsDeleted) | 3095 | if(ParentGroup.IsDeleted) |
@@ -3115,7 +3115,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3115 | m_log.WarnFormat("[SceneObjectPart] Invalid rotation strength {0}",APIDStrength); | 3115 | m_log.WarnFormat("[SceneObjectPart] Invalid rotation strength {0}",APIDStrength); |
3116 | return; | 3116 | return; |
3117 | } | 3117 | } |
3118 | 3118 | ||
3119 | APIDActive = true; | 3119 | APIDActive = true; |
3120 | 3120 | ||
3121 | // Necessary to get the lookat deltas applied | 3121 | // Necessary to get the lookat deltas applied |
@@ -3357,7 +3357,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
3357 | // sl Does send them | 3357 | // sl Does send them |
3358 | // if (ParentGroup.IsSelected && ParentGroup.IsAttachment) | 3358 | // if (ParentGroup.IsSelected && ParentGroup.IsAttachment) |
3359 | // return; | 3359 | // return; |
3360 | 3360 | ||
3361 | if (ParentGroup.IsDeleted) | 3361 | if (ParentGroup.IsDeleted) |
3362 | return; | 3362 | return; |
3363 | 3363 | ||
@@ -3487,7 +3487,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
3487 | public void SetBuoyancy(float fvalue) | 3487 | public void SetBuoyancy(float fvalue) |
3488 | { | 3488 | { |
3489 | Buoyancy = fvalue; | 3489 | Buoyancy = fvalue; |
3490 | /* | 3490 | /* |
3491 | if (PhysActor != null) | 3491 | if (PhysActor != null) |
3492 | { | 3492 | { |
3493 | PhysActor.Buoyancy = fvalue; | 3493 | PhysActor.Buoyancy = fvalue; |
@@ -3547,7 +3547,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
3547 | public void SetVehicleType(int type) | 3547 | public void SetVehicleType(int type) |
3548 | { | 3548 | { |
3549 | m_vehicleParams = null; | 3549 | m_vehicleParams = null; |
3550 | 3550 | ||
3551 | if (type == (int)Vehicle.TYPE_NONE) | 3551 | if (type == (int)Vehicle.TYPE_NONE) |
3552 | { | 3552 | { |
3553 | if (_parentID ==0 && PhysActor != null) | 3553 | if (_parentID ==0 && PhysActor != null) |
@@ -3754,7 +3754,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
3754 | { | 3754 | { |
3755 | if (Shape.SculptEntry) | 3755 | if (Shape.SculptEntry) |
3756 | return PrimType.SCULPT; | 3756 | return PrimType.SCULPT; |
3757 | 3757 | ||
3758 | if ((Shape.ProfileCurve & 0x07) == (byte)ProfileShape.Square) | 3758 | if ((Shape.ProfileCurve & 0x07) == (byte)ProfileShape.Square) |
3759 | { | 3759 | { |
3760 | if (Shape.PathCurve == (byte)Extrusion.Straight) | 3760 | if (Shape.PathCurve == (byte)Extrusion.Straight) |
@@ -3782,12 +3782,12 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
3782 | else if (Shape.PathCurve == (byte)Extrusion.Curve1) | 3782 | else if (Shape.PathCurve == (byte)Extrusion.Curve1) |
3783 | return PrimType.RING; | 3783 | return PrimType.RING; |
3784 | } | 3784 | } |
3785 | 3785 | ||
3786 | return PrimType.BOX; | 3786 | return PrimType.BOX; |
3787 | } | 3787 | } |
3788 | 3788 | ||
3789 | /// <summary> | 3789 | /// <summary> |
3790 | /// Tell us if this object has cut, hollow, dimple, and other factors affecting the number of faces | 3790 | /// Tell us if this object has cut, hollow, dimple, and other factors affecting the number of faces |
3791 | /// </summary> | 3791 | /// </summary> |
3792 | /// <param name="primType"></param> | 3792 | /// <param name="primType"></param> |
3793 | /// <param name="shape"></param> | 3793 | /// <param name="shape"></param> |
@@ -3812,7 +3812,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
3812 | hasDimple = (shape.ProfileBegin > 0) || (shape.ProfileEnd > 0); // taken from llSetPrimitiveParms | 3812 | hasDimple = (shape.ProfileBegin > 0) || (shape.ProfileEnd > 0); // taken from llSetPrimitiveParms |
3813 | hasProfileCut = hasDimple; // is it the same thing? | 3813 | hasProfileCut = hasDimple; // is it the same thing? |
3814 | } | 3814 | } |
3815 | 3815 | ||
3816 | public void SetGroup(UUID groupID, IClientAPI client) | 3816 | public void SetGroup(UUID groupID, IClientAPI client) |
3817 | { | 3817 | { |
3818 | // Scene.AddNewPrims() calls with client == null so can't use this. | 3818 | // Scene.AddNewPrims() calls with client == null so can't use this. |
@@ -3859,7 +3859,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
3859 | public void SetScriptEvents(UUID scriptid, int events) | 3859 | public void SetScriptEvents(UUID scriptid, int events) |
3860 | { | 3860 | { |
3861 | // m_log.DebugFormat( | 3861 | // m_log.DebugFormat( |
3862 | // "[SCENE OBJECT PART]: Set script events for script with id {0} on {1}/{2} to {3} in {4}", | 3862 | // "[SCENE OBJECT PART]: Set script events for script with id {0} on {1}/{2} to {3} in {4}", |
3863 | // scriptid, Name, ParentGroup.Name, events, ParentGroup.Scene.Name); | 3863 | // scriptid, Name, ParentGroup.Name, events, ParentGroup.Scene.Name); |
3864 | 3864 | ||
3865 | // scriptEvents oldparts; | 3865 | // scriptEvents oldparts; |
@@ -3896,7 +3896,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
3896 | ScheduleFullUpdate(); | 3896 | ScheduleFullUpdate(); |
3897 | } | 3897 | } |
3898 | } | 3898 | } |
3899 | 3899 | ||
3900 | /// <summary> | 3900 | /// <summary> |
3901 | /// Set the text displayed for this part. | 3901 | /// Set the text displayed for this part. |
3902 | /// </summary> | 3902 | /// </summary> |
@@ -4491,7 +4491,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
4491 | public bool IsHingeJoint() | 4491 | public bool IsHingeJoint() |
4492 | { | 4492 | { |
4493 | // For now, we use the NINJA naming scheme for identifying joints. | 4493 | // For now, we use the NINJA naming scheme for identifying joints. |
4494 | // In the future, we can support other joint specification schemes such as a | 4494 | // In the future, we can support other joint specification schemes such as a |
4495 | // custom checkbox in the viewer GUI. | 4495 | // custom checkbox in the viewer GUI. |
4496 | if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints) | 4496 | if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints) |
4497 | { | 4497 | { |
@@ -4507,7 +4507,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
4507 | public bool IsBallJoint() | 4507 | public bool IsBallJoint() |
4508 | { | 4508 | { |
4509 | // For now, we use the NINJA naming scheme for identifying joints. | 4509 | // For now, we use the NINJA naming scheme for identifying joints. |
4510 | // In the future, we can support other joint specification schemes such as a | 4510 | // In the future, we can support other joint specification schemes such as a |
4511 | // custom checkbox in the viewer GUI. | 4511 | // custom checkbox in the viewer GUI. |
4512 | if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints) | 4512 | if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints) |
4513 | { | 4513 | { |
@@ -4523,7 +4523,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
4523 | public bool IsJoint() | 4523 | public bool IsJoint() |
4524 | { | 4524 | { |
4525 | // For now, we use the NINJA naming scheme for identifying joints. | 4525 | // For now, we use the NINJA naming scheme for identifying joints. |
4526 | // In the future, we can support other joint specification schemes such as a | 4526 | // In the future, we can support other joint specification schemes such as a |
4527 | // custom checkbox in the viewer GUI. | 4527 | // custom checkbox in the viewer GUI. |
4528 | if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene != null && ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints) | 4528 | if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene != null && ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints) |
4529 | { | 4529 | { |
@@ -4616,8 +4616,8 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
4616 | 4616 | ||
4617 | Stop(); | 4617 | Stop(); |
4618 | } | 4618 | } |
4619 | 4619 | ||
4620 | else | 4620 | else |
4621 | { | 4621 | { |
4622 | if (ParentGroup.Scene.CollidablePrims) | 4622 | if (ParentGroup.Scene.CollidablePrims) |
4623 | { | 4623 | { |
@@ -4649,7 +4649,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
4649 | 4649 | ||
4650 | UpdatePhysicsSubscribedEvents(); | 4650 | UpdatePhysicsSubscribedEvents(); |
4651 | } | 4651 | } |
4652 | } | 4652 | } |
4653 | 4653 | ||
4654 | // and last in case we have a new actor and not building | 4654 | // and last in case we have a new actor and not building |
4655 | 4655 | ||
@@ -4658,7 +4658,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
4658 | ParentGroup.HasGroupChanged = true; | 4658 | ParentGroup.HasGroupChanged = true; |
4659 | ScheduleFullUpdate(); | 4659 | ScheduleFullUpdate(); |
4660 | } | 4660 | } |
4661 | 4661 | ||
4662 | // m_log.DebugFormat("[SCENE OBJECT PART]: Updated PrimFlags on {0} {1} to {2}", Name, LocalId, Flags); | 4662 | // m_log.DebugFormat("[SCENE OBJECT PART]: Updated PrimFlags on {0} {1} to {2}", Name, LocalId, Flags); |
4663 | } | 4663 | } |
4664 | 4664 | ||
@@ -4671,10 +4671,10 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
4671 | /// <param name="building">tells physics to delay full construction of object</param> | 4671 | /// <param name="building">tells physics to delay full construction of object</param> |
4672 | /// <param name="applyDynamics">applies velocities, force and torque</param> | 4672 | /// <param name="applyDynamics">applies velocities, force and torque</param> |
4673 | private void AddToPhysics(bool isPhysical, bool isPhantom, bool building, bool applyDynamics) | 4673 | private void AddToPhysics(bool isPhysical, bool isPhantom, bool building, bool applyDynamics) |
4674 | { | 4674 | { |
4675 | PhysicsActor pa; | 4675 | PhysicsActor pa; |
4676 | 4676 | ||
4677 | Vector3 velocity = Velocity; | 4677 | Vector3 velocity = Velocity; |
4678 | Vector3 rotationalVelocity = AngularVelocity;; | 4678 | Vector3 rotationalVelocity = AngularVelocity;; |
4679 | 4679 | ||
4680 | try | 4680 | try |
@@ -4695,7 +4695,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
4695 | m_log.ErrorFormat("[SCENE]: caught exception meshing object {0}. Object set to phantom. e={1}", m_uuid, e); | 4695 | m_log.ErrorFormat("[SCENE]: caught exception meshing object {0}. Object set to phantom. e={1}", m_uuid, e); |
4696 | pa = null; | 4696 | pa = null; |
4697 | } | 4697 | } |
4698 | 4698 | ||
4699 | if (pa != null) | 4699 | if (pa != null) |
4700 | { | 4700 | { |
4701 | pa.SOPName = this.Name; // save object into the PhysActor so ODE internals know the joint/body info | 4701 | pa.SOPName = this.Name; // save object into the PhysActor so ODE internals know the joint/body info |
@@ -4709,7 +4709,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
4709 | 4709 | ||
4710 | if(LocalId == ParentGroup.RootPart.LocalId) | 4710 | if(LocalId == ParentGroup.RootPart.LocalId) |
4711 | { | 4711 | { |
4712 | pa.LockAngularMotion(RotationAxisLocks); | 4712 | pa.LockAngularMotion(RotationAxisLocks); |
4713 | } | 4713 | } |
4714 | 4714 | ||
4715 | if (VolumeDetectActive) // change if not the default only | 4715 | if (VolumeDetectActive) // change if not the default only |
@@ -4722,7 +4722,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
4722 | AddFlag(PrimFlags.CameraDecoupled); | 4722 | AddFlag(PrimFlags.CameraDecoupled); |
4723 | else | 4723 | else |
4724 | RemFlag(PrimFlags.CameraDecoupled); | 4724 | RemFlag(PrimFlags.CameraDecoupled); |
4725 | } | 4725 | } |
4726 | else | 4726 | else |
4727 | RemFlag(PrimFlags.CameraDecoupled); | 4727 | RemFlag(PrimFlags.CameraDecoupled); |
4728 | // we are going to tell rest of code about physics so better have this here | 4728 | // we are going to tell rest of code about physics so better have this here |
@@ -4752,8 +4752,8 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
4752 | } | 4752 | } |
4753 | } | 4753 | } |
4754 | 4754 | ||
4755 | if (applyDynamics && LocalId == ParentGroup.RootPart.LocalId) | 4755 | if (applyDynamics && LocalId == ParentGroup.RootPart.LocalId) |
4756 | // do independent of isphysical so parameters get setted (at least some) | 4756 | // do independent of isphysical so parameters get setted (at least some) |
4757 | { | 4757 | { |
4758 | Velocity = velocity; | 4758 | Velocity = velocity; |
4759 | AngularVelocity = rotationalVelocity; | 4759 | AngularVelocity = rotationalVelocity; |
@@ -4941,8 +4941,8 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
4941 | 4941 | ||
4942 | Primitive.TextureEntryFace fallbackNewFace = newTex.DefaultTexture; | 4942 | Primitive.TextureEntryFace fallbackNewFace = newTex.DefaultTexture; |
4943 | Primitive.TextureEntryFace fallbackOldFace = oldTex.DefaultTexture; | 4943 | Primitive.TextureEntryFace fallbackOldFace = oldTex.DefaultTexture; |
4944 | 4944 | ||
4945 | // On Incoming packets, sometimes newText.DefaultTexture is null. The assumption is that all | 4945 | // On Incoming packets, sometimes newText.DefaultTexture is null. The assumption is that all |
4946 | // other prim-sides are set, but apparently that's not always the case. Lets assume packet/data corruption at this point. | 4946 | // other prim-sides are set, but apparently that's not always the case. Lets assume packet/data corruption at this point. |
4947 | if (fallbackNewFace == null) | 4947 | if (fallbackNewFace == null) |
4948 | { | 4948 | { |
@@ -4958,7 +4958,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
4958 | // Materials capable viewers can send a ObjectImage packet | 4958 | // Materials capable viewers can send a ObjectImage packet |
4959 | // when nothing in TE has changed. MaterialID should be updated | 4959 | // when nothing in TE has changed. MaterialID should be updated |
4960 | // by the RenderMaterials CAP handler, so updating it here may cause a | 4960 | // by the RenderMaterials CAP handler, so updating it here may cause a |
4961 | // race condtion. Therefore, if no non-materials TE fields have changed, | 4961 | // race condtion. Therefore, if no non-materials TE fields have changed, |
4962 | // we should ignore any changes and not update Shape.TextureEntry | 4962 | // we should ignore any changes and not update Shape.TextureEntry |
4963 | 4963 | ||
4964 | bool otherFieldsChanged = false; | 4964 | bool otherFieldsChanged = false; |
@@ -5140,7 +5140,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
5140 | { | 5140 | { |
5141 | return m_forceMouselook; | 5141 | return m_forceMouselook; |
5142 | } | 5142 | } |
5143 | 5143 | ||
5144 | public override string ToString() | 5144 | public override string ToString() |
5145 | { | 5145 | { |
5146 | return String.Format("{0} {1} (parent {2}))", Name, UUID, ParentGroup); | 5146 | return String.Format("{0} {1} (parent {2}))", Name, UUID, ParentGroup); |
@@ -5157,7 +5157,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
5157 | && (ParentGroup.RootPart != this | 5157 | && (ParentGroup.RootPart != this |
5158 | || ParentGroup.AttachedAvatar != remoteClient.AgentId && ParentGroup.HasPrivateAttachmentPoint)) | 5158 | || ParentGroup.AttachedAvatar != remoteClient.AgentId && ParentGroup.HasPrivateAttachmentPoint)) |
5159 | return; | 5159 | return; |
5160 | 5160 | ||
5161 | // Causes this thread to dig into the Client Thread Data. | 5161 | // Causes this thread to dig into the Client Thread Data. |
5162 | // Remember your locking here! | 5162 | // Remember your locking here! |
5163 | remoteClient.SendEntityUpdate( | 5163 | remoteClient.SendEntityUpdate( |
@@ -5165,9 +5165,9 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
5165 | PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity | 5165 | PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity |
5166 | | PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity); | 5166 | | PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity); |
5167 | 5167 | ||
5168 | ParentGroup.Scene.StatsReporter.AddObjectUpdates(1); | 5168 | ParentGroup.Scene.StatsReporter.AddObjectUpdates(1); |
5169 | } | 5169 | } |
5170 | 5170 | ||
5171 | public void AddScriptLPS(int count) | 5171 | public void AddScriptLPS(int count) |
5172 | { | 5172 | { |
5173 | ParentGroup.AddScriptLPS(count); | 5173 | ParentGroup.AddScriptLPS(count); |
@@ -5233,7 +5233,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
5233 | { | 5233 | { |
5234 | PermissionsUtil.LogPermissions(Name, message, BaseMask, OwnerMask, NextOwnerMask); | 5234 | PermissionsUtil.LogPermissions(Name, message, BaseMask, OwnerMask, NextOwnerMask); |
5235 | } | 5235 | } |
5236 | 5236 | ||
5237 | public void ApplyNextOwnerPermissions() | 5237 | public void ApplyNextOwnerPermissions() |
5238 | { | 5238 | { |
5239 | // Export needs to be preserved in the base and everyone | 5239 | // Export needs to be preserved in the base and everyone |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 5b64aac..a50f162 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -55,7 +55,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
55 | private object m_inventoryFileLock = new object(); | 55 | private object m_inventoryFileLock = new object(); |
56 | 56 | ||
57 | private Dictionary<UUID, ArrayList> m_scriptErrors = new Dictionary<UUID, ArrayList>(); | 57 | private Dictionary<UUID, ArrayList> m_scriptErrors = new Dictionary<UUID, ArrayList>(); |
58 | 58 | ||
59 | /// <value> | 59 | /// <value> |
60 | /// The part to which the inventory belongs. | 60 | /// The part to which the inventory belongs. |
61 | /// </value> | 61 | /// </value> |
@@ -76,7 +76,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
76 | /// Tracks whether inventory has changed since the last persistent backup | 76 | /// Tracks whether inventory has changed since the last persistent backup |
77 | /// </summary> | 77 | /// </summary> |
78 | internal bool HasInventoryChanged; | 78 | internal bool HasInventoryChanged; |
79 | 79 | ||
80 | /// <value> | 80 | /// <value> |
81 | /// Inventory serial number | 81 | /// Inventory serial number |
82 | /// </value> | 82 | /// </value> |
@@ -91,8 +91,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
91 | /// </value> | 91 | /// </value> |
92 | protected internal TaskInventoryDictionary Items | 92 | protected internal TaskInventoryDictionary Items |
93 | { | 93 | { |
94 | get { | 94 | get { |
95 | return m_items; | 95 | return m_items; |
96 | } | 96 | } |
97 | set | 97 | set |
98 | { | 98 | { |
@@ -110,7 +110,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
110 | return m_items.Count; | 110 | return m_items.Count; |
111 | } | 111 | } |
112 | } | 112 | } |
113 | 113 | ||
114 | /// <summary> | 114 | /// <summary> |
115 | /// Constructor | 115 | /// Constructor |
116 | /// </summary> | 116 | /// </summary> |
@@ -393,7 +393,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
393 | StoreScriptError(item.ItemID, msg); | 393 | StoreScriptError(item.ItemID, msg); |
394 | m_log.ErrorFormat( | 394 | m_log.ErrorFormat( |
395 | "[PRIM INVENTORY]: Couldn't start script {0}, {1} at {2} in {3} since asset ID {4} could not be found", | 395 | "[PRIM INVENTORY]: Couldn't start script {0}, {1} at {2} in {3} since asset ID {4} could not be found", |
396 | item.Name, item.ItemID, m_part.AbsolutePosition, | 396 | item.Name, item.ItemID, m_part.AbsolutePosition, |
397 | m_part.ParentGroup.Scene.RegionInfo.RegionName, item.AssetID); | 397 | m_part.ParentGroup.Scene.RegionInfo.RegionName, item.AssetID); |
398 | 398 | ||
399 | return false; | 399 | return false; |
@@ -410,7 +410,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
410 | m_items[item.ItemID].PermsGranter = UUID.Zero; | 410 | m_items[item.ItemID].PermsGranter = UUID.Zero; |
411 | 411 | ||
412 | m_items.LockItemsForWrite(false); | 412 | m_items.LockItemsForWrite(false); |
413 | 413 | ||
414 | string script = Utils.BytesToString(asset.Data); | 414 | string script = Utils.BytesToString(asset.Data); |
415 | m_part.ParentGroup.Scene.EventManager.TriggerRezScript( | 415 | m_part.ParentGroup.Scene.EventManager.TriggerRezScript( |
416 | m_part.LocalId, item.ItemID, script, startParam, postOnRez, engine, stateSource); | 416 | m_part.LocalId, item.ItemID, script, startParam, postOnRez, engine, stateSource); |
@@ -428,7 +428,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
428 | private UUID RestoreSavedScriptState(UUID loadedID, UUID oldID, UUID newID) | 428 | private UUID RestoreSavedScriptState(UUID loadedID, UUID oldID, UUID newID) |
429 | { | 429 | { |
430 | // m_log.DebugFormat( | 430 | // m_log.DebugFormat( |
431 | // "[PRIM INVENTORY]: Restoring scripted state for item {0}, oldID {1}, loadedID {2}", | 431 | // "[PRIM INVENTORY]: Restoring scripted state for item {0}, oldID {1}, loadedID {2}", |
432 | // newID, oldID, loadedID); | 432 | // newID, oldID, loadedID); |
433 | 433 | ||
434 | IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>(); | 434 | IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>(); |
@@ -477,7 +477,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
477 | 477 | ||
478 | m_part.ParentGroup.m_savedScriptState[stateID] = newDoc.OuterXml; | 478 | m_part.ParentGroup.m_savedScriptState[stateID] = newDoc.OuterXml; |
479 | } | 479 | } |
480 | 480 | ||
481 | foreach (IScriptModule e in engines) | 481 | foreach (IScriptModule e in engines) |
482 | { | 482 | { |
483 | if (e != null) | 483 | if (e != null) |
@@ -544,7 +544,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
544 | { | 544 | { |
545 | ArrayList errors; | 545 | ArrayList errors; |
546 | 546 | ||
547 | // Indicate to CreateScriptInstanceInternal() we want it to | 547 | // Indicate to CreateScriptInstanceInternal() we want it to |
548 | // post any compilation/loading error messages | 548 | // post any compilation/loading error messages |
549 | lock (m_scriptErrors) | 549 | lock (m_scriptErrors) |
550 | { | 550 | { |
@@ -641,7 +641,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
641 | { | 641 | { |
642 | if (!sceneObjectBeingDeleted) | 642 | if (!sceneObjectBeingDeleted) |
643 | m_part.RemoveScriptEvents(itemId); | 643 | m_part.RemoveScriptEvents(itemId); |
644 | 644 | ||
645 | m_part.ParentGroup.Scene.EventManager.TriggerRemoveScript(m_part.LocalId, itemId); | 645 | m_part.ParentGroup.Scene.EventManager.TriggerRemoveScript(m_part.LocalId, itemId); |
646 | m_part.ParentGroup.AddActiveScriptCount(-1); | 646 | m_part.ParentGroup.AddActiveScriptCount(-1); |
647 | } | 647 | } |
@@ -650,7 +650,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
650 | m_log.WarnFormat( | 650 | m_log.WarnFormat( |
651 | "[PRIM INVENTORY]: " + | 651 | "[PRIM INVENTORY]: " + |
652 | "Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2} at {3} in {4}", | 652 | "Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2} at {3} in {4}", |
653 | itemId, m_part.Name, m_part.UUID, | 653 | itemId, m_part.Name, m_part.UUID, |
654 | m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName); | 654 | m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName); |
655 | } | 655 | } |
656 | } | 656 | } |
@@ -679,7 +679,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
679 | m_log.WarnFormat( | 679 | m_log.WarnFormat( |
680 | "[PRIM INVENTORY]: " + | 680 | "[PRIM INVENTORY]: " + |
681 | "Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2} at {3} in {4}", | 681 | "Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2} at {3} in {4}", |
682 | itemId, m_part.Name, m_part.UUID, | 682 | itemId, m_part.Name, m_part.UUID, |
683 | m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName); | 683 | m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName); |
684 | } | 684 | } |
685 | } | 685 | } |
@@ -802,11 +802,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
802 | m_items.LockItemsForWrite(true); | 802 | m_items.LockItemsForWrite(true); |
803 | m_items.Add(item.ItemID, item); | 803 | m_items.Add(item.ItemID, item); |
804 | m_items.LockItemsForWrite(false); | 804 | m_items.LockItemsForWrite(false); |
805 | if (allowedDrop) | 805 | if (allowedDrop) |
806 | m_part.TriggerScriptChangedEvent(Changed.ALLOWED_DROP); | 806 | m_part.TriggerScriptChangedEvent(Changed.ALLOWED_DROP); |
807 | else | 807 | else |
808 | m_part.TriggerScriptChangedEvent(Changed.INVENTORY); | 808 | m_part.TriggerScriptChangedEvent(Changed.INVENTORY); |
809 | 809 | ||
810 | m_inventorySerial++; | 810 | m_inventorySerial++; |
811 | //m_inventorySerial += 2; | 811 | //m_inventorySerial += 2; |
812 | HasInventoryChanged = true; | 812 | HasInventoryChanged = true; |
@@ -887,7 +887,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
887 | if (null == rezAsset) | 887 | if (null == rezAsset) |
888 | { | 888 | { |
889 | m_log.WarnFormat( | 889 | m_log.WarnFormat( |
890 | "[PRIM INVENTORY]: Could not find asset {0} for inventory item {1} in {2}", | 890 | "[PRIM INVENTORY]: Could not find asset {0} for inventory item {1} in {2}", |
891 | item.AssetID, item.Name, m_part.Name); | 891 | item.AssetID, item.Name, m_part.Name); |
892 | objlist = null; | 892 | objlist = null; |
893 | veclist = null; | 893 | veclist = null; |
@@ -895,7 +895,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
895 | offsetHeight = 0; | 895 | offsetHeight = 0; |
896 | return false; | 896 | return false; |
897 | } | 897 | } |
898 | 898 | ||
899 | bool single = m_part.ParentGroup.Scene.GetObjectsToRez(rezAsset.Data, false, out objlist, out veclist, out bbox, out offsetHeight); | 899 | bool single = m_part.ParentGroup.Scene.GetObjectsToRez(rezAsset.Data, false, out objlist, out veclist, out bbox, out offsetHeight); |
900 | 900 | ||
901 | for (int i = 0; i < objlist.Count; i++) | 901 | for (int i = 0; i < objlist.Count; i++) |
@@ -985,7 +985,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
985 | 985 | ||
986 | return true; | 986 | return true; |
987 | } | 987 | } |
988 | 988 | ||
989 | /// <summary> | 989 | /// <summary> |
990 | /// Update an existing inventory item. | 990 | /// Update an existing inventory item. |
991 | /// </summary> | 991 | /// </summary> |
@@ -1009,7 +1009,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1009 | if (m_items.ContainsKey(item.ItemID)) | 1009 | if (m_items.ContainsKey(item.ItemID)) |
1010 | { | 1010 | { |
1011 | // m_log.DebugFormat("[PRIM INVENTORY]: Updating item {0} in {1}", item.Name, m_part.Name); | 1011 | // m_log.DebugFormat("[PRIM INVENTORY]: Updating item {0} in {1}", item.Name, m_part.Name); |
1012 | 1012 | ||
1013 | item.ParentID = m_part.UUID; | 1013 | item.ParentID = m_part.UUID; |
1014 | item.ParentPartID = m_part.UUID; | 1014 | item.ParentPartID = m_part.UUID; |
1015 | 1015 | ||
@@ -1025,7 +1025,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1025 | m_inventorySerial++; | 1025 | m_inventorySerial++; |
1026 | if (fireScriptEvents) | 1026 | if (fireScriptEvents) |
1027 | m_part.TriggerScriptChangedEvent(Changed.INVENTORY); | 1027 | m_part.TriggerScriptChangedEvent(Changed.INVENTORY); |
1028 | 1028 | ||
1029 | if (considerChanged) | 1029 | if (considerChanged) |
1030 | { | 1030 | { |
1031 | HasInventoryChanged = true; | 1031 | HasInventoryChanged = true; |
@@ -1039,7 +1039,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1039 | m_log.ErrorFormat( | 1039 | m_log.ErrorFormat( |
1040 | "[PRIM INVENTORY]: " + | 1040 | "[PRIM INVENTORY]: " + |
1041 | "Tried to retrieve item ID {0} from prim {1}, {2} at {3} in {4} but the item does not exist in this inventory", | 1041 | "Tried to retrieve item ID {0} from prim {1}, {2} at {3} in {4} but the item does not exist in this inventory", |
1042 | item.ItemID, m_part.Name, m_part.UUID, | 1042 | item.ItemID, m_part.Name, m_part.UUID, |
1043 | m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName); | 1043 | m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName); |
1044 | } | 1044 | } |
1045 | m_items.LockItemsForWrite(false); | 1045 | m_items.LockItemsForWrite(false); |
@@ -1084,7 +1084,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1084 | } | 1084 | } |
1085 | } | 1085 | } |
1086 | m_items.LockItemsForRead(false); | 1086 | m_items.LockItemsForRead(false); |
1087 | 1087 | ||
1088 | 1088 | ||
1089 | if (scriptcount <= 0) | 1089 | if (scriptcount <= 0) |
1090 | { | 1090 | { |
@@ -1381,7 +1381,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1381 | item.CurrentPermissions = perms; | 1381 | item.CurrentPermissions = perms; |
1382 | item.BasePermissions = perms; | 1382 | item.BasePermissions = perms; |
1383 | } | 1383 | } |
1384 | 1384 | ||
1385 | m_inventorySerial++; | 1385 | m_inventorySerial++; |
1386 | HasInventoryChanged = true; | 1386 | HasInventoryChanged = true; |
1387 | } | 1387 | } |
@@ -1485,7 +1485,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1485 | 1485 | ||
1486 | return ret; | 1486 | return ret; |
1487 | } | 1487 | } |
1488 | 1488 | ||
1489 | public Dictionary<UUID, string> GetScriptStates() | 1489 | public Dictionary<UUID, string> GetScriptStates() |
1490 | { | 1490 | { |
1491 | return GetScriptStates(false); | 1491 | return GetScriptStates(false); |
@@ -1493,13 +1493,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
1493 | 1493 | ||
1494 | public Dictionary<UUID, string> GetScriptStates(bool oldIDs) | 1494 | public Dictionary<UUID, string> GetScriptStates(bool oldIDs) |
1495 | { | 1495 | { |
1496 | Dictionary<UUID, string> ret = new Dictionary<UUID, string>(); | 1496 | Dictionary<UUID, string> ret = new Dictionary<UUID, string>(); |
1497 | 1497 | ||
1498 | if (m_part.ParentGroup.Scene == null) // Group not in a scene | 1498 | if (m_part.ParentGroup.Scene == null) // Group not in a scene |
1499 | return ret; | 1499 | return ret; |
1500 | 1500 | ||
1501 | IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>(); | 1501 | IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>(); |
1502 | 1502 | ||
1503 | if (engines.Length == 0) // No engine at all | 1503 | if (engines.Length == 0) // No engine at all |
1504 | return ret; | 1504 | return ret; |
1505 | 1505 | ||
@@ -1535,7 +1535,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1535 | } | 1535 | } |
1536 | return ret; | 1536 | return ret; |
1537 | } | 1537 | } |
1538 | 1538 | ||
1539 | public void ResumeScripts() | 1539 | public void ResumeScripts() |
1540 | { | 1540 | { |
1541 | IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>(); | 1541 | IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>(); |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index c1b1a63..29e139b 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -108,8 +108,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
108 | /// The current state of this presence. Governs only the existence lifecycle. See ScenePresenceStateMachine | 108 | /// The current state of this presence. Governs only the existence lifecycle. See ScenePresenceStateMachine |
109 | /// for more details. | 109 | /// for more details. |
110 | /// </summary> | 110 | /// </summary> |
111 | public ScenePresenceState LifecycleState | 111 | public ScenePresenceState LifecycleState |
112 | { | 112 | { |
113 | get | 113 | get |
114 | { | 114 | { |
115 | return m_stateMachine.GetState(); | 115 | return m_stateMachine.GetState(); |
@@ -126,7 +126,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
126 | /// the viewer fires these in quick succession. | 126 | /// the viewer fires these in quick succession. |
127 | /// </summary> | 127 | /// </summary> |
128 | /// <remarks> | 128 | /// <remarks> |
129 | /// TODO: The child -> agent transition should be folded into LifecycleState and the CompleteMovement | 129 | /// TODO: The child -> agent transition should be folded into LifecycleState and the CompleteMovement |
130 | /// regulation done there. | 130 | /// regulation done there. |
131 | /// </remarks> | 131 | /// </remarks> |
132 | private object m_completeMovementLock = new object(); | 132 | private object m_completeMovementLock = new object(); |
@@ -134,7 +134,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
134 | // private static readonly byte[] DEFAULT_TEXTURE = AvatarAppearance.GetDefaultTexture().GetBytes(); | 134 | // private static readonly byte[] DEFAULT_TEXTURE = AvatarAppearance.GetDefaultTexture().GetBytes(); |
135 | private static readonly Array DIR_CONTROL_FLAGS = Enum.GetValues(typeof(Dir_ControlFlags)); | 135 | private static readonly Array DIR_CONTROL_FLAGS = Enum.GetValues(typeof(Dir_ControlFlags)); |
136 | private static readonly Vector3 HEAD_ADJUSTMENT = new Vector3(0f, 0f, 0.3f); | 136 | private static readonly Vector3 HEAD_ADJUSTMENT = new Vector3(0f, 0f, 0.3f); |
137 | 137 | ||
138 | /// <summary> | 138 | /// <summary> |
139 | /// Experimentally determined "fudge factor" to make sit-target positions | 139 | /// Experimentally determined "fudge factor" to make sit-target positions |
140 | /// the same as in SecondLife. Fudge factor was tested for 36 different | 140 | /// the same as in SecondLife. Fudge factor was tested for 36 different |
@@ -241,7 +241,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
241 | return m_currentParcelHide; | 241 | return m_currentParcelHide; |
242 | } | 242 | } |
243 | } | 243 | } |
244 | 244 | ||
245 | /// <value> | 245 | /// <value> |
246 | /// The animator for this avatar | 246 | /// The animator for this avatar |
247 | /// </value> | 247 | /// </value> |
@@ -356,7 +356,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
356 | protected bool m_reprioritizationBusy; | 356 | protected bool m_reprioritizationBusy; |
357 | protected Vector3 m_reprioritizationLastPosition; | 357 | protected Vector3 m_reprioritizationLastPosition; |
358 | protected float m_reprioritizationLastDrawDistance; | 358 | protected float m_reprioritizationLastDrawDistance; |
359 | 359 | ||
360 | private Quaternion m_headrotation = Quaternion.Identity; | 360 | private Quaternion m_headrotation = Quaternion.Identity; |
361 | 361 | ||
362 | //PauPaw:Proper PID Controler for autopilot************ | 362 | //PauPaw:Proper PID Controler for autopilot************ |
@@ -377,7 +377,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
377 | 377 | ||
378 | //private bool m_collisionEventFlag = false; | 378 | //private bool m_collisionEventFlag = false; |
379 | private object m_collisionEventLock = new Object(); | 379 | private object m_collisionEventLock = new Object(); |
380 | 380 | ||
381 | private int m_movementAnimationUpdateCounter = 0; | 381 | private int m_movementAnimationUpdateCounter = 0; |
382 | 382 | ||
383 | public Vector3 PrevSitOffset { get; set; } | 383 | public Vector3 PrevSitOffset { get; set; } |
@@ -424,7 +424,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
424 | DIR_CONTROL_FLAG_UP_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_POS, | 424 | DIR_CONTROL_FLAG_UP_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_POS, |
425 | DIR_CONTROL_FLAG_DOWN_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG | 425 | DIR_CONTROL_FLAG_DOWN_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG |
426 | } | 426 | } |
427 | 427 | ||
428 | /// <summary> | 428 | /// <summary> |
429 | /// Position at which a significant movement was made | 429 | /// Position at which a significant movement was made |
430 | /// </summary> | 430 | /// </summary> |
@@ -528,7 +528,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
528 | m_rootRegionHandle = value; | 528 | m_rootRegionHandle = value; |
529 | // position rounded to lower multiple of 256m | 529 | // position rounded to lower multiple of 256m |
530 | m_rootRegionPosition.X = (float)((m_rootRegionHandle >> 32) & 0xffffff00); | 530 | m_rootRegionPosition.X = (float)((m_rootRegionHandle >> 32) & 0xffffff00); |
531 | m_rootRegionPosition.Y = (float)(m_rootRegionHandle & 0xffffff00); | 531 | m_rootRegionPosition.Y = (float)(m_rootRegionHandle & 0xffffff00); |
532 | } | 532 | } |
533 | } | 533 | } |
534 | 534 | ||
@@ -562,7 +562,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
562 | return a; | 562 | return a; |
563 | } | 563 | } |
564 | } | 564 | } |
565 | #endregion | 565 | #endregion |
566 | 566 | ||
567 | public string Firstname { get; private set; } | 567 | public string Firstname { get; private set; } |
568 | public string Lastname { get; private set; } | 568 | public string Lastname { get; private set; } |
@@ -603,7 +603,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
603 | public bool AllowMovement { get; set; } | 603 | public bool AllowMovement { get; set; } |
604 | 604 | ||
605 | private bool m_setAlwaysRun; | 605 | private bool m_setAlwaysRun; |
606 | 606 | ||
607 | public bool SetAlwaysRun | 607 | public bool SetAlwaysRun |
608 | { | 608 | { |
609 | get | 609 | get |
@@ -689,7 +689,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
689 | return rootPart.AbsolutePosition + (m_pos * rootPart.GetWorldRotation()); | 689 | return rootPart.AbsolutePosition + (m_pos * rootPart.GetWorldRotation()); |
690 | } | 690 | } |
691 | } | 691 | } |
692 | 692 | ||
693 | return m_pos; | 693 | return m_pos; |
694 | } | 694 | } |
695 | set | 695 | set |
@@ -777,7 +777,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
777 | 777 | ||
778 | // m_log.DebugFormat( | 778 | // m_log.DebugFormat( |
779 | // "[SCENE PRESENCE]: In {0} set velocity of {1} to {2}", | 779 | // "[SCENE PRESENCE]: In {0} set velocity of {1} to {2}", |
780 | // Scene.RegionInfo.RegionName, Name, m_velocity); | 780 | // Scene.RegionInfo.RegionName, Name, m_velocity); |
781 | } | 781 | } |
782 | } | 782 | } |
783 | 783 | ||
@@ -821,9 +821,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
821 | /// </remarks> | 821 | /// </remarks> |
822 | public Quaternion Rotation | 822 | public Quaternion Rotation |
823 | { | 823 | { |
824 | get | 824 | get |
825 | { | 825 | { |
826 | return m_bodyRot; | 826 | return m_bodyRot; |
827 | } | 827 | } |
828 | 828 | ||
829 | set | 829 | set |
@@ -963,10 +963,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
963 | } | 963 | } |
964 | 964 | ||
965 | DropOldNeighbours(old); | 965 | DropOldNeighbours(old); |
966 | 966 | ||
967 | if (Scene.CapsModule != null) | 967 | if (Scene.CapsModule != null) |
968 | Scene.CapsModule.SetChildrenSeed(UUID, seeds); | 968 | Scene.CapsModule.SetChildrenSeed(UUID, seeds); |
969 | */ | 969 | */ |
970 | KnownRegions = seeds; | 970 | KnownRegions = seeds; |
971 | //m_log.Debug(" ++++++++++AFTER+++++++++++++ "); | 971 | //m_log.Debug(" ++++++++++AFTER+++++++++++++ "); |
972 | //DumpKnownRegions(); | 972 | //DumpKnownRegions(); |
@@ -991,13 +991,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
991 | /// <summary> | 991 | /// <summary> |
992 | /// This signals whether the presence is in transit between neighbouring regions. | 992 | /// This signals whether the presence is in transit between neighbouring regions. |
993 | /// </summary> | 993 | /// </summary> |
994 | /// <remarks> | 994 | /// <remarks> |
995 | /// It is not set when the presence is teleporting or logging in/out directly to a region. | 995 | /// It is not set when the presence is teleporting or logging in/out directly to a region. |
996 | /// </remarks> | 996 | /// </remarks> |
997 | public bool IsInTransit | 997 | public bool IsInTransit |
998 | { | 998 | { |
999 | get { return m_inTransit; } | 999 | get { return m_inTransit; } |
1000 | set { | 1000 | set { |
1001 | if(value) | 1001 | if(value) |
1002 | { | 1002 | { |
1003 | if (Flying) | 1003 | if (Flying) |
@@ -1051,14 +1051,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
1051 | { | 1051 | { |
1052 | get { return Util.GetViewerName(m_scene.AuthenticateHandler.GetAgentCircuitData(ControllingClient.CircuitCode)); } | 1052 | get { return Util.GetViewerName(m_scene.AuthenticateHandler.GetAgentCircuitData(ControllingClient.CircuitCode)); } |
1053 | } | 1053 | } |
1054 | 1054 | ||
1055 | #endregion | 1055 | #endregion |
1056 | 1056 | ||
1057 | #region Constructor(s) | 1057 | #region Constructor(s) |
1058 | 1058 | ||
1059 | public ScenePresence( | 1059 | public ScenePresence( |
1060 | IClientAPI client, Scene world, AvatarAppearance appearance, PresenceType type) | 1060 | IClientAPI client, Scene world, AvatarAppearance appearance, PresenceType type) |
1061 | { | 1061 | { |
1062 | m_scene = world; | 1062 | m_scene = world; |
1063 | AttachmentsSyncLock = new Object(); | 1063 | AttachmentsSyncLock = new Object(); |
1064 | AllowMovement = true; | 1064 | AllowMovement = true; |
@@ -1092,16 +1092,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
1092 | // Grouptitle = gm.GetGroupTitle(m_uuid); | 1092 | // Grouptitle = gm.GetGroupTitle(m_uuid); |
1093 | 1093 | ||
1094 | m_scriptEngines = m_scene.RequestModuleInterfaces<IScriptModule>(); | 1094 | m_scriptEngines = m_scene.RequestModuleInterfaces<IScriptModule>(); |
1095 | 1095 | ||
1096 | AbsolutePosition = posLastMove = posLastSignificantMove = CameraPosition = | 1096 | AbsolutePosition = posLastMove = posLastSignificantMove = CameraPosition = |
1097 | m_reprioritizationLastPosition = ControllingClient.StartPos; | 1097 | m_reprioritizationLastPosition = ControllingClient.StartPos; |
1098 | 1098 | ||
1099 | m_reprioritizationLastDrawDistance = DrawDistance; | 1099 | m_reprioritizationLastDrawDistance = DrawDistance; |
1100 | 1100 | ||
1101 | // disable updates workjobs for now | 1101 | // disable updates workjobs for now |
1102 | childUpdatesBusy = true; | 1102 | childUpdatesBusy = true; |
1103 | m_reprioritizationBusy = true; | 1103 | m_reprioritizationBusy = true; |
1104 | 1104 | ||
1105 | AdjustKnownSeeds(); | 1105 | AdjustKnownSeeds(); |
1106 | 1106 | ||
1107 | RegisterToClientEvents(); | 1107 | RegisterToClientEvents(); |
@@ -1189,7 +1189,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1189 | // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange); | 1189 | // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange); |
1190 | // ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement); | 1190 | // ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement); |
1191 | } | 1191 | } |
1192 | 1192 | ||
1193 | public void RemoveClientEvents() | 1193 | public void RemoveClientEvents() |
1194 | { | 1194 | { |
1195 | ControllingClient.OnCompleteMovementToRegion -= CompleteMovement; | 1195 | ControllingClient.OnCompleteMovementToRegion -= CompleteMovement; |
@@ -1237,7 +1237,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1237 | /// This method is on the critical path for transferring an avatar from one region to another. Delay here | 1237 | /// This method is on the critical path for transferring an avatar from one region to another. Delay here |
1238 | /// delays that crossing. | 1238 | /// delays that crossing. |
1239 | /// </remarks> | 1239 | /// </remarks> |
1240 | 1240 | ||
1241 | // constants for physics position search | 1241 | // constants for physics position search |
1242 | const float PhysSearchHeight = 600f; | 1242 | const float PhysSearchHeight = 600f; |
1243 | const float PhysMinSkipGap = 50f; | 1243 | const float PhysMinSkipGap = 50f; |
@@ -1280,7 +1280,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1280 | // if not actually on the target invalidate it | 1280 | // if not actually on the target invalidate it |
1281 | if(gotCrossUpdate && (crossingFlags & 0x04) == 0) | 1281 | if(gotCrossUpdate && (crossingFlags & 0x04) == 0) |
1282 | part.SitTargetAvatar = UUID.Zero; | 1282 | part.SitTargetAvatar = UUID.Zero; |
1283 | 1283 | ||
1284 | ParentID = part.LocalId; | 1284 | ParentID = part.LocalId; |
1285 | ParentPart = part; | 1285 | ParentPart = part; |
1286 | m_pos = PrevSitOffset; | 1286 | m_pos = PrevSitOffset; |
@@ -1380,7 +1380,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1380 | int physcount = PhysNumberCollisions; | 1380 | int physcount = PhysNumberCollisions; |
1381 | 1381 | ||
1382 | float dist = physTestHeight - groundHeight + localAVHalfHeight; | 1382 | float dist = physTestHeight - groundHeight + localAVHalfHeight; |
1383 | 1383 | ||
1384 | Vector3 direction = new Vector3(0f, 0f, -1f); | 1384 | Vector3 direction = new Vector3(0f, 0f, -1f); |
1385 | Vector3 RayStart = pos; | 1385 | Vector3 RayStart = pos; |
1386 | RayStart.Z = physTestHeight; | 1386 | RayStart.Z = physTestHeight; |
@@ -1426,7 +1426,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1426 | AbsolutePosition = pos; | 1426 | AbsolutePosition = pos; |
1427 | 1427 | ||
1428 | // m_log.DebugFormat( | 1428 | // m_log.DebugFormat( |
1429 | // "Set pos {0}, vel {1} in {1} to {2} from input position of {3} on MakeRootAgent", | 1429 | // "Set pos {0}, vel {1} in {1} to {2} from input position of {3} on MakeRootAgent", |
1430 | // Name, Scene.Name, AbsolutePosition, pos); | 1430 | // Name, Scene.Name, AbsolutePosition, pos); |
1431 | // | 1431 | // |
1432 | if (m_teleportFlags == TeleportFlags.Default) | 1432 | if (m_teleportFlags == TeleportFlags.Default) |
@@ -1453,8 +1453,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1453 | Flying = false; | 1453 | Flying = false; |
1454 | } | 1454 | } |
1455 | } | 1455 | } |
1456 | 1456 | ||
1457 | 1457 | ||
1458 | m_log.DebugFormat("[MakeRootAgent] position and physical: {0}ms", Util.EnvironmentTickCountSubtract(ts)); | 1458 | m_log.DebugFormat("[MakeRootAgent] position and physical: {0}ms", Util.EnvironmentTickCountSubtract(ts)); |
1459 | m_scene.SwapRootAgentCount(false); | 1459 | m_scene.SwapRootAgentCount(false); |
1460 | 1460 | ||
@@ -1519,7 +1519,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1519 | m_log.DebugFormat("[SCENE PRESENCE]: Forcing viewers to update the avatar name for " + Name); | 1519 | m_log.DebugFormat("[SCENE PRESENCE]: Forcing viewers to update the avatar name for " + Name); |
1520 | 1520 | ||
1521 | UseFakeGroupTitle = true; | 1521 | UseFakeGroupTitle = true; |
1522 | 1522 | ||
1523 | 1523 | ||
1524 | Util.FireAndForget(o => | 1524 | Util.FireAndForget(o => |
1525 | { | 1525 | { |
@@ -1587,7 +1587,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1587 | else | 1587 | else |
1588 | Animator.ResetAnimations(); | 1588 | Animator.ResetAnimations(); |
1589 | 1589 | ||
1590 | 1590 | ||
1591 | // m_log.DebugFormat( | 1591 | // m_log.DebugFormat( |
1592 | // "[SCENE PRESENCE]: Downgrading root agent {0}, {1} to a child agent in {2}", | 1592 | // "[SCENE PRESENCE]: Downgrading root agent {0}, {1} to a child agent in {2}", |
1593 | // Name, UUID, m_scene.RegionInfo.RegionName); | 1593 | // Name, UUID, m_scene.RegionInfo.RegionName); |
@@ -1595,7 +1595,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1595 | // Don't zero out the velocity since this can cause problems when an avatar is making a region crossing, | 1595 | // Don't zero out the velocity since this can cause problems when an avatar is making a region crossing, |
1596 | // depending on the exact timing. This shouldn't matter anyway since child agent positions are not updated. | 1596 | // depending on the exact timing. This shouldn't matter anyway since child agent positions are not updated. |
1597 | //Velocity = new Vector3(0, 0, 0); | 1597 | //Velocity = new Vector3(0, 0, 0); |
1598 | 1598 | ||
1599 | IsChildAgent = true; | 1599 | IsChildAgent = true; |
1600 | m_scene.SwapRootAgentCount(true); | 1600 | m_scene.SwapRootAgentCount(true); |
1601 | RemoveFromPhysicalScene(); | 1601 | RemoveFromPhysicalScene(); |
@@ -1656,7 +1656,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1656 | bool isFlying = Flying; | 1656 | bool isFlying = Flying; |
1657 | Vector3 vel = Velocity; | 1657 | Vector3 vel = Velocity; |
1658 | RemoveFromPhysicalScene(); | 1658 | RemoveFromPhysicalScene(); |
1659 | 1659 | ||
1660 | AbsolutePosition = pos; | 1660 | AbsolutePosition = pos; |
1661 | AddToPhysicalScene(isFlying); | 1661 | AddToPhysicalScene(isFlying); |
1662 | if (PhysicsActor != null) | 1662 | if (PhysicsActor != null) |
@@ -1709,7 +1709,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1709 | if (IsInTransit) | 1709 | if (IsInTransit) |
1710 | return; | 1710 | return; |
1711 | 1711 | ||
1712 | Vector3 pos = AbsolutePosition; | 1712 | Vector3 pos = AbsolutePosition; |
1713 | if (Appearance.AvatarHeight != 127.0f) | 1713 | if (Appearance.AvatarHeight != 127.0f) |
1714 | pos += new Vector3(0f, 0f, (Appearance.AvatarHeight / 6f)); | 1714 | pos += new Vector3(0f, 0f, (Appearance.AvatarHeight / 6f)); |
1715 | else | 1715 | else |
@@ -1737,7 +1737,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1737 | /// <param name="amount">Postive or negative roll amount in radians</param> | 1737 | /// <param name="amount">Postive or negative roll amount in radians</param> |
1738 | private void ApplyFlyingRoll(float amount, bool PressingUp, bool PressingDown) | 1738 | private void ApplyFlyingRoll(float amount, bool PressingUp, bool PressingDown) |
1739 | { | 1739 | { |
1740 | 1740 | ||
1741 | float rollAmount = Util.Clamp(m_AngularVelocity.Z + amount, -FLY_ROLL_MAX_RADIANS, FLY_ROLL_MAX_RADIANS); | 1741 | float rollAmount = Util.Clamp(m_AngularVelocity.Z + amount, -FLY_ROLL_MAX_RADIANS, FLY_ROLL_MAX_RADIANS); |
1742 | m_AngularVelocity.Z = rollAmount; | 1742 | m_AngularVelocity.Z = rollAmount; |
1743 | 1743 | ||
@@ -1789,7 +1789,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1789 | 1789 | ||
1790 | if (m_AngularVelocity.Z > 0) | 1790 | if (m_AngularVelocity.Z > 0) |
1791 | { | 1791 | { |
1792 | 1792 | ||
1793 | float leftOverToMin = m_AngularVelocity.Z - rollMinRadians; | 1793 | float leftOverToMin = m_AngularVelocity.Z - rollMinRadians; |
1794 | if (amount > leftOverToMin) | 1794 | if (amount > leftOverToMin) |
1795 | return -leftOverToMin; | 1795 | return -leftOverToMin; |
@@ -1799,7 +1799,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1799 | } | 1799 | } |
1800 | else | 1800 | else |
1801 | { | 1801 | { |
1802 | 1802 | ||
1803 | float leftOverToMin = -m_AngularVelocity.Z - rollMinRadians; | 1803 | float leftOverToMin = -m_AngularVelocity.Z - rollMinRadians; |
1804 | if (amount > leftOverToMin) | 1804 | if (amount > leftOverToMin) |
1805 | return leftOverToMin; | 1805 | return leftOverToMin; |
@@ -1807,7 +1807,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1807 | return amount; | 1807 | return amount; |
1808 | } | 1808 | } |
1809 | } | 1809 | } |
1810 | 1810 | ||
1811 | 1811 | ||
1812 | 1812 | ||
1813 | // neighbouring regions we have enabled a child agent in | 1813 | // neighbouring regions we have enabled a child agent in |
@@ -1943,15 +1943,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
1943 | private bool WaitForUpdateAgent(IClientAPI client) | 1943 | private bool WaitForUpdateAgent(IClientAPI client) |
1944 | { | 1944 | { |
1945 | // Before the source region executes UpdateAgent | 1945 | // Before the source region executes UpdateAgent |
1946 | // (which triggers Scene.IncomingUpdateChildAgent(AgentData cAgentData) here in the destination, | 1946 | // (which triggers Scene.IncomingUpdateChildAgent(AgentData cAgentData) here in the destination, |
1947 | // m_originRegionID is UUID.Zero; after, it's non-Zero. The CompleteMovement sequence initiated from the | 1947 | // m_originRegionID is UUID.Zero; after, it's non-Zero. The CompleteMovement sequence initiated from the |
1948 | // viewer (in turn triggered by the source region sending it a TeleportFinish event) waits until it's non-zero | 1948 | // viewer (in turn triggered by the source region sending it a TeleportFinish event) waits until it's non-zero |
1949 | // m_updateAgentReceivedAfterTransferEvent.WaitOne(10000); | 1949 | // m_updateAgentReceivedAfterTransferEvent.WaitOne(10000); |
1950 | int count = 50; | 1950 | int count = 50; |
1951 | UUID originID = UUID.Zero; | 1951 | UUID originID = UUID.Zero; |
1952 | 1952 | ||
1953 | lock (m_originRegionIDAccessLock) | 1953 | lock (m_originRegionIDAccessLock) |
1954 | originID = m_originRegionID; | 1954 | originID = m_originRegionID; |
1955 | 1955 | ||
1956 | 1956 | ||
1957 | while (originID.Equals(UUID.Zero) && count-- > 0) | 1957 | while (originID.Equals(UUID.Zero) && count-- > 0) |
@@ -2014,7 +2014,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2014 | m_log.InfoFormat( | 2014 | m_log.InfoFormat( |
2015 | "[SCENE PRESENCE]: Completing movement of {0} into region {1} in position {2}", | 2015 | "[SCENE PRESENCE]: Completing movement of {0} into region {1} in position {2}", |
2016 | client.Name, Scene.Name, AbsolutePosition); | 2016 | client.Name, Scene.Name, AbsolutePosition); |
2017 | 2017 | ||
2018 | m_inTransit = true; | 2018 | m_inTransit = true; |
2019 | 2019 | ||
2020 | try | 2020 | try |
@@ -2110,7 +2110,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2110 | // client.Name, client.AgentId, m_scene.RegionInfo.RegionName); | 2110 | // client.Name, client.AgentId, m_scene.RegionInfo.RegionName); |
2111 | // } | 2111 | // } |
2112 | 2112 | ||
2113 | 2113 | ||
2114 | m_log.DebugFormat("[CompleteMovement] ReleaseAgent: {0}ms", Util.EnvironmentTickCountSubtract(ts)); | 2114 | m_log.DebugFormat("[CompleteMovement] ReleaseAgent: {0}ms", Util.EnvironmentTickCountSubtract(ts)); |
2115 | 2115 | ||
2116 | 2116 | ||
@@ -2138,7 +2138,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2138 | m_currentParcelHide = false; | 2138 | m_currentParcelHide = false; |
2139 | m_currentParcelUUID = UUID.Zero; | 2139 | m_currentParcelUUID = UUID.Zero; |
2140 | 2140 | ||
2141 | // send initial land overlay and parcel | 2141 | // send initial land overlay and parcel |
2142 | ILandChannel landch = m_scene.LandChannel; | 2142 | ILandChannel landch = m_scene.LandChannel; |
2143 | if (landch != null) | 2143 | if (landch != null) |
2144 | landch.sendClientInitialLandInfo(client); | 2144 | landch.sendClientInitialLandInfo(client); |
@@ -2193,7 +2193,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2193 | 2193 | ||
2194 | // send look and animations to others | 2194 | // send look and animations to others |
2195 | // if not cached we send greys | 2195 | // if not cached we send greys |
2196 | // uncomented if will wait till avatar does baking | 2196 | // uncomented if will wait till avatar does baking |
2197 | //if (cachedbaked) | 2197 | //if (cachedbaked) |
2198 | { | 2198 | { |
2199 | foreach (ScenePresence p in allpresences) | 2199 | foreach (ScenePresence p in allpresences) |
@@ -2292,7 +2292,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2292 | { | 2292 | { |
2293 | IFriendsModule friendsModule = m_scene.RequestModuleInterface<IFriendsModule>(); | 2293 | IFriendsModule friendsModule = m_scene.RequestModuleInterface<IFriendsModule>(); |
2294 | if (friendsModule != null) | 2294 | if (friendsModule != null) |
2295 | { | 2295 | { |
2296 | if(gotCrossUpdate) | 2296 | if(gotCrossUpdate) |
2297 | friendsModule.IsNowRoot(this); | 2297 | friendsModule.IsNowRoot(this); |
2298 | else | 2298 | else |
@@ -2331,7 +2331,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2331 | /// <param name="collisionPoint"></param> | 2331 | /// <param name="collisionPoint"></param> |
2332 | /// <param name="localid"></param> | 2332 | /// <param name="localid"></param> |
2333 | /// <param name="distance"></param> | 2333 | /// <param name="distance"></param> |
2334 | /// | 2334 | /// |
2335 | 2335 | ||
2336 | private void checkCameraCollision() | 2336 | private void checkCameraCollision() |
2337 | { | 2337 | { |
@@ -2486,7 +2486,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2486 | 2486 | ||
2487 | // The Agent's Draw distance setting | 2487 | // The Agent's Draw distance setting |
2488 | // When we get to the point of re-computing neighbors everytime this | 2488 | // When we get to the point of re-computing neighbors everytime this |
2489 | // changes, then start using the agent's drawdistance rather than the | 2489 | // changes, then start using the agent's drawdistance rather than the |
2490 | // region's draw distance. | 2490 | // region's draw distance. |
2491 | 2491 | ||
2492 | DrawDistance = agentData.Far; | 2492 | DrawDistance = agentData.Far; |
@@ -2495,7 +2495,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2495 | 2495 | ||
2496 | // FIXME: This does not work as intended because the viewer only sends the lbutton down when the button | 2496 | // FIXME: This does not work as intended because the viewer only sends the lbutton down when the button |
2497 | // is first pressed, not whilst it is held down. If this is required in the future then need to look | 2497 | // is first pressed, not whilst it is held down. If this is required in the future then need to look |
2498 | // for an AGENT_CONTROL_LBUTTON_UP event and make sure to handle cases where an initial DOWN is not | 2498 | // for an AGENT_CONTROL_LBUTTON_UP event and make sure to handle cases where an initial DOWN is not |
2499 | // received (e.g. on holding LMB down on the avatar in a viewer). | 2499 | // received (e.g. on holding LMB down on the avatar in a viewer). |
2500 | m_leftButtonDown = (flags & AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_DOWN) != 0; | 2500 | m_leftButtonDown = (flags & AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_DOWN) != 0; |
2501 | 2501 | ||
@@ -2549,7 +2549,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2549 | 2549 | ||
2550 | if (AllowMovement && !SitGround) | 2550 | if (AllowMovement && !SitGround) |
2551 | { | 2551 | { |
2552 | // m_log.DebugFormat("[SCENE PRESENCE]: Initial body rotation {0} for {1}", agentData.BodyRotation, Name); | 2552 | // m_log.DebugFormat("[SCENE PRESENCE]: Initial body rotation {0} for {1}", agentData.BodyRotation, Name); |
2553 | bool update_rotation = false; | 2553 | bool update_rotation = false; |
2554 | if (agentData.BodyRotation != Rotation) | 2554 | if (agentData.BodyRotation != Rotation) |
2555 | { | 2555 | { |
@@ -2617,7 +2617,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2617 | } | 2617 | } |
2618 | 2618 | ||
2619 | if (((MovementFlag & (uint)DCF) == 0)) | 2619 | if (((MovementFlag & (uint)DCF) == 0)) |
2620 | { | 2620 | { |
2621 | //m_log.DebugFormat("[SCENE PRESENCE]: Updating MovementFlag for {0} with {1}", Name, DCF); | 2621 | //m_log.DebugFormat("[SCENE PRESENCE]: Updating MovementFlag for {0} with {1}", Name, DCF); |
2622 | MovementFlag |= (uint)DCF; | 2622 | MovementFlag |= (uint)DCF; |
2623 | update_movementflag = true; | 2623 | update_movementflag = true; |
@@ -2715,11 +2715,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
2715 | if (m_AngularVelocity.Z != 0) | 2715 | if (m_AngularVelocity.Z != 0) |
2716 | m_AngularVelocity.Z += CalculateFlyingRollResetToZero(FLY_ROLL_RESET_RADIANS_PER_UPDATE); | 2716 | m_AngularVelocity.Z += CalculateFlyingRollResetToZero(FLY_ROLL_RESET_RADIANS_PER_UPDATE); |
2717 | } | 2717 | } |
2718 | 2718 | ||
2719 | /* | 2719 | /* |
2720 | if (Flying && IsColliding && controlland) | 2720 | if (Flying && IsColliding && controlland) |
2721 | { | 2721 | { |
2722 | // nesting this check because LengthSquared() is expensive and we don't | 2722 | // nesting this check because LengthSquared() is expensive and we don't |
2723 | // want to do it every step when flying. | 2723 | // want to do it every step when flying. |
2724 | if ((Velocity.LengthSquared() <= LAND_VELOCITYMAG_MAX)) | 2724 | if ((Velocity.LengthSquared() <= LAND_VELOCITYMAG_MAX)) |
2725 | StopFlying(); | 2725 | StopFlying(); |
@@ -2730,7 +2730,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2730 | else if (IsColliding && agent_control_v3.Z < 0f) | 2730 | else if (IsColliding && agent_control_v3.Z < 0f) |
2731 | agent_control_v3.Z = 0; | 2731 | agent_control_v3.Z = 0; |
2732 | // else if(AgentControlStopActive %% Velocity.Z <0.01f) | 2732 | // else if(AgentControlStopActive %% Velocity.Z <0.01f) |
2733 | 2733 | ||
2734 | 2734 | ||
2735 | // m_log.DebugFormat("[SCENE PRESENCE]: MovementFlag {0} for {1}", MovementFlag, Name); | 2735 | // m_log.DebugFormat("[SCENE PRESENCE]: MovementFlag {0} for {1}", MovementFlag, Name); |
2736 | 2736 | ||
@@ -2738,9 +2738,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2738 | // which occurs later in the main scene loop | 2738 | // which occurs later in the main scene loop |
2739 | // We also need to update if the user rotates their avatar whilst it is slow walking/running (if they | 2739 | // We also need to update if the user rotates their avatar whilst it is slow walking/running (if they |
2740 | // held down AGENT_CONTROL_STOP whilst normal walking/running). However, we do not want to update | 2740 | // held down AGENT_CONTROL_STOP whilst normal walking/running). However, we do not want to update |
2741 | // if the user rotated whilst holding down AGENT_CONTROL_STOP when already still (which locks the | 2741 | // if the user rotated whilst holding down AGENT_CONTROL_STOP when already still (which locks the |
2742 | // avatar location in place). | 2742 | // avatar location in place). |
2743 | if (update_movementflag | 2743 | if (update_movementflag |
2744 | || (update_rotation && DCFlagKeyPressed && (!AgentControlStopActive || MovementFlag != 0))) | 2744 | || (update_rotation && DCFlagKeyPressed && (!AgentControlStopActive || MovementFlag != 0))) |
2745 | { | 2745 | { |
2746 | 2746 | ||
@@ -2810,9 +2810,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2810 | 2810 | ||
2811 | // The Agent's Draw distance setting | 2811 | // The Agent's Draw distance setting |
2812 | // When we get to the point of re-computing neighbors everytime this | 2812 | // When we get to the point of re-computing neighbors everytime this |
2813 | // changes, then start using the agent's drawdistance rather than the | 2813 | // changes, then start using the agent's drawdistance rather than the |
2814 | // region's draw distance. | 2814 | // region's draw distance. |
2815 | 2815 | ||
2816 | DrawDistance = agentData.Far; | 2816 | DrawDistance = agentData.Far; |
2817 | 2817 | ||
2818 | 2818 | ||
@@ -2839,7 +2839,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2839 | 2839 | ||
2840 | TriggerScenePresenceUpdated(); | 2840 | TriggerScenePresenceUpdated(); |
2841 | } | 2841 | } |
2842 | 2842 | ||
2843 | /// <summary> | 2843 | /// <summary> |
2844 | /// Calculate an update to move the presence to the set target. | 2844 | /// Calculate an update to move the presence to the set target. |
2845 | /// </summary> | 2845 | /// </summary> |
@@ -2853,7 +2853,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2853 | // m_log.DebugFormat("[SCENE PRESENCE]: Called HandleMoveToTargetUpdate() for {0}", Name); | 2853 | // m_log.DebugFormat("[SCENE PRESENCE]: Called HandleMoveToTargetUpdate() for {0}", Name); |
2854 | 2854 | ||
2855 | bool updated = false; | 2855 | bool updated = false; |
2856 | 2856 | ||
2857 | Vector3 LocalVectorToTarget3D = MoveToPositionTarget - AbsolutePosition; | 2857 | Vector3 LocalVectorToTarget3D = MoveToPositionTarget - AbsolutePosition; |
2858 | 2858 | ||
2859 | // m_log.DebugFormat( | 2859 | // m_log.DebugFormat( |
@@ -3030,11 +3030,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
3030 | || pos.Y < 0 || pos.Y >= regionSize.Y | 3030 | || pos.Y < 0 || pos.Y >= regionSize.Y |
3031 | || pos.Z < 0) | 3031 | || pos.Z < 0) |
3032 | return; | 3032 | return; |
3033 | 3033 | ||
3034 | float terrainHeight; | 3034 | float terrainHeight; |
3035 | Scene targetScene = m_scene; | 3035 | Scene targetScene = m_scene; |
3036 | terrainHeight = m_scene.GetGroundHeight(pos.X, pos.Y); | 3036 | terrainHeight = m_scene.GetGroundHeight(pos.X, pos.Y); |
3037 | 3037 | ||
3038 | // dont try to land underground | 3038 | // dont try to land underground |
3039 | terrainHeight += Appearance.AvatarHeight * 0.5f + 0.2f; | 3039 | terrainHeight += Appearance.AvatarHeight * 0.5f + 0.2f; |
3040 | 3040 | ||
@@ -3044,7 +3044,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3044 | // m_log.DebugFormat( | 3044 | // m_log.DebugFormat( |
3045 | // "[SCENE PRESENCE]: Avatar {0} set move to target {1} (terrain height {2}) in {3}", | 3045 | // "[SCENE PRESENCE]: Avatar {0} set move to target {1} (terrain height {2}) in {3}", |
3046 | // Name, pos, terrainHeight, m_scene.RegionInfo.RegionName); | 3046 | // Name, pos, terrainHeight, m_scene.RegionInfo.RegionName); |
3047 | 3047 | ||
3048 | if (noFly) | 3048 | if (noFly) |
3049 | Flying = false; | 3049 | Flying = false; |
3050 | else if (pos.Z > terrainHeight || Flying) | 3050 | else if (pos.Z > terrainHeight || Flying) |
@@ -3068,7 +3068,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3068 | 3068 | ||
3069 | Rotation = Quaternion.CreateFromEulers(angle); | 3069 | Rotation = Quaternion.CreateFromEulers(angle); |
3070 | // m_log.DebugFormat("[SCENE PRESENCE]: Body rot for {0} set to {1}", Name, Rotation); | 3070 | // m_log.DebugFormat("[SCENE PRESENCE]: Body rot for {0} set to {1}", Name, Rotation); |
3071 | 3071 | ||
3072 | Vector3 control = Vector3.Zero; | 3072 | Vector3 control = Vector3.Zero; |
3073 | if(HandleMoveToTargetUpdate(1f, ref control)) | 3073 | if(HandleMoveToTargetUpdate(1f, ref control)) |
3074 | AddNewMovement(control); | 3074 | AddNewMovement(control); |
@@ -3162,7 +3162,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3162 | m_pos = standPos; | 3162 | m_pos = standPos; |
3163 | } | 3163 | } |
3164 | 3164 | ||
3165 | // We need to wait until we have calculated proper stand positions before sitting up the physical | 3165 | // We need to wait until we have calculated proper stand positions before sitting up the physical |
3166 | // avatar to avoid race conditions. | 3166 | // avatar to avoid race conditions. |
3167 | if (PhysicsActor == null) | 3167 | if (PhysicsActor == null) |
3168 | AddToPhysicalScene(false); | 3168 | AddToPhysicalScene(false); |
@@ -3178,7 +3178,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3178 | 3178 | ||
3179 | // reset to default sitAnimation | 3179 | // reset to default sitAnimation |
3180 | sitAnimation = "SIT"; | 3180 | sitAnimation = "SIT"; |
3181 | 3181 | ||
3182 | // Animator.TrySetMovementAnimation("STAND"); | 3182 | // Animator.TrySetMovementAnimation("STAND"); |
3183 | Animator.SetMovementAnimations("STAND"); | 3183 | Animator.SetMovementAnimations("STAND"); |
3184 | 3184 | ||
@@ -3244,7 +3244,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3244 | } | 3244 | } |
3245 | else | 3245 | else |
3246 | { | 3246 | { |
3247 | if (PhysicsSit(part,offset)) // physics engine | 3247 | if (PhysicsSit(part,offset)) // physics engine |
3248 | return; | 3248 | return; |
3249 | 3249 | ||
3250 | Vector3 pos = part.AbsolutePosition + offset; | 3250 | Vector3 pos = part.AbsolutePosition + offset; |
@@ -3275,7 +3275,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3275 | 3275 | ||
3276 | cameraAtOffset = part.GetCameraAtOffset(); | 3276 | cameraAtOffset = part.GetCameraAtOffset(); |
3277 | cameraEyeOffset = part.GetCameraEyeOffset(); | 3277 | cameraEyeOffset = part.GetCameraEyeOffset(); |
3278 | 3278 | ||
3279 | forceMouselook = part.GetForceMouselook(); | 3279 | forceMouselook = part.GetForceMouselook(); |
3280 | 3280 | ||
3281 | if (!part.IsRoot) | 3281 | if (!part.IsRoot) |
@@ -3398,7 +3398,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3398 | if (part == null) | 3398 | if (part == null) |
3399 | return; | 3399 | return; |
3400 | 3400 | ||
3401 | Vector3 targetPos = part.GetWorldPosition() + offset * part.GetWorldRotation(); | 3401 | Vector3 targetPos = part.GetWorldPosition() + offset * part.GetWorldRotation(); |
3402 | if(!CanEnterLandPosition(targetPos)) | 3402 | if(!CanEnterLandPosition(targetPos)) |
3403 | { | 3403 | { |
3404 | ControllingClient.SendAlertMessage(" Sit position on restricted land, try another spot"); | 3404 | ControllingClient.SendAlertMessage(" Sit position on restricted land, try another spot"); |
@@ -3530,7 +3530,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3530 | else | 3530 | else |
3531 | { | 3531 | { |
3532 | m = r.X * r.X + r.Y * r.Y + r.Z * r.Z + r.W * r.W; | 3532 | m = r.X * r.X + r.Y * r.Y + r.Z * r.Z + r.W * r.W; |
3533 | 3533 | ||
3534 | if (Math.Abs(1.0 - m) > 0.000001) | 3534 | if (Math.Abs(1.0 - m) > 0.000001) |
3535 | { | 3535 | { |
3536 | if(m != 0) | 3536 | if(m != 0) |
@@ -3554,7 +3554,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3554 | x = 2 * (r.X * r.Z + r.Y * r.W); | 3554 | x = 2 * (r.X * r.Z + r.Y * r.W); |
3555 | y = 2 * (-r.X * r.W + r.Y * r.Z); | 3555 | y = 2 * (-r.X * r.W + r.Y * r.Z); |
3556 | z = -r.X * r.X - r.Y * r.Y + r.Z * r.Z + r.W * r.W; | 3556 | z = -r.X * r.X - r.Y * r.Y + r.Z * r.Z + r.W * r.W; |
3557 | Vector3 up = new Vector3((float)x, (float)y, (float)z); | 3557 | Vector3 up = new Vector3((float)x, (float)y, (float)z); |
3558 | sitOffset = up * Appearance.AvatarHeight * 0.02638f; | 3558 | sitOffset = up * Appearance.AvatarHeight * 0.02638f; |
3559 | newPos = sitTargetPos + sitOffset + SIT_TARGET_ADJUSTMENT; | 3559 | newPos = sitTargetPos + sitOffset + SIT_TARGET_ADJUSTMENT; |
3560 | } | 3560 | } |
@@ -3670,7 +3670,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3670 | public void AddNewMovement(Vector3 vec, float thisAddSpeedModifier = 1, bool breaking = false) | 3670 | public void AddNewMovement(Vector3 vec, float thisAddSpeedModifier = 1, bool breaking = false) |
3671 | { | 3671 | { |
3672 | // m_log.DebugFormat( | 3672 | // m_log.DebugFormat( |
3673 | // "[SCENE PRESENCE]: Adding new movement {0} with rotation {1}, thisAddSpeedModifier {2} for {3}", | 3673 | // "[SCENE PRESENCE]: Adding new movement {0} with rotation {1}, thisAddSpeedModifier {2} for {3}", |
3674 | // vec, Rotation, thisAddSpeedModifier, Name); | 3674 | // vec, Rotation, thisAddSpeedModifier, Name); |
3675 | 3675 | ||
3676 | // rotate from avatar coord space to world | 3676 | // rotate from avatar coord space to world |
@@ -3792,11 +3792,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
3792 | Math.Abs(dpos.X) > POSITION_LARGETOLERANCE || | 3792 | Math.Abs(dpos.X) > POSITION_LARGETOLERANCE || |
3793 | Math.Abs(dpos.Y) > POSITION_LARGETOLERANCE || | 3793 | Math.Abs(dpos.Y) > POSITION_LARGETOLERANCE || |
3794 | Math.Abs(dpos.Z) > POSITION_LARGETOLERANCE || | 3794 | Math.Abs(dpos.Z) > POSITION_LARGETOLERANCE || |
3795 | 3795 | ||
3796 | ( (Math.Abs(dpos.X) > POSITION_SMALLTOLERANCE || | 3796 | ( (Math.Abs(dpos.X) > POSITION_SMALLTOLERANCE || |
3797 | Math.Abs(dpos.Y) > POSITION_SMALLTOLERANCE || | 3797 | Math.Abs(dpos.Y) > POSITION_SMALLTOLERANCE || |
3798 | Math.Abs(dpos.Z) > POSITION_SMALLTOLERANCE) | 3798 | Math.Abs(dpos.Z) > POSITION_SMALLTOLERANCE) |
3799 | && vel.LengthSquared() < LOWVELOCITYSQ | 3799 | && vel.LengthSquared() < LOWVELOCITYSQ |
3800 | )) | 3800 | )) |
3801 | { | 3801 | { |
3802 | */ | 3802 | */ |
@@ -3833,7 +3833,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3833 | } | 3833 | } |
3834 | 3834 | ||
3835 | // this is diferente from SendTerseUpdateToClient | 3835 | // this is diferente from SendTerseUpdateToClient |
3836 | // this sends bypassing entities updates | 3836 | // this sends bypassing entities updates |
3837 | public void SendAgentTerseUpdate(ISceneEntity p) | 3837 | public void SendAgentTerseUpdate(ISceneEntity p) |
3838 | { | 3838 | { |
3839 | ControllingClient.SendAgentTerseUpdate(p); | 3839 | ControllingClient.SendAgentTerseUpdate(p); |
@@ -3982,7 +3982,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3982 | 3982 | ||
3983 | p.SendAppearanceToAgentNF(this); | 3983 | p.SendAppearanceToAgentNF(this); |
3984 | p.SendAnimPackToAgentNF(this); | 3984 | p.SendAnimPackToAgentNF(this); |
3985 | p.SendAttachmentsToAgentNF(this); | 3985 | p.SendAttachmentsToAgentNF(this); |
3986 | count++; | 3986 | count++; |
3987 | }); | 3987 | }); |
3988 | 3988 | ||
@@ -3991,7 +3991,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3991 | 3991 | ||
3992 | /// <summary> | 3992 | /// <summary> |
3993 | /// Send this agent's avatar data to all other root and child agents in the scene | 3993 | /// Send this agent's avatar data to all other root and child agents in the scene |
3994 | /// This agent must be root. This avatar will receive its own update. | 3994 | /// This agent must be root. This avatar will receive its own update. |
3995 | /// </summary> | 3995 | /// </summary> |
3996 | public void SendAvatarDataToAllAgents() | 3996 | public void SendAvatarDataToAllAgents() |
3997 | { | 3997 | { |
@@ -4222,7 +4222,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4222 | posLastMove = pos; | 4222 | posLastMove = pos; |
4223 | m_scene.EventManager.TriggerOnClientMovement(this); | 4223 | m_scene.EventManager.TriggerOnClientMovement(this); |
4224 | } | 4224 | } |
4225 | 4225 | ||
4226 | diff = pos - posLastSignificantMove; | 4226 | diff = pos - posLastSignificantMove; |
4227 | if (diff.LengthSquared() > SIGNIFICANT_MOVEMENT) | 4227 | if (diff.LengthSquared() > SIGNIFICANT_MOVEMENT) |
4228 | { | 4228 | { |
@@ -4235,18 +4235,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
4235 | 4235 | ||
4236 | if(childUpdatesBusy) | 4236 | if(childUpdatesBusy) |
4237 | return; | 4237 | return; |
4238 | 4238 | ||
4239 | //possible KnownRegionHandles always contains current region and this check is not needed | 4239 | //possible KnownRegionHandles always contains current region and this check is not needed |
4240 | int minhandles = 0; | 4240 | int minhandles = 0; |
4241 | if(KnownRegionHandles.Contains(RegionHandle)) | 4241 | if(KnownRegionHandles.Contains(RegionHandle)) |
4242 | minhandles++; | 4242 | minhandles++; |
4243 | 4243 | ||
4244 | if(KnownRegionHandles.Count > minhandles) | 4244 | if(KnownRegionHandles.Count > minhandles) |
4245 | { | 4245 | { |
4246 | int tdiff = Util.EnvironmentTickCountSubtract(lastChildUpdatesTime); | 4246 | int tdiff = Util.EnvironmentTickCountSubtract(lastChildUpdatesTime); |
4247 | if(tdiff > CHILDUPDATES_TIME) | 4247 | if(tdiff > CHILDUPDATES_TIME) |
4248 | { | 4248 | { |
4249 | diff = pos - m_lastChildAgentUpdatePosition; | 4249 | diff = pos - m_lastChildAgentUpdatePosition; |
4250 | if (diff.LengthSquared() > CHILDUPDATES_MOVEMENT) | 4250 | if (diff.LengthSquared() > CHILDUPDATES_MOVEMENT) |
4251 | { | 4251 | { |
4252 | childUpdatesBusy = true; | 4252 | childUpdatesBusy = true; |
@@ -4268,7 +4268,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4268 | Util.FireAndForget( | 4268 | Util.FireAndForget( |
4269 | o => | 4269 | o => |
4270 | { | 4270 | { |
4271 | m_scene.SendOutChildAgentUpdates(agentpos, this); | 4271 | m_scene.SendOutChildAgentUpdates(agentpos, this); |
4272 | lastChildUpdatesTime = Util.EnvironmentTickCount(); | 4272 | lastChildUpdatesTime = Util.EnvironmentTickCount(); |
4273 | childUpdatesBusy = false; | 4273 | childUpdatesBusy = false; |
4274 | }, null, "ScenePresence.SendOutChildAgentUpdates"); | 4274 | }, null, "ScenePresence.SendOutChildAgentUpdates"); |
@@ -4309,7 +4309,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4309 | pos2.Z += vel.Z * timeStep; | 4309 | pos2.Z += vel.Z * timeStep; |
4310 | 4310 | ||
4311 | // m_log.DebugFormat( | 4311 | // m_log.DebugFormat( |
4312 | // "[SCENE PRESENCE]: Testing border check for projected position {0} of {1} in {2}", | 4312 | // "[SCENE PRESENCE]: Testing border check for projected position {0} of {1} in {2}", |
4313 | // pos2, Name, Scene.Name); | 4313 | // pos2, Name, Scene.Name); |
4314 | 4314 | ||
4315 | if (Scene.PositionIsInCurrentRegion(pos2)) | 4315 | if (Scene.PositionIsInCurrentRegion(pos2)) |
@@ -4399,7 +4399,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4399 | // m_log.DebugFormat("[SCENE PRESENCE]: Resetting {0} in {1}", Name, Scene.RegionInfo.RegionName); | 4399 | // m_log.DebugFormat("[SCENE PRESENCE]: Resetting {0} in {1}", Name, Scene.RegionInfo.RegionName); |
4400 | 4400 | ||
4401 | // Put the child agent back at the center | 4401 | // Put the child agent back at the center |
4402 | AbsolutePosition | 4402 | AbsolutePosition |
4403 | = new Vector3(((float)m_scene.RegionInfo.RegionSizeX * 0.5f), ((float)m_scene.RegionInfo.RegionSizeY * 0.5f), 70); | 4403 | = new Vector3(((float)m_scene.RegionInfo.RegionSizeX * 0.5f), ((float)m_scene.RegionInfo.RegionSizeY * 0.5f), 70); |
4404 | 4404 | ||
4405 | Animator.ResetAnimations(); | 4405 | Animator.ResetAnimations(); |
@@ -4511,7 +4511,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4511 | public void GrantGodlikePowers(UUID token, bool godStatus) | 4511 | public void GrantGodlikePowers(UUID token, bool godStatus) |
4512 | { | 4512 | { |
4513 | int oldgodlevel = GodLevel; | 4513 | int oldgodlevel = GodLevel; |
4514 | 4514 | ||
4515 | if (godStatus && !isNPC && m_scene.Permissions.IsGod(UUID)) | 4515 | if (godStatus && !isNPC && m_scene.Permissions.IsGod(UUID)) |
4516 | { | 4516 | { |
4517 | GodLevel = 200; | 4517 | GodLevel = 200; |
@@ -4519,7 +4519,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4519 | GodLevel = UserLevel; | 4519 | GodLevel = UserLevel; |
4520 | } | 4520 | } |
4521 | else | 4521 | else |
4522 | GodLevel = 0; | 4522 | GodLevel = 0; |
4523 | 4523 | ||
4524 | ControllingClient.SendAdminResponse(token, (uint)GodLevel); | 4524 | ControllingClient.SendAdminResponse(token, (uint)GodLevel); |
4525 | if(oldgodlevel != GodLevel) | 4525 | if(oldgodlevel != GodLevel) |
@@ -4535,7 +4535,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4535 | return; | 4535 | return; |
4536 | 4536 | ||
4537 | CopyFrom(cAgentData); | 4537 | CopyFrom(cAgentData); |
4538 | 4538 | ||
4539 | } | 4539 | } |
4540 | 4540 | ||
4541 | private static Vector3 marker = new Vector3(-1f, -1f, -1f); | 4541 | private static Vector3 marker = new Vector3(-1f, -1f, -1f); |
@@ -4621,7 +4621,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4621 | 4621 | ||
4622 | cAgent.Far = DrawDistance; | 4622 | cAgent.Far = DrawDistance; |
4623 | 4623 | ||
4624 | // Throttles | 4624 | // Throttles |
4625 | cAgent.Throttles = ControllingClient.GetThrottlesPacked(1); | 4625 | cAgent.Throttles = ControllingClient.GetThrottlesPacked(1); |
4626 | 4626 | ||
4627 | cAgent.HeadRotation = m_headrotation; | 4627 | cAgent.HeadRotation = m_headrotation; |
@@ -4630,7 +4630,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4630 | 4630 | ||
4631 | if (GodLevel > 200 && m_scene.Permissions.IsGod(cAgent.AgentID)) | 4631 | if (GodLevel > 200 && m_scene.Permissions.IsGod(cAgent.AgentID)) |
4632 | cAgent.GodLevel = (byte)GodLevel; | 4632 | cAgent.GodLevel = (byte)GodLevel; |
4633 | else | 4633 | else |
4634 | cAgent.GodLevel = (byte) 0; | 4634 | cAgent.GodLevel = (byte) 0; |
4635 | 4635 | ||
4636 | cAgent.AlwaysRun = SetAlwaysRun; | 4636 | cAgent.AlwaysRun = SetAlwaysRun; |
@@ -4640,7 +4640,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4640 | 4640 | ||
4641 | cAgent.ParentPart = ParentUUID; | 4641 | cAgent.ParentPart = ParentUUID; |
4642 | cAgent.SitOffset = PrevSitOffset; | 4642 | cAgent.SitOffset = PrevSitOffset; |
4643 | 4643 | ||
4644 | lock (scriptedcontrols) | 4644 | lock (scriptedcontrols) |
4645 | { | 4645 | { |
4646 | ControllerData[] controls = new ControllerData[scriptedcontrols.Count]; | 4646 | ControllerData[] controls = new ControllerData[scriptedcontrols.Count]; |
@@ -4675,7 +4675,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4675 | cAgent.CrossingFlags |= 1; | 4675 | cAgent.CrossingFlags |= 1; |
4676 | } | 4676 | } |
4677 | else | 4677 | else |
4678 | cAgent.CrossingFlags = 0; | 4678 | cAgent.CrossingFlags = 0; |
4679 | 4679 | ||
4680 | if(isCrossUpdate) | 4680 | if(isCrossUpdate) |
4681 | { | 4681 | { |
@@ -4708,7 +4708,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4708 | PrevSitOffset = cAgent.SitOffset; | 4708 | PrevSitOffset = cAgent.SitOffset; |
4709 | 4709 | ||
4710 | // When we get to the point of re-computing neighbors everytime this | 4710 | // When we get to the point of re-computing neighbors everytime this |
4711 | // changes, then start using the agent's drawdistance rather than the | 4711 | // changes, then start using the agent's drawdistance rather than the |
4712 | // region's draw distance. | 4712 | // region's draw distance. |
4713 | DrawDistance = cAgent.Far; | 4713 | DrawDistance = cAgent.Far; |
4714 | //DrawDistance = Scene.DefaultDrawDistance; | 4714 | //DrawDistance = Scene.DefaultDrawDistance; |
@@ -4727,7 +4727,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4727 | 4727 | ||
4728 | m_headrotation = cAgent.HeadRotation; | 4728 | m_headrotation = cAgent.HeadRotation; |
4729 | Rotation = cAgent.BodyRotation; | 4729 | Rotation = cAgent.BodyRotation; |
4730 | m_AgentControlFlags = (AgentManager.ControlFlags)cAgent.ControlFlags; | 4730 | m_AgentControlFlags = (AgentManager.ControlFlags)cAgent.ControlFlags; |
4731 | 4731 | ||
4732 | if (cAgent.GodLevel >200 && m_scene.Permissions.IsGod(cAgent.AgentID)) | 4732 | if (cAgent.GodLevel >200 && m_scene.Permissions.IsGod(cAgent.AgentID)) |
4733 | GodLevel = cAgent.GodLevel; | 4733 | GodLevel = cAgent.GodLevel; |
@@ -4738,14 +4738,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
4738 | 4738 | ||
4739 | Appearance = new AvatarAppearance(cAgent.Appearance); | 4739 | Appearance = new AvatarAppearance(cAgent.Appearance); |
4740 | /* | 4740 | /* |
4741 | bool isFlying = ((m_AgentControlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0); | 4741 | bool isFlying = ((m_AgentControlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0); |
4742 | 4742 | ||
4743 | if (PhysicsActor != null) | 4743 | if (PhysicsActor != null) |
4744 | { | 4744 | { |
4745 | RemoveFromPhysicalScene(); | 4745 | RemoveFromPhysicalScene(); |
4746 | AddToPhysicalScene(isFlying); | 4746 | AddToPhysicalScene(isFlying); |
4747 | } | 4747 | } |
4748 | */ | 4748 | */ |
4749 | try | 4749 | try |
4750 | { | 4750 | { |
4751 | lock (scriptedcontrols) | 4751 | lock (scriptedcontrols) |
@@ -4800,7 +4800,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4800 | ControllingClient.ActiveGroupId = cAgent.ActiveGroupID; | 4800 | ControllingClient.ActiveGroupId = cAgent.ActiveGroupID; |
4801 | ControllingClient.ActiveGroupName = cAgent.ActiveGroupName; | 4801 | ControllingClient.ActiveGroupName = cAgent.ActiveGroupName; |
4802 | Grouptitle = cAgent.ActiveGroupTitle; | 4802 | Grouptitle = cAgent.ActiveGroupTitle; |
4803 | ControllingClient.ActiveGroupPowers = | 4803 | ControllingClient.ActiveGroupPowers = |
4804 | ControllingClient.GetGroupPowers(cAgent.ActiveGroupID); | 4804 | ControllingClient.GetGroupPowers(cAgent.ActiveGroupID); |
4805 | } | 4805 | } |
4806 | else | 4806 | else |
@@ -4871,7 +4871,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4871 | // m_forceToApplyValid = false; | 4871 | // m_forceToApplyValid = false; |
4872 | 4872 | ||
4873 | PhysicsScene scene = m_scene.PhysicsScene; | 4873 | PhysicsScene scene = m_scene.PhysicsScene; |
4874 | Vector3 pVec = AbsolutePosition; | 4874 | Vector3 pVec = AbsolutePosition; |
4875 | 4875 | ||
4876 | PhysicsActor = scene.AddAvatar( | 4876 | PhysicsActor = scene.AddAvatar( |
4877 | LocalId, Firstname + "." + Lastname, pVec, | 4877 | LocalId, Firstname + "." + Lastname, pVec, |
@@ -5007,7 +5007,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5007 | } | 5007 | } |
5008 | else | 5008 | else |
5009 | { | 5009 | { |
5010 | 5010 | ||
5011 | } | 5011 | } |
5012 | } | 5012 | } |
5013 | 5013 | ||
@@ -5040,13 +5040,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
5040 | { | 5040 | { |
5041 | // Clear known regions | 5041 | // Clear known regions |
5042 | KnownRegions = new Dictionary<ulong, string>(); | 5042 | KnownRegions = new Dictionary<ulong, string>(); |
5043 | 5043 | ||
5044 | // I don't get it but mono crashes when you try to dispose of this timer, | 5044 | // I don't get it but mono crashes when you try to dispose of this timer, |
5045 | // unsetting the elapsed callback should be enough to allow for cleanup however. | 5045 | // unsetting the elapsed callback should be enough to allow for cleanup however. |
5046 | // m_reprioritizationTimer.Dispose(); | 5046 | // m_reprioritizationTimer.Dispose(); |
5047 | 5047 | ||
5048 | RemoveFromPhysicalScene(); | 5048 | RemoveFromPhysicalScene(); |
5049 | 5049 | ||
5050 | m_scene.EventManager.OnRegionHeartbeatEnd -= RegionHeartbeatEnd; | 5050 | m_scene.EventManager.OnRegionHeartbeatEnd -= RegionHeartbeatEnd; |
5051 | RemoveClientEvents(); | 5051 | RemoveClientEvents(); |
5052 | 5052 | ||
@@ -5106,7 +5106,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5106 | } | 5106 | } |
5107 | } | 5107 | } |
5108 | } | 5108 | } |
5109 | 5109 | ||
5110 | return attachments; | 5110 | return attachments; |
5111 | } | 5111 | } |
5112 | 5112 | ||
@@ -5269,7 +5269,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5269 | foreach (SceneObjectGroup sog in m_attachments) | 5269 | foreach (SceneObjectGroup sog in m_attachments) |
5270 | { | 5270 | { |
5271 | SendAttachmentFullUpdateToAgentNF(sog, p); | 5271 | SendAttachmentFullUpdateToAgentNF(sog, p); |
5272 | } | 5272 | } |
5273 | } | 5273 | } |
5274 | } | 5274 | } |
5275 | 5275 | ||
@@ -5689,14 +5689,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
5689 | return; | 5689 | return; |
5690 | if(objectID == m_scene.RegionInfo.RegionID) // for all objects | 5690 | if(objectID == m_scene.RegionInfo.RegionID) // for all objects |
5691 | { | 5691 | { |
5692 | 5692 | ||
5693 | } | 5693 | } |
5694 | else | 5694 | else |
5695 | { | 5695 | { |
5696 | SceneObjectPart part = m_scene.GetSceneObjectPart(objectID); | 5696 | SceneObjectPart part = m_scene.GetSceneObjectPart(objectID); |
5697 | if(part != null) | 5697 | if(part != null) |
5698 | { | 5698 | { |
5699 | 5699 | ||
5700 | } | 5700 | } |
5701 | } | 5701 | } |
5702 | } | 5702 | } |
@@ -5759,7 +5759,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5759 | return; | 5759 | return; |
5760 | 5760 | ||
5761 | ScriptControlled allflags = ScriptControlled.CONTROL_ZERO; | 5761 | ScriptControlled allflags = ScriptControlled.CONTROL_ZERO; |
5762 | 5762 | ||
5763 | if (MouseDown) | 5763 | if (MouseDown) |
5764 | { | 5764 | { |
5765 | allflags = LastCommands & (ScriptControlled.CONTROL_ML_LBUTTON | ScriptControlled.CONTROL_LBUTTON); | 5765 | allflags = LastCommands & (ScriptControlled.CONTROL_ML_LBUTTON | ScriptControlled.CONTROL_LBUTTON); |
@@ -5769,35 +5769,35 @@ namespace OpenSim.Region.Framework.Scenes | |||
5769 | MouseDown = true; | 5769 | MouseDown = true; |
5770 | } | 5770 | } |
5771 | } | 5771 | } |
5772 | 5772 | ||
5773 | if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_ML_LBUTTON_DOWN) != 0) | 5773 | if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_ML_LBUTTON_DOWN) != 0) |
5774 | { | 5774 | { |
5775 | allflags |= ScriptControlled.CONTROL_ML_LBUTTON; | 5775 | allflags |= ScriptControlled.CONTROL_ML_LBUTTON; |
5776 | MouseDown = true; | 5776 | MouseDown = true; |
5777 | } | 5777 | } |
5778 | 5778 | ||
5779 | if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_DOWN) != 0) | 5779 | if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_DOWN) != 0) |
5780 | { | 5780 | { |
5781 | allflags |= ScriptControlled.CONTROL_LBUTTON; | 5781 | allflags |= ScriptControlled.CONTROL_LBUTTON; |
5782 | MouseDown = true; | 5782 | MouseDown = true; |
5783 | } | 5783 | } |
5784 | 5784 | ||
5785 | // find all activated controls, whether the scripts are interested in them or not | 5785 | // find all activated controls, whether the scripts are interested in them or not |
5786 | if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_POS) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS) != 0) | 5786 | if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_POS) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS) != 0) |
5787 | { | 5787 | { |
5788 | allflags |= ScriptControlled.CONTROL_FWD; | 5788 | allflags |= ScriptControlled.CONTROL_FWD; |
5789 | } | 5789 | } |
5790 | 5790 | ||
5791 | if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG) != 0) | 5791 | if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG) != 0) |
5792 | { | 5792 | { |
5793 | allflags |= ScriptControlled.CONTROL_BACK; | 5793 | allflags |= ScriptControlled.CONTROL_BACK; |
5794 | } | 5794 | } |
5795 | 5795 | ||
5796 | if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_POS) != 0) | 5796 | if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_POS) != 0) |
5797 | { | 5797 | { |
5798 | allflags |= ScriptControlled.CONTROL_UP; | 5798 | allflags |= ScriptControlled.CONTROL_UP; |
5799 | } | 5799 | } |
5800 | 5800 | ||
5801 | if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG) != 0) | 5801 | if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG) != 0) |
5802 | { | 5802 | { |
5803 | allflags |= ScriptControlled.CONTROL_DOWN; | 5803 | allflags |= ScriptControlled.CONTROL_DOWN; |
@@ -5807,17 +5807,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
5807 | { | 5807 | { |
5808 | allflags |= ScriptControlled.CONTROL_LEFT; | 5808 | allflags |= ScriptControlled.CONTROL_LEFT; |
5809 | } | 5809 | } |
5810 | 5810 | ||
5811 | if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_NEG) != 0) | 5811 | if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_NEG) != 0) |
5812 | { | 5812 | { |
5813 | allflags |= ScriptControlled.CONTROL_RIGHT; | 5813 | allflags |= ScriptControlled.CONTROL_RIGHT; |
5814 | } | 5814 | } |
5815 | 5815 | ||
5816 | if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_YAW_NEG) != 0) | 5816 | if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_YAW_NEG) != 0) |
5817 | { | 5817 | { |
5818 | allflags |= ScriptControlled.CONTROL_ROT_RIGHT; | 5818 | allflags |= ScriptControlled.CONTROL_ROT_RIGHT; |
5819 | } | 5819 | } |
5820 | 5820 | ||
5821 | if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_YAW_POS) != 0) | 5821 | if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_YAW_POS) != 0) |
5822 | { | 5822 | { |
5823 | allflags |= ScriptControlled.CONTROL_ROT_LEFT; | 5823 | allflags |= ScriptControlled.CONTROL_ROT_LEFT; |
@@ -5830,7 +5830,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5830 | { | 5830 | { |
5831 | UUID scriptUUID = kvp.Key; | 5831 | UUID scriptUUID = kvp.Key; |
5832 | ScriptControllers scriptControlData = kvp.Value; | 5832 | ScriptControllers scriptControlData = kvp.Value; |
5833 | 5833 | ||
5834 | ScriptControlled localHeld = allflags & scriptControlData.eventControls; // the flags interesting for us | 5834 | ScriptControlled localHeld = allflags & scriptControlData.eventControls; // the flags interesting for us |
5835 | ScriptControlled localLast = LastCommands & scriptControlData.eventControls; // the activated controls in the last cycle | 5835 | ScriptControlled localLast = LastCommands & scriptControlData.eventControls; // the activated controls in the last cycle |
5836 | ScriptControlled localChange = localHeld ^ localLast; // the changed bits | 5836 | ScriptControlled localChange = localHeld ^ localLast; // the changed bits |
@@ -5842,7 +5842,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5842 | } | 5842 | } |
5843 | } | 5843 | } |
5844 | } | 5844 | } |
5845 | 5845 | ||
5846 | LastCommands = allflags; | 5846 | LastCommands = allflags; |
5847 | } | 5847 | } |
5848 | } | 5848 | } |
@@ -5885,7 +5885,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5885 | } | 5885 | } |
5886 | 5886 | ||
5887 | // returns true it local teleport allowed and sets the destiny position into pos | 5887 | // returns true it local teleport allowed and sets the destiny position into pos |
5888 | 5888 | ||
5889 | private bool CheckLocalTPLandingPoint(ref Vector3 pos) | 5889 | private bool CheckLocalTPLandingPoint(ref Vector3 pos) |
5890 | { | 5890 | { |
5891 | // Never constrain lures | 5891 | // Never constrain lures |
@@ -5930,7 +5930,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5930 | spawnPos = spawnPoints[0].GetLocation(hubPos, hubRot); | 5930 | spawnPos = spawnPoints[0].GetLocation(hubPos, hubRot); |
5931 | spawnDistSQ = Vector3.DistanceSquared(spawnPos, pos); | 5931 | spawnDistSQ = Vector3.DistanceSquared(spawnPos, pos); |
5932 | 5932 | ||
5933 | float testDistSQ; | 5933 | float testDistSQ; |
5934 | Vector3 testSpawnPos; | 5934 | Vector3 testSpawnPos; |
5935 | for(int i = 1; i< spawnPoints.Length; i++) | 5935 | for(int i = 1; i< spawnPoints.Length; i++) |
5936 | { | 5936 | { |
@@ -5960,7 +5960,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5960 | 5960 | ||
5961 | ILandObject land = m_scene.LandChannel.GetLandObject(pos.X, pos.Y); | 5961 | ILandObject land = m_scene.LandChannel.GetLandObject(pos.X, pos.Y); |
5962 | 5962 | ||
5963 | if (land.LandData.LandingType != (byte)LandingType.LandingPoint | 5963 | if (land.LandData.LandingType != (byte)LandingType.LandingPoint |
5964 | || land.LandData.OwnerID == m_uuid) | 5964 | || land.LandData.OwnerID == m_uuid) |
5965 | return true; | 5965 | return true; |
5966 | 5966 | ||
@@ -5978,7 +5978,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5978 | return true; | 5978 | return true; |
5979 | } | 5979 | } |
5980 | 5980 | ||
5981 | const TeleportFlags TeleHubTPFlags = TeleportFlags.ViaLogin | 5981 | const TeleportFlags TeleHubTPFlags = TeleportFlags.ViaLogin |
5982 | | TeleportFlags.ViaHGLogin | TeleportFlags.ViaLocation; | 5982 | | TeleportFlags.ViaHGLogin | TeleportFlags.ViaLocation; |
5983 | 5983 | ||
5984 | private bool CheckAndAdjustTelehub(SceneObjectGroup telehub, ref Vector3 pos, ref bool positionChanged) | 5984 | private bool CheckAndAdjustTelehub(SceneObjectGroup telehub, ref Vector3 pos, ref bool positionChanged) |
@@ -6011,7 +6011,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
6011 | bool selected = false; | 6011 | bool selected = false; |
6012 | bool validhub = false; | 6012 | bool validhub = false; |
6013 | Vector3 spawnPosition; | 6013 | Vector3 spawnPosition; |
6014 | 6014 | ||
6015 | Quaternion teleHubRotation = telehub.GroupRotation; | 6015 | Quaternion teleHubRotation = telehub.GroupRotation; |
6016 | 6016 | ||
6017 | switch(m_scene.SpawnPointRouting) | 6017 | switch(m_scene.SpawnPointRouting) |
@@ -6033,14 +6033,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
6033 | 6033 | ||
6034 | if(tries <= 0) | 6034 | if(tries <= 0) |
6035 | goto case "sequence"; | 6035 | goto case "sequence"; |
6036 | 6036 | ||
6037 | pos = spawnPosition; | 6037 | pos = spawnPosition; |
6038 | return true; | 6038 | return true; |
6039 | 6039 | ||
6040 | case "sequence": | 6040 | case "sequence": |
6041 | tries = spawnPoints.Length; | 6041 | tries = spawnPoints.Length; |
6042 | selected = false; | 6042 | selected = false; |
6043 | validhub = false; | 6043 | validhub = false; |
6044 | do | 6044 | do |
6045 | { | 6045 | { |
6046 | index = m_scene.SpawnPoint(); | 6046 | index = m_scene.SpawnPoint(); |
@@ -6092,7 +6092,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
6092 | closest = i; | 6092 | closest = i; |
6093 | } | 6093 | } |
6094 | 6094 | ||
6095 | if(!validhub) | 6095 | if(!validhub) |
6096 | return false; | 6096 | return false; |
6097 | 6097 | ||
6098 | if(closest < 0) | 6098 | if(closest < 0) |
@@ -6437,28 +6437,28 @@ namespace OpenSim.Region.Framework.Scenes | |||
6437 | } | 6437 | } |
6438 | 6438 | ||
6439 | private void TeleportFlagsDebug() { | 6439 | private void TeleportFlagsDebug() { |
6440 | 6440 | ||
6441 | // Some temporary debugging help to show all the TeleportFlags we have... | 6441 | // Some temporary debugging help to show all the TeleportFlags we have... |
6442 | bool HG = false; | 6442 | bool HG = false; |
6443 | if((m_teleportFlags & TeleportFlags.ViaHGLogin) == TeleportFlags.ViaHGLogin) | 6443 | if((m_teleportFlags & TeleportFlags.ViaHGLogin) == TeleportFlags.ViaHGLogin) |
6444 | HG = true; | 6444 | HG = true; |
6445 | 6445 | ||
6446 | m_log.InfoFormat("[SCENE PRESENCE]: TELEPORT ******************"); | 6446 | m_log.InfoFormat("[SCENE PRESENCE]: TELEPORT ******************"); |
6447 | 6447 | ||
6448 | uint i = 0u; | 6448 | uint i = 0u; |
6449 | for (int x = 0; x <= 30 ; x++, i = 1u << x) | 6449 | for (int x = 0; x <= 30 ; x++, i = 1u << x) |
6450 | { | 6450 | { |
6451 | i = 1u << x; | 6451 | i = 1u << x; |
6452 | 6452 | ||
6453 | if((m_teleportFlags & (TeleportFlags)i) == (TeleportFlags)i) | 6453 | if((m_teleportFlags & (TeleportFlags)i) == (TeleportFlags)i) |
6454 | if (HG == false) | 6454 | if (HG == false) |
6455 | m_log.InfoFormat("[SCENE PRESENCE]: Teleport Flags include {0}", ((TeleportFlags) i).ToString()); | 6455 | m_log.InfoFormat("[SCENE PRESENCE]: Teleport Flags include {0}", ((TeleportFlags) i).ToString()); |
6456 | else | 6456 | else |
6457 | m_log.InfoFormat("[SCENE PRESENCE]: HG Teleport Flags include {0}", ((TeleportFlags)i).ToString()); | 6457 | m_log.InfoFormat("[SCENE PRESENCE]: HG Teleport Flags include {0}", ((TeleportFlags)i).ToString()); |
6458 | } | 6458 | } |
6459 | 6459 | ||
6460 | m_log.InfoFormat("[SCENE PRESENCE]: TELEPORT ******************"); | 6460 | m_log.InfoFormat("[SCENE PRESENCE]: TELEPORT ******************"); |
6461 | 6461 | ||
6462 | } | 6462 | } |
6463 | 6463 | ||
6464 | private void parcelGodCheck(UUID currentParcelID, bool isGod) | 6464 | private void parcelGodCheck(UUID currentParcelID, bool isGod) |
@@ -6509,7 +6509,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
6509 | 6509 | ||
6510 | // those on not on parcel see me | 6510 | // those on not on parcel see me |
6511 | if (currentParcelID != p.currentParcelUUID) | 6511 | if (currentParcelID != p.currentParcelUUID) |
6512 | { | 6512 | { |
6513 | viewsToSendto.Add(p); // they see me | 6513 | viewsToSendto.Add(p); // they see me |
6514 | } | 6514 | } |
6515 | } | 6515 | } |
@@ -6584,7 +6584,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
6584 | } | 6584 | } |
6585 | } | 6585 | } |
6586 | allpresences.Clear(); | 6586 | allpresences.Clear(); |
6587 | } // now on a private parcel end | 6587 | } // now on a private parcel end |
6588 | 6588 | ||
6589 | else | 6589 | else |
6590 | { | 6590 | { |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresenceStateMachine.cs b/OpenSim/Region/Framework/Scenes/ScenePresenceStateMachine.cs index cae7fe5..e7b09ea 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresenceStateMachine.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresenceStateMachine.cs | |||
@@ -40,7 +40,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
40 | /// Running => PreRemove, Removing | 40 | /// Running => PreRemove, Removing |
41 | /// PreRemove => Running, Removing | 41 | /// PreRemove => Running, Removing |
42 | /// Removing => Removed | 42 | /// Removing => Removed |
43 | /// | 43 | /// |
44 | /// All other methods should only see the scene presence in running state - this is the normal operational state | 44 | /// All other methods should only see the scene presence in running state - this is the normal operational state |
45 | /// Removed state occurs when the presence has been removed. This is the end state with no exit. | 45 | /// Removed state occurs when the presence has been removed. This is the end state with no exit. |
46 | /// </remarks> | 46 | /// </remarks> |
@@ -89,13 +89,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
89 | else if (newState == ScenePresenceState.PreRemove && m_state == ScenePresenceState.Running) | 89 | else if (newState == ScenePresenceState.PreRemove && m_state == ScenePresenceState.Running) |
90 | transitionOkay = true; | 90 | transitionOkay = true; |
91 | else if (newState == ScenePresenceState.Removing) | 91 | else if (newState == ScenePresenceState.Removing) |
92 | { | 92 | { |
93 | if (m_state == ScenePresenceState.Running || m_state == ScenePresenceState.PreRemove) | 93 | if (m_state == ScenePresenceState.Running || m_state == ScenePresenceState.PreRemove) |
94 | transitionOkay = true; | 94 | transitionOkay = true; |
95 | } | 95 | } |
96 | else if (newState == ScenePresenceState.Removed && m_state == ScenePresenceState.Removing) | 96 | else if (newState == ScenePresenceState.Removed && m_state == ScenePresenceState.Removing) |
97 | transitionOkay = true; | 97 | transitionOkay = true; |
98 | } | 98 | } |
99 | 99 | ||
100 | if (!transitionOkay) | 100 | if (!transitionOkay) |
101 | { | 101 | { |
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs index 998789d..7f7977e 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs | |||
@@ -68,54 +68,54 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
68 | /// </param> | 68 | /// </param> |
69 | /// <returns></returns> | 69 | /// <returns></returns> |
70 | public static string ToXml(CoalescedSceneObjects coa, bool doScriptStates) | 70 | public static string ToXml(CoalescedSceneObjects coa, bool doScriptStates) |
71 | { | 71 | { |
72 | using (StringWriter sw = new StringWriter()) | 72 | using (StringWriter sw = new StringWriter()) |
73 | { | 73 | { |
74 | using (XmlTextWriter writer = new XmlTextWriter(sw)) | 74 | using (XmlTextWriter writer = new XmlTextWriter(sw)) |
75 | { | 75 | { |
76 | Vector3 size; | 76 | Vector3 size; |
77 | 77 | ||
78 | List<SceneObjectGroup> coaObjects = coa.Objects; | 78 | List<SceneObjectGroup> coaObjects = coa.Objects; |
79 | 79 | ||
80 | // m_log.DebugFormat( | 80 | // m_log.DebugFormat( |
81 | // "[COALESCED SCENE OBJECTS SERIALIZER]: Writing {0} objects for coalesced object", | 81 | // "[COALESCED SCENE OBJECTS SERIALIZER]: Writing {0} objects for coalesced object", |
82 | // coaObjects.Count); | 82 | // coaObjects.Count); |
83 | 83 | ||
84 | // This is weak - we're relying on the set of coalesced objects still being identical | 84 | // This is weak - we're relying on the set of coalesced objects still being identical |
85 | Vector3[] offsets = coa.GetSizeAndOffsets(out size); | 85 | Vector3[] offsets = coa.GetSizeAndOffsets(out size); |
86 | 86 | ||
87 | writer.WriteStartElement("CoalescedObject"); | 87 | writer.WriteStartElement("CoalescedObject"); |
88 | 88 | ||
89 | writer.WriteAttributeString("x", size.X.ToString()); | 89 | writer.WriteAttributeString("x", size.X.ToString()); |
90 | writer.WriteAttributeString("y", size.Y.ToString()); | 90 | writer.WriteAttributeString("y", size.Y.ToString()); |
91 | writer.WriteAttributeString("z", size.Z.ToString()); | 91 | writer.WriteAttributeString("z", size.Z.ToString()); |
92 | 92 | ||
93 | // Embed the offsets into the group XML | 93 | // Embed the offsets into the group XML |
94 | for (int i = 0; i < coaObjects.Count; i++) | 94 | for (int i = 0; i < coaObjects.Count; i++) |
95 | { | 95 | { |
96 | SceneObjectGroup obj = coaObjects[i]; | 96 | SceneObjectGroup obj = coaObjects[i]; |
97 | 97 | ||
98 | // m_log.DebugFormat( | 98 | // m_log.DebugFormat( |
99 | // "[COALESCED SCENE OBJECTS SERIALIZER]: Writing offset for object {0}, {1}", | 99 | // "[COALESCED SCENE OBJECTS SERIALIZER]: Writing offset for object {0}, {1}", |
100 | // i, obj.Name); | 100 | // i, obj.Name); |
101 | 101 | ||
102 | writer.WriteStartElement("SceneObjectGroup"); | 102 | writer.WriteStartElement("SceneObjectGroup"); |
103 | writer.WriteAttributeString("offsetx", offsets[i].X.ToString()); | 103 | writer.WriteAttributeString("offsetx", offsets[i].X.ToString()); |
104 | writer.WriteAttributeString("offsety", offsets[i].Y.ToString()); | 104 | writer.WriteAttributeString("offsety", offsets[i].Y.ToString()); |
105 | writer.WriteAttributeString("offsetz", offsets[i].Z.ToString()); | 105 | writer.WriteAttributeString("offsetz", offsets[i].Z.ToString()); |
106 | 106 | ||
107 | SceneObjectSerializer.ToOriginalXmlFormat(obj, writer, doScriptStates); | 107 | SceneObjectSerializer.ToOriginalXmlFormat(obj, writer, doScriptStates); |
108 | 108 | ||
109 | writer.WriteEndElement(); // SceneObjectGroup | 109 | writer.WriteEndElement(); // SceneObjectGroup |
110 | } | 110 | } |
111 | 111 | ||
112 | writer.WriteEndElement(); // CoalescedObject | 112 | writer.WriteEndElement(); // CoalescedObject |
113 | } | 113 | } |
114 | 114 | ||
115 | string output = sw.ToString(); | 115 | string output = sw.ToString(); |
116 | 116 | ||
117 | // Console.WriteLine(output); | 117 | // Console.WriteLine(output); |
118 | 118 | ||
119 | return output; | 119 | return output; |
120 | } | 120 | } |
121 | } | 121 | } |
@@ -123,14 +123,14 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
123 | public static bool TryFromXml(string xml, out CoalescedSceneObjects coa) | 123 | public static bool TryFromXml(string xml, out CoalescedSceneObjects coa) |
124 | { | 124 | { |
125 | // m_log.DebugFormat("[COALESCED SCENE OBJECTS SERIALIZER]: TryFromXml() deserializing {0}", xml); | 125 | // m_log.DebugFormat("[COALESCED SCENE OBJECTS SERIALIZER]: TryFromXml() deserializing {0}", xml); |
126 | 126 | ||
127 | coa = null; | 127 | coa = null; |
128 | 128 | ||
129 | try | 129 | try |
130 | { | 130 | { |
131 | // Quickly check if this is a coalesced object, without fully parsing the XML | 131 | // Quickly check if this is a coalesced object, without fully parsing the XML |
132 | using (StringReader sr = new StringReader(xml)) | 132 | using (StringReader sr = new StringReader(xml)) |
133 | { | 133 | { |
134 | using (XmlTextReader reader = new XmlTextReader(sr)) | 134 | using (XmlTextReader reader = new XmlTextReader(sr)) |
135 | { | 135 | { |
136 | reader.MoveToContent(); // skip possible xml declaration | 136 | reader.MoveToContent(); // skip possible xml declaration |
@@ -138,9 +138,9 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
138 | if (reader.Name != "CoalescedObject") | 138 | if (reader.Name != "CoalescedObject") |
139 | { | 139 | { |
140 | // m_log.DebugFormat( | 140 | // m_log.DebugFormat( |
141 | // "[COALESCED SCENE OBJECTS SERIALIZER]: TryFromXml() root element was {0} so returning false", | 141 | // "[COALESCED SCENE OBJECTS SERIALIZER]: TryFromXml() root element was {0} so returning false", |
142 | // reader.Name); | 142 | // reader.Name); |
143 | 143 | ||
144 | return false; | 144 | return false; |
145 | } | 145 | } |
146 | } | 146 | } |
@@ -151,12 +151,12 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
151 | XmlElement e = (XmlElement)doc.SelectSingleNode("/CoalescedObject"); | 151 | XmlElement e = (XmlElement)doc.SelectSingleNode("/CoalescedObject"); |
152 | if (e == null) | 152 | if (e == null) |
153 | return false; | 153 | return false; |
154 | 154 | ||
155 | coa = new CoalescedSceneObjects(UUID.Zero); | 155 | coa = new CoalescedSceneObjects(UUID.Zero); |
156 | 156 | ||
157 | XmlNodeList groups = e.SelectNodes("SceneObjectGroup"); | 157 | XmlNodeList groups = e.SelectNodes("SceneObjectGroup"); |
158 | int i = 0; | 158 | int i = 0; |
159 | 159 | ||
160 | foreach (XmlNode n in groups) | 160 | foreach (XmlNode n in groups) |
161 | { | 161 | { |
162 | SceneObjectGroup so = SceneObjectSerializer.FromOriginalXmlFormat(n.OuterXml); | 162 | SceneObjectGroup so = SceneObjectSerializer.FromOriginalXmlFormat(n.OuterXml); |
@@ -166,10 +166,10 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
166 | } | 166 | } |
167 | else | 167 | else |
168 | { | 168 | { |
169 | // XXX: Possibly we should fail outright here rather than continuing if a particular component of the | 169 | // XXX: Possibly we should fail outright here rather than continuing if a particular component of the |
170 | // coalesced object fails to load. | 170 | // coalesced object fails to load. |
171 | m_log.WarnFormat( | 171 | m_log.WarnFormat( |
172 | "[COALESCED SCENE OBJECTS SERIALIZER]: Deserialization of xml for component {0} failed. Continuing.", | 172 | "[COALESCED SCENE OBJECTS SERIALIZER]: Deserialization of xml for component {0} failed. Continuing.", |
173 | i); | 173 | i); |
174 | } | 174 | } |
175 | 175 | ||
@@ -181,8 +181,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
181 | m_log.Error("[COALESCED SCENE OBJECTS SERIALIZER]: Deserialization of xml failed ", e); | 181 | m_log.Error("[COALESCED SCENE OBJECTS SERIALIZER]: Deserialization of xml failed ", e); |
182 | Util.LogFailedXML("[COALESCED SCENE OBJECTS SERIALIZER]:", xml); | 182 | Util.LogFailedXML("[COALESCED SCENE OBJECTS SERIALIZER]:", xml); |
183 | return false; | 183 | return false; |
184 | } | 184 | } |
185 | 185 | ||
186 | return true; | 186 | return true; |
187 | } | 187 | } |
188 | } | 188 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 0b7379b..b8d210c 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -107,7 +107,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
107 | part.LinkNum = linkNum; | 107 | part.LinkNum = linkNum; |
108 | part.TrimPermissions(); | 108 | part.TrimPermissions(); |
109 | } | 109 | } |
110 | } | 110 | } |
111 | while (reader.ReadToNextSibling("Part")); | 111 | while (reader.ReadToNextSibling("Part")); |
112 | } | 112 | } |
113 | 113 | ||
@@ -156,7 +156,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
156 | { | 156 | { |
157 | ToOriginalXmlFormat(sceneObject, writer, doScriptStates, false); | 157 | ToOriginalXmlFormat(sceneObject, writer, doScriptStates, false); |
158 | } | 158 | } |
159 | 159 | ||
160 | public static string ToOriginalXmlFormat(SceneObjectGroup sceneObject, string scriptedState) | 160 | public static string ToOriginalXmlFormat(SceneObjectGroup sceneObject, string scriptedState) |
161 | { | 161 | { |
162 | using (StringWriter sw = new StringWriter()) | 162 | using (StringWriter sw = new StringWriter()) |
@@ -190,7 +190,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
190 | 190 | ||
191 | if (!noRootElement) | 191 | if (!noRootElement) |
192 | writer.WriteStartElement(String.Empty, "SceneObjectGroup", String.Empty); | 192 | writer.WriteStartElement(String.Empty, "SceneObjectGroup", String.Empty); |
193 | 193 | ||
194 | writer.WriteStartElement(String.Empty, "RootPart", String.Empty); | 194 | writer.WriteStartElement(String.Empty, "RootPart", String.Empty); |
195 | ToXmlFormat(sceneObject.RootPart, writer); | 195 | ToXmlFormat(sceneObject.RootPart, writer); |
196 | writer.WriteEndElement(); | 196 | writer.WriteEndElement(); |
@@ -212,23 +212,23 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
212 | 212 | ||
213 | if (doScriptStates) | 213 | if (doScriptStates) |
214 | sceneObject.SaveScriptedState(writer); | 214 | sceneObject.SaveScriptedState(writer); |
215 | 215 | ||
216 | if (!noRootElement) | 216 | if (!noRootElement) |
217 | writer.WriteEndElement(); // SceneObjectGroup | 217 | writer.WriteEndElement(); // SceneObjectGroup |
218 | 218 | ||
219 | // m_log.DebugFormat("[SERIALIZER]: Finished serialization of SOG {0}, {1}ms", sceneObject.Name, System.Environment.TickCount - time); | 219 | // m_log.DebugFormat("[SERIALIZER]: Finished serialization of SOG {0}, {1}ms", sceneObject.Name, System.Environment.TickCount - time); |
220 | } | 220 | } |
221 | 221 | ||
222 | protected static void ToXmlFormat(SceneObjectPart part, XmlTextWriter writer) | 222 | protected static void ToXmlFormat(SceneObjectPart part, XmlTextWriter writer) |
223 | { | 223 | { |
224 | SOPToXml2(writer, part, new Dictionary<string, object>()); | 224 | SOPToXml2(writer, part, new Dictionary<string, object>()); |
225 | } | 225 | } |
226 | 226 | ||
227 | public static SceneObjectGroup FromXml2Format(string xmlData) | 227 | public static SceneObjectGroup FromXml2Format(string xmlData) |
228 | { | 228 | { |
229 | //m_log.DebugFormat("[SOG]: Starting deserialization of SOG"); | 229 | //m_log.DebugFormat("[SOG]: Starting deserialization of SOG"); |
230 | //int time = System.Environment.TickCount; | 230 | //int time = System.Environment.TickCount; |
231 | 231 | ||
232 | try | 232 | try |
233 | { | 233 | { |
234 | XmlDocument doc = new XmlDocument(); | 234 | XmlDocument doc = new XmlDocument(); |
@@ -780,7 +780,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
780 | obj.VehicleParams = vehicle; | 780 | obj.VehicleParams = vehicle; |
781 | } | 781 | } |
782 | } | 782 | } |
783 | 783 | ||
784 | private static void ProcessShape(SceneObjectPart obj, XmlReader reader) | 784 | private static void ProcessShape(SceneObjectPart obj, XmlReader reader) |
785 | { | 785 | { |
786 | List<string> errorNodeNames; | 786 | List<string> errorNodeNames; |
@@ -1235,7 +1235,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1235 | { | 1235 | { |
1236 | shp.HollowShape = Util.ReadEnum<HollowShape>(reader, "HollowShape"); | 1236 | shp.HollowShape = Util.ReadEnum<HollowShape>(reader, "HollowShape"); |
1237 | } | 1237 | } |
1238 | 1238 | ||
1239 | private static void ProcessShpSculptTexture(PrimitiveBaseShape shp, XmlReader reader) | 1239 | private static void ProcessShpSculptTexture(PrimitiveBaseShape shp, XmlReader reader) |
1240 | { | 1240 | { |
1241 | shp.SculptTexture = Util.ReadUUID(reader, "SculptTexture"); | 1241 | shp.SculptTexture = Util.ReadUUID(reader, "SculptTexture"); |
@@ -1367,13 +1367,13 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1367 | 1367 | ||
1368 | if (sog.RootPart.KeyframeMotion != null) | 1368 | if (sog.RootPart.KeyframeMotion != null) |
1369 | { | 1369 | { |
1370 | Byte[] data = sog.RootPart.KeyframeMotion.Serialize(); | 1370 | Byte[] data = sog.RootPart.KeyframeMotion.Serialize(); |
1371 | 1371 | ||
1372 | writer.WriteStartElement(String.Empty, "KeyframeMotion", String.Empty); | 1372 | writer.WriteStartElement(String.Empty, "KeyframeMotion", String.Empty); |
1373 | writer.WriteBase64(data, 0, data.Length); | 1373 | writer.WriteBase64(data, 0, data.Length); |
1374 | writer.WriteEndElement(); | 1374 | writer.WriteEndElement(); |
1375 | } | 1375 | } |
1376 | 1376 | ||
1377 | 1377 | ||
1378 | writer.WriteEndElement(); | 1378 | writer.WriteEndElement(); |
1379 | } | 1379 | } |
@@ -1438,7 +1438,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1438 | WriteShape(writer, sop.Shape, options); | 1438 | WriteShape(writer, sop.Shape, options); |
1439 | 1439 | ||
1440 | WriteVector(writer, "Scale", sop.Scale); | 1440 | WriteVector(writer, "Scale", sop.Scale); |
1441 | WriteQuaternion(writer, "SitTargetOrientation", sop.SitTargetOrientation); | 1441 | WriteQuaternion(writer, "SitTargetOrientation", sop.SitTargetOrientation); |
1442 | WriteVector(writer, "SitTargetPosition", sop.SitTargetPosition); | 1442 | WriteVector(writer, "SitTargetPosition", sop.SitTargetPosition); |
1443 | WriteVector(writer, "SitTargetPositionLL", sop.SitTargetPositionLL); | 1443 | WriteVector(writer, "SitTargetPositionLL", sop.SitTargetPositionLL); |
1444 | WriteQuaternion(writer, "SitTargetOrientationLL", sop.SitTargetOrientationLL); | 1444 | WriteQuaternion(writer, "SitTargetOrientationLL", sop.SitTargetOrientationLL); |
@@ -1472,7 +1472,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1472 | if (sop.MediaUrl != null) | 1472 | if (sop.MediaUrl != null) |
1473 | writer.WriteElementString("MediaUrl", sop.MediaUrl.ToString()); | 1473 | writer.WriteElementString("MediaUrl", sop.MediaUrl.ToString()); |
1474 | WriteVector(writer, "AttachedPos", sop.AttachedPos); | 1474 | WriteVector(writer, "AttachedPos", sop.AttachedPos); |
1475 | 1475 | ||
1476 | if (sop.DynAttrs.CountNamespaces > 0) | 1476 | if (sop.DynAttrs.CountNamespaces > 0) |
1477 | { | 1477 | { |
1478 | writer.WriteStartElement("DynAttrs"); | 1478 | writer.WriteStartElement("DynAttrs"); |
@@ -1520,7 +1520,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1520 | writer.WriteElementString("SoundRadius", sop.SoundRadius.ToString().ToLower()); | 1520 | writer.WriteElementString("SoundRadius", sop.SoundRadius.ToString().ToLower()); |
1521 | } | 1521 | } |
1522 | writer.WriteElementString("SoundQueueing", sop.SoundQueueing.ToString().ToLower()); | 1522 | writer.WriteElementString("SoundQueueing", sop.SoundQueueing.ToString().ToLower()); |
1523 | 1523 | ||
1524 | writer.WriteEndElement(); | 1524 | writer.WriteEndElement(); |
1525 | } | 1525 | } |
1526 | 1526 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs index c8f525e..bc440fc 100755 --- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs +++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs | |||
@@ -113,12 +113,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
113 | SimSpareMs = 32, | 113 | SimSpareMs = 32, |
114 | SimSleepMs = 33, | 114 | SimSleepMs = 33, |
115 | SimIoPumpTime = 34, | 115 | SimIoPumpTime = 34, |
116 | SimPCTSscriptsRun = 35, | 116 | SimPCTSscriptsRun = 35, |
117 | SimRegionIdle = 36, // dataserver only | 117 | SimRegionIdle = 36, // dataserver only |
118 | SimRegionIdlePossible = 37, // dataserver only | 118 | SimRegionIdlePossible = 37, // dataserver only |
119 | SimAIStepTimeMS = 38, | 119 | SimAIStepTimeMS = 38, |
120 | SimSkippedSillouet_PS = 39, | 120 | SimSkippedSillouet_PS = 39, |
121 | SimSkippedCharsPerC = 40, | 121 | SimSkippedCharsPerC = 40, |
122 | 122 | ||
123 | // extra stats IDs irrelevant, just far from viewer defined ones | 123 | // extra stats IDs irrelevant, just far from viewer defined ones |
124 | SimExtraCountStart = 1000, | 124 | SimExtraCountStart = 1000, |
@@ -129,7 +129,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
129 | TotalGeoPrim = 1003, | 129 | TotalGeoPrim = 1003, |
130 | TotalMesh = 1004, | 130 | TotalMesh = 1004, |
131 | ThreadCount = 1005, | 131 | ThreadCount = 1005, |
132 | 132 | ||
133 | SimExtraCountEnd = 1006 | 133 | SimExtraCountEnd = 1006 |
134 | } | 134 | } |
135 | 135 | ||
@@ -199,7 +199,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
199 | /// </remarks> | 199 | /// </remarks> |
200 | private float m_statisticsFPSfactor = 5.0f; | 200 | private float m_statisticsFPSfactor = 5.0f; |
201 | private float m_targetFrameTime = 0.1f; | 201 | private float m_targetFrameTime = 0.1f; |
202 | // saved last reported value so there is something available for llGetRegionFPS | 202 | // saved last reported value so there is something available for llGetRegionFPS |
203 | private float lastReportedSimFPS; | 203 | private float lastReportedSimFPS; |
204 | private float[] lastReportedSimStats = new float[m_statisticExtraArraySize + m_statisticViewerArraySize]; | 204 | private float[] lastReportedSimStats = new float[m_statisticExtraArraySize + m_statisticViewerArraySize]; |
205 | private float m_pfps; | 205 | private float m_pfps; |
@@ -336,7 +336,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
336 | { | 336 | { |
337 | if (!m_scene.Active) | 337 | if (!m_scene.Active) |
338 | return; | 338 | return; |
339 | 339 | ||
340 | // dont do it if if still been done | 340 | // dont do it if if still been done |
341 | 341 | ||
342 | if(Monitor.TryEnter(m_statsLock)) | 342 | if(Monitor.TryEnter(m_statsLock)) |
@@ -367,8 +367,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
367 | // factor to consider updates integration time | 367 | // factor to consider updates integration time |
368 | float updateTimeFactor = 1.0f / updateElapsed; | 368 | float updateTimeFactor = 1.0f / updateElapsed; |
369 | 369 | ||
370 | 370 | ||
371 | // scene frame stats | 371 | // scene frame stats |
372 | float reportedFPS; | 372 | float reportedFPS; |
373 | float physfps; | 373 | float physfps; |
374 | float timeDilation; | 374 | float timeDilation; |
@@ -393,7 +393,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
393 | sleeptime = m_sleeptimeMS; | 393 | sleeptime = m_sleeptimeMS; |
394 | scriptTimeMS = m_scriptTimeMS; | 394 | scriptTimeMS = m_scriptTimeMS; |
395 | totalFrameTime = m_frameMS; | 395 | totalFrameTime = m_frameMS; |
396 | // still not inv | 396 | // still not inv |
397 | invFrameElapsed = (float)((m_FrameStatsTS - m_prevFrameStatsTS) / 1000.0); | 397 | invFrameElapsed = (float)((m_FrameStatsTS - m_prevFrameStatsTS) / 1000.0); |
398 | 398 | ||
399 | ResetFrameStats(); | 399 | ResetFrameStats(); |
@@ -424,10 +424,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
424 | } | 424 | } |
425 | 425 | ||
426 | // some engines track frame time with error related to the simulation step size | 426 | // some engines track frame time with error related to the simulation step size |
427 | if(physfps > reportedFPS) | 427 | if(physfps > reportedFPS) |
428 | physfps = reportedFPS; | 428 | physfps = reportedFPS; |
429 | 429 | ||
430 | // save the reported value so there is something available for llGetRegionFPS | 430 | // save the reported value so there is something available for llGetRegionFPS |
431 | lastReportedSimFPS = reportedFPS; | 431 | lastReportedSimFPS = reportedFPS; |
432 | 432 | ||
433 | // scale frame stats | 433 | // scale frame stats |
@@ -461,13 +461,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
461 | 461 | ||
462 | // FIXME: Checking for stat sanity is a complex approach. What we really need to do is fix the code | 462 | // FIXME: Checking for stat sanity is a complex approach. What we really need to do is fix the code |
463 | // so that stat numbers are always consistent. | 463 | // so that stat numbers are always consistent. |
464 | CheckStatSanity(); | 464 | CheckStatSanity(); |
465 | 465 | ||
466 | for (int i = 0; i < m_statisticViewerArraySize; i++) | 466 | for (int i = 0; i < m_statisticViewerArraySize; i++) |
467 | { | 467 | { |
468 | sb[i] = new SimStatsPacket.StatBlock(); | 468 | sb[i] = new SimStatsPacket.StatBlock(); |
469 | } | 469 | } |
470 | 470 | ||
471 | sb[0].StatID = (uint) Stats.TimeDilation; | 471 | sb[0].StatID = (uint) Stats.TimeDilation; |
472 | sb[0].StatValue = (Single.IsNaN(timeDilation)) ? 0.0f : (float)Math.Round(timeDilation,3); | 472 | sb[0].StatValue = (Single.IsNaN(timeDilation)) ? 0.0f : (float)Math.Round(timeDilation,3); |
473 | 473 | ||
@@ -546,13 +546,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
546 | 546 | ||
547 | sb[24].StatID = (uint)Stats.ResidentSizeKb; | 547 | sb[24].StatID = (uint)Stats.ResidentSizeKb; |
548 | sb[24].StatValue = 0; | 548 | sb[24].StatValue = 0; |
549 | 549 | ||
550 | sb[25].StatID = (uint)Stats.PendingLocalUploads; | 550 | sb[25].StatID = (uint)Stats.PendingLocalUploads; |
551 | sb[25].StatValue = 0; | 551 | sb[25].StatValue = 0; |
552 | 552 | ||
553 | sb[26].StatID = (uint)Stats.PhysicsPinnedTasks; | 553 | sb[26].StatID = (uint)Stats.PhysicsPinnedTasks; |
554 | sb[26].StatValue = 0; | 554 | sb[26].StatValue = 0; |
555 | 555 | ||
556 | sb[27].StatID = (uint)Stats.PhysicsLodTasks; | 556 | sb[27].StatID = (uint)Stats.PhysicsLodTasks; |
557 | sb[27].StatValue = 0; | 557 | sb[27].StatValue = 0; |
558 | 558 | ||
@@ -623,7 +623,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
623 | sbex[5].StatValue = m_inUseThreads; | 623 | sbex[5].StatValue = m_inUseThreads; |
624 | lastReportedSimStats[43] = m_inUseThreads; | 624 | lastReportedSimStats[43] = m_inUseThreads; |
625 | 625 | ||
626 | SimStats simStats | 626 | SimStats simStats |
627 | = new SimStats( | 627 | = new SimStats( |
628 | ReportingRegion.RegionLocX, ReportingRegion.RegionLocY, regionFlags, (uint)m_objectCapacity, | 628 | ReportingRegion.RegionLocX, ReportingRegion.RegionLocY, regionFlags, (uint)m_objectCapacity, |
629 | rb, sb, sbex, m_scene.RegionInfo.originRegionID); | 629 | rb, sb, sbex, m_scene.RegionInfo.originRegionID); |
@@ -643,7 +643,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
643 | m_lastReportedExtraSimStats[SlowFramesStat.ShortName] = (float)SlowFramesStat.Value; | 643 | m_lastReportedExtraSimStats[SlowFramesStat.ShortName] = (float)SlowFramesStat.Value; |
644 | 644 | ||
645 | Dictionary<string, float> physicsStats = m_scene.PhysicsScene.GetStats(); | 645 | Dictionary<string, float> physicsStats = m_scene.PhysicsScene.GetStats(); |
646 | 646 | ||
647 | if (physicsStats != null) | 647 | if (physicsStats != null) |
648 | { | 648 | { |
649 | foreach (KeyValuePair<string, float> tuple in physicsStats) | 649 | foreach (KeyValuePair<string, float> tuple in physicsStats) |
@@ -717,7 +717,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
717 | 717 | ||
718 | m_FrameStatsTS = Util.GetTimeStampMS(); | 718 | m_FrameStatsTS = Util.GetTimeStampMS(); |
719 | } | 719 | } |
720 | } | 720 | } |
721 | 721 | ||
722 | private void ResetFrameStats() | 722 | private void ResetFrameStats() |
723 | { | 723 | { |
diff --git a/OpenSim/Region/Framework/Scenes/TerrainChannel.cs b/OpenSim/Region/Framework/Scenes/TerrainChannel.cs index 1aa1194..89d78cf 100644 --- a/OpenSim/Region/Framework/Scenes/TerrainChannel.cs +++ b/OpenSim/Region/Framework/Scenes/TerrainChannel.cs | |||
@@ -158,7 +158,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
158 | { | 158 | { |
159 | if (Double.IsNaN(value) || Double.IsInfinity(value)) | 159 | if (Double.IsNaN(value) || Double.IsInfinity(value)) |
160 | return; | 160 | return; |
161 | 161 | ||
162 | m_terrainData[x, y] = (float)value; | 162 | m_terrainData[x, y] = (float)value; |
163 | } | 163 | } |
164 | } | 164 | } |
@@ -486,7 +486,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
486 | int index = 0; | 486 | int index = 0; |
487 | 487 | ||
488 | m_terrainData = new HeightmapTerrainData(Height, Width, (int)Constants.RegionHeight); | 488 | m_terrainData = new HeightmapTerrainData(Height, Width, (int)Constants.RegionHeight); |
489 | 489 | ||
490 | for (int y = 0; y < Height; y++) | 490 | for (int y = 0; y < Height; y++) |
491 | { | 491 | { |
492 | for (int x = 0; x < Width; x++) | 492 | for (int x = 0; x < Width; x++) |
diff --git a/OpenSim/Region/Framework/Scenes/TerrainCompressor.cs b/OpenSim/Region/Framework/Scenes/TerrainCompressor.cs index fd65735..9d1f815 100644 --- a/OpenSim/Region/Framework/Scenes/TerrainCompressor.cs +++ b/OpenSim/Region/Framework/Scenes/TerrainCompressor.cs | |||
@@ -400,7 +400,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
400 | block[k++] = (terrData[x, y] - sub) * premult; | 400 | block[k++] = (terrData[x, y] - sub) * premult; |
401 | } | 401 | } |
402 | } | 402 | } |
403 | 403 | ||
404 | wbits = (prequant >> 1); | 404 | wbits = (prequant >> 1); |
405 | 405 | ||
406 | dct16x16(block, iout, ref wbits); | 406 | dct16x16(block, iout, ref wbits); |
@@ -490,22 +490,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
490 | #region DCT | 490 | #region DCT |
491 | 491 | ||
492 | /* DCT (Discrete Cosine Transform) | 492 | /* DCT (Discrete Cosine Transform) |
493 | adaptation from | 493 | adaptation from |
494 | General Purpose 2D,3D FFT (Fast Fourier Transform) Package | 494 | General Purpose 2D,3D FFT (Fast Fourier Transform) Package |
495 | by Takuya OOURA (email: ooura@kurims.kyoto-u.ac.jp) | 495 | by Takuya OOURA (email: ooura@kurims.kyoto-u.ac.jp) |
496 | 496 | ||
497 | -------- 16x16 DCT (Discrete Cosine Transform) / Inverse of DCT -------- | 497 | -------- 16x16 DCT (Discrete Cosine Transform) / Inverse of DCT -------- |
498 | [definition] | 498 | [definition] |
499 | <case1> Normalized 16x16 IDCT | 499 | <case1> Normalized 16x16 IDCT |
500 | C[k1 + k2] = (1/8) * sum_j1=0^15 sum_j2=0^15 | 500 | C[k1 + k2] = (1/8) * sum_j1=0^15 sum_j2=0^15 |
501 | tmp[j1 + j2] * s[j1] * s[j2] * | 501 | tmp[j1 + j2] * s[j1] * s[j2] * |
502 | cos(pi*j1*(k1+1/2)/16) * | 502 | cos(pi*j1*(k1+1/2)/16) * |
503 | cos(pi*j2*(k2+1/2)/16), 0<=k1<16, 0<=k2<16 | 503 | cos(pi*j2*(k2+1/2)/16), 0<=k1<16, 0<=k2<16 |
504 | (s[0] = 1/sqrt(2), s[j] = 1, j > 0) | 504 | (s[0] = 1/sqrt(2), s[j] = 1, j > 0) |
505 | <case2> Normalized 16x16 DCT | 505 | <case2> Normalized 16x16 DCT |
506 | C[k1 + k2] = (1/8) * s[k1] * s[k2] * sum_j1=0^15 sum_j2=0^15 | 506 | C[k1 + k2] = (1/8) * s[k1] * s[k2] * sum_j1=0^15 sum_j2=0^15 |
507 | tmp[j1 + j2] * | 507 | tmp[j1 + j2] * |
508 | cos(pi*(j1+1/2)*k1/16) * | 508 | cos(pi*(j1+1/2)*k1/16) * |
509 | cos(pi*(j2+1/2)*k2/16), 0<=k1<16, 0<=k2<16 | 509 | cos(pi*(j2+1/2)*k2/16), 0<=k1<16, 0<=k2<16 |
510 | (s[0] = 1/sqrt(2), s[j] = 1, j > 0) | 510 | (s[0] = 1/sqrt(2), s[j] = 1, j > 0) |
511 | */ | 511 | */ |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/EntityManagerTests.cs b/OpenSim/Region/Framework/Scenes/Tests/EntityManagerTests.cs index da18941..fa698a9 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/EntityManagerTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/EntityManagerTests.cs | |||
@@ -50,7 +50,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
50 | public void T010_AddObjects() | 50 | public void T010_AddObjects() |
51 | { | 51 | { |
52 | TestHelpers.InMethod(); | 52 | TestHelpers.InMethod(); |
53 | 53 | ||
54 | random = new Random(); | 54 | random = new Random(); |
55 | SceneObjectGroup found; | 55 | SceneObjectGroup found; |
56 | EntityManager entman = new EntityManager(); | 56 | EntityManager entman = new EntityManager(); |
@@ -62,7 +62,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
62 | UUID obj2 = sog.UUID; | 62 | UUID obj2 = sog.UUID; |
63 | uint li2 = sog.LocalId; | 63 | uint li2 = sog.LocalId; |
64 | entman.Add(sog); | 64 | entman.Add(sog); |
65 | 65 | ||
66 | found = (SceneObjectGroup)entman[obj1]; | 66 | found = (SceneObjectGroup)entman[obj1]; |
67 | Assert.That(found.UUID ,Is.EqualTo(obj1)); | 67 | Assert.That(found.UUID ,Is.EqualTo(obj1)); |
68 | found = (SceneObjectGroup)entman[li1]; | 68 | found = (SceneObjectGroup)entman[li1]; |
@@ -85,15 +85,15 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
85 | public void T011_ThreadAddRemoveTest() | 85 | public void T011_ThreadAddRemoveTest() |
86 | { | 86 | { |
87 | TestHelpers.InMethod(); | 87 | TestHelpers.InMethod(); |
88 | 88 | ||
89 | // This test adds and removes with mutiple threads, attempting to break the | 89 | // This test adds and removes with mutiple threads, attempting to break the |
90 | // uuid and localid dictionary coherence. | 90 | // uuid and localid dictionary coherence. |
91 | EntityManager entman = new EntityManager(); | 91 | EntityManager entman = new EntityManager(); |
92 | SceneObjectGroup sog = NewSOG(); | 92 | SceneObjectGroup sog = NewSOG(); |
93 | for (int j=0; j<20; j++) | 93 | for (int j=0; j<20; j++) |
94 | { | 94 | { |
95 | List<Thread> trdlist = new List<Thread>(); | 95 | List<Thread> trdlist = new List<Thread>(); |
96 | 96 | ||
97 | for (int i=0; i<4; i++) | 97 | for (int i=0; i<4; i++) |
98 | { | 98 | { |
99 | // Adds scene object | 99 | // Adds scene object |
@@ -101,14 +101,14 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
101 | Thread start = new Thread(new ThreadStart(test.TestAddSceneObject)); | 101 | Thread start = new Thread(new ThreadStart(test.TestAddSceneObject)); |
102 | start.Start(); | 102 | start.Start(); |
103 | trdlist.Add(start); | 103 | trdlist.Add(start); |
104 | 104 | ||
105 | // Removes it | 105 | // Removes it |
106 | test = new NewTestThreads(entman,sog); | 106 | test = new NewTestThreads(entman,sog); |
107 | start = new Thread(new ThreadStart(test.TestRemoveSceneObject)); | 107 | start = new Thread(new ThreadStart(test.TestRemoveSceneObject)); |
108 | start.Start(); | 108 | start.Start(); |
109 | trdlist.Add(start); | 109 | trdlist.Add(start); |
110 | } | 110 | } |
111 | foreach (Thread thread in trdlist) | 111 | foreach (Thread thread in trdlist) |
112 | { | 112 | { |
113 | thread.Join(); | 113 | thread.Join(); |
114 | } | 114 | } |
@@ -133,14 +133,14 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
133 | 133 | ||
134 | SceneObjectGroup sog = new SceneObjectGroup(sop); | 134 | SceneObjectGroup sog = new SceneObjectGroup(sop); |
135 | scene.AddNewSceneObject(sog, false); | 135 | scene.AddNewSceneObject(sog, false); |
136 | 136 | ||
137 | return sog; | 137 | return sog; |
138 | } | 138 | } |
139 | 139 | ||
140 | private static string RandomName() | 140 | private static string RandomName() |
141 | { | 141 | { |
142 | StringBuilder name = new StringBuilder(); | 142 | StringBuilder name = new StringBuilder(); |
143 | int size = random.Next(40,80); | 143 | int size = random.Next(40,80); |
144 | char ch ; | 144 | char ch ; |
145 | for (int i=0; i<size; i++) | 145 | for (int i=0; i<size; i++) |
146 | { | 146 | { |
@@ -156,7 +156,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
156 | private EntityManager entman; | 156 | private EntityManager entman; |
157 | private SceneObjectGroup sog; | 157 | private SceneObjectGroup sog; |
158 | private Random random; | 158 | private Random random; |
159 | 159 | ||
160 | public NewTestThreads(EntityManager entman, SceneObjectGroup sog) | 160 | public NewTestThreads(EntityManager entman, SceneObjectGroup sog) |
161 | { | 161 | { |
162 | this.entman = entman; | 162 | this.entman = entman; |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs index ee7c8a9..56723bf 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs | |||
@@ -55,29 +55,29 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
55 | UUID part2Id = new UUID("00000000-0000-0000-0000-000000000002"); | 55 | UUID part2Id = new UUID("00000000-0000-0000-0000-000000000002"); |
56 | 56 | ||
57 | SceneObjectPart part1 | 57 | SceneObjectPart part1 |
58 | = new SceneObjectPart(ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) | 58 | = new SceneObjectPart(ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) |
59 | { Name = part1Name, UUID = part1Id }; | 59 | { Name = part1Name, UUID = part1Id }; |
60 | SceneObjectGroup so = new SceneObjectGroup(part1); | 60 | SceneObjectGroup so = new SceneObjectGroup(part1); |
61 | SceneObjectPart part2 | 61 | SceneObjectPart part2 |
62 | = new SceneObjectPart(ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) | 62 | = new SceneObjectPart(ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) |
63 | { Name = part2Name, UUID = part2Id }; | 63 | { Name = part2Name, UUID = part2Id }; |
64 | so.AddPart(part2); | 64 | so.AddPart(part2); |
65 | 65 | ||
66 | scene.AddNewSceneObject(so, false); | 66 | scene.AddNewSceneObject(so, false); |
67 | 67 | ||
68 | SceneObjectGroup dupeSo | 68 | SceneObjectGroup dupeSo |
69 | = scene.SceneGraph.DuplicateObject( | 69 | = scene.SceneGraph.DuplicateObject( |
70 | part1.LocalId, new Vector3(10, 0, 0), 0, ownerId, UUID.Zero, Quaternion.Identity); | 70 | part1.LocalId, new Vector3(10, 0, 0), 0, ownerId, UUID.Zero, Quaternion.Identity); |
71 | Assert.That(dupeSo.Parts.Length, Is.EqualTo(2)); | 71 | Assert.That(dupeSo.Parts.Length, Is.EqualTo(2)); |
72 | 72 | ||
73 | SceneObjectPart dupePart1 = dupeSo.GetLinkNumPart(1); | 73 | SceneObjectPart dupePart1 = dupeSo.GetLinkNumPart(1); |
74 | SceneObjectPart dupePart2 = dupeSo.GetLinkNumPart(2); | 74 | SceneObjectPart dupePart2 = dupeSo.GetLinkNumPart(2); |
75 | Assert.That(dupePart1.LocalId, Is.Not.EqualTo(part1.LocalId)); | 75 | Assert.That(dupePart1.LocalId, Is.Not.EqualTo(part1.LocalId)); |
76 | Assert.That(dupePart2.LocalId, Is.Not.EqualTo(part2.LocalId)); | 76 | Assert.That(dupePart2.LocalId, Is.Not.EqualTo(part2.LocalId)); |
77 | 77 | ||
78 | Assert.That(dupePart1.Flags, Is.EqualTo(part1.Flags)); | 78 | Assert.That(dupePart1.Flags, Is.EqualTo(part1.Flags)); |
79 | Assert.That(dupePart2.Flags, Is.EqualTo(part2.Flags)); | 79 | Assert.That(dupePart2.Flags, Is.EqualTo(part2.Flags)); |
80 | 80 | ||
81 | /* | 81 | /* |
82 | Assert.That(part1.PhysActor, Is.Not.Null); | 82 | Assert.That(part1.PhysActor, Is.Not.Null); |
83 | Assert.That(part2.PhysActor, Is.Not.Null); | 83 | Assert.That(part2.PhysActor, Is.Not.Null); |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs index ac8c32d..8961a26 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs | |||
@@ -99,7 +99,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
99 | Assert.That(scene.AddNewSceneObject(so, false), Is.True); | 99 | Assert.That(scene.AddNewSceneObject(so, false), Is.True); |
100 | SceneObjectGroup retrievedSo = scene.GetSceneObjectGroup(so.UUID); | 100 | SceneObjectGroup retrievedSo = scene.GetSceneObjectGroup(so.UUID); |
101 | SceneObjectPart[] retrievedParts = retrievedSo.Parts; | 101 | SceneObjectPart[] retrievedParts = retrievedSo.Parts; |
102 | 102 | ||
103 | //m_log.Debug("retrievedPart : {0}", retrievedPart); | 103 | //m_log.Debug("retrievedPart : {0}", retrievedPart); |
104 | // If the parts have the same UUID then we will consider them as one and the same | 104 | // If the parts have the same UUID then we will consider them as one and the same |
105 | Assert.That(retrievedSo.PrimCount, Is.EqualTo(partsToTestCount)); | 105 | Assert.That(retrievedSo.PrimCount, Is.EqualTo(partsToTestCount)); |
@@ -126,19 +126,19 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
126 | UUID objUuid = new UUID("00000000-0000-0000-0000-000000000001"); | 126 | UUID objUuid = new UUID("00000000-0000-0000-0000-000000000001"); |
127 | 127 | ||
128 | SceneObjectPart part1 | 128 | SceneObjectPart part1 |
129 | = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) | 129 | = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) |
130 | { Name = obj1Name, UUID = objUuid }; | 130 | { Name = obj1Name, UUID = objUuid }; |
131 | 131 | ||
132 | Assert.That(scene.AddNewSceneObject(new SceneObjectGroup(part1), false), Is.True); | 132 | Assert.That(scene.AddNewSceneObject(new SceneObjectGroup(part1), false), Is.True); |
133 | 133 | ||
134 | SceneObjectPart part2 | 134 | SceneObjectPart part2 |
135 | = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) | 135 | = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) |
136 | { Name = obj2Name, UUID = objUuid }; | 136 | { Name = obj2Name, UUID = objUuid }; |
137 | 137 | ||
138 | Assert.That(scene.AddNewSceneObject(new SceneObjectGroup(part2), false), Is.False); | 138 | Assert.That(scene.AddNewSceneObject(new SceneObjectGroup(part2), false), Is.False); |
139 | 139 | ||
140 | SceneObjectPart retrievedPart = scene.GetSceneObjectPart(objUuid); | 140 | SceneObjectPart retrievedPart = scene.GetSceneObjectPart(objUuid); |
141 | 141 | ||
142 | //m_log.Debug("retrievedPart : {0}", retrievedPart); | 142 | //m_log.Debug("retrievedPart : {0}", retrievedPart); |
143 | // If the parts have the same UUID then we will consider them as one and the same | 143 | // If the parts have the same UUID then we will consider them as one and the same |
144 | Assert.That(retrievedPart.Name, Is.EqualTo(obj1Name)); | 144 | Assert.That(retrievedPart.Name, Is.EqualTo(obj1Name)); |
@@ -180,7 +180,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
180 | Assert.That(scene.GetGroupByPrim(soid), Is.Null); | 180 | Assert.That(scene.GetGroupByPrim(soid), Is.Null); |
181 | Assert.That(scene.GetGroupByPrim(spid), Is.Null); | 181 | Assert.That(scene.GetGroupByPrim(spid), Is.Null); |
182 | } | 182 | } |
183 | 183 | ||
184 | /// <summary> | 184 | /// <summary> |
185 | /// Test deleting an object from a scene. | 185 | /// Test deleting an object from a scene. |
186 | /// </summary> | 186 | /// </summary> |
@@ -205,10 +205,10 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
205 | 205 | ||
206 | Assert.That(retrievedPart, Is.Null); | 206 | Assert.That(retrievedPart, Is.Null); |
207 | } | 207 | } |
208 | 208 | ||
209 | /// <summary> | 209 | /// <summary> |
210 | /// Changing a scene object uuid changes the root part uuid. This is a valid operation if the object is not | 210 | /// Changing a scene object uuid changes the root part uuid. This is a valid operation if the object is not |
211 | /// in a scene and is useful if one wants to supply a UUID directly rather than use the one generated by | 211 | /// in a scene and is useful if one wants to supply a UUID directly rather than use the one generated by |
212 | /// OpenSim. | 212 | /// OpenSim. |
213 | /// </summary> | 213 | /// </summary> |
214 | [Test] | 214 | [Test] |
@@ -218,24 +218,24 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
218 | UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001"); | 218 | UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001"); |
219 | string childPartName = "childPart"; | 219 | string childPartName = "childPart"; |
220 | UUID childPartUuid = new UUID("00000000-0000-0000-0001-000000000000"); | 220 | UUID childPartUuid = new UUID("00000000-0000-0000-0001-000000000000"); |
221 | 221 | ||
222 | SceneObjectPart rootPart | 222 | SceneObjectPart rootPart |
223 | = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) | 223 | = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) |
224 | { Name = rootPartName, UUID = rootPartUuid }; | 224 | { Name = rootPartName, UUID = rootPartUuid }; |
225 | SceneObjectPart linkPart | 225 | SceneObjectPart linkPart |
226 | = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) | 226 | = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) |
227 | { Name = childPartName, UUID = childPartUuid }; | 227 | { Name = childPartName, UUID = childPartUuid }; |
228 | 228 | ||
229 | SceneObjectGroup sog = new SceneObjectGroup(rootPart); | 229 | SceneObjectGroup sog = new SceneObjectGroup(rootPart); |
230 | sog.AddPart(linkPart); | 230 | sog.AddPart(linkPart); |
231 | 231 | ||
232 | Assert.That(sog.UUID, Is.EqualTo(rootPartUuid)); | 232 | Assert.That(sog.UUID, Is.EqualTo(rootPartUuid)); |
233 | Assert.That(sog.RootPart.UUID, Is.EqualTo(rootPartUuid)); | 233 | Assert.That(sog.RootPart.UUID, Is.EqualTo(rootPartUuid)); |
234 | Assert.That(sog.Parts.Length, Is.EqualTo(2)); | 234 | Assert.That(sog.Parts.Length, Is.EqualTo(2)); |
235 | 235 | ||
236 | UUID newRootPartUuid = new UUID("00000000-0000-0000-0000-000000000002"); | 236 | UUID newRootPartUuid = new UUID("00000000-0000-0000-0000-000000000002"); |
237 | sog.UUID = newRootPartUuid; | 237 | sog.UUID = newRootPartUuid; |
238 | 238 | ||
239 | Assert.That(sog.UUID, Is.EqualTo(newRootPartUuid)); | 239 | Assert.That(sog.UUID, Is.EqualTo(newRootPartUuid)); |
240 | Assert.That(sog.RootPart.UUID, Is.EqualTo(newRootPartUuid)); | 240 | Assert.That(sog.RootPart.UUID, Is.EqualTo(newRootPartUuid)); |
241 | Assert.That(sog.Parts.Length, Is.EqualTo(2)); | 241 | Assert.That(sog.Parts.Length, Is.EqualTo(2)); |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCopyTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCopyTests.cs index dc3b717..c27bc1a 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCopyTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCopyTests.cs | |||
@@ -87,7 +87,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
87 | 87 | ||
88 | // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. | 88 | // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. |
89 | AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; | 89 | AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; |
90 | sogd.Enabled = false; | 90 | sogd.Enabled = false; |
91 | 91 | ||
92 | SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, "so1", ua.PrincipalID); | 92 | SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, "so1", ua.PrincipalID); |
93 | uint soLocalId = so.LocalId; | 93 | uint soLocalId = so.LocalId; |
@@ -119,11 +119,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
119 | 119 | ||
120 | // Check that object is still there. | 120 | // Check that object is still there. |
121 | SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); | 121 | SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); |
122 | Assert.That(retrievedPart2, Is.Not.Null); | 122 | Assert.That(retrievedPart2, Is.Not.Null); |
123 | Assert.That(client.ReceivedKills.Count, Is.EqualTo(0)); | 123 | Assert.That(client.ReceivedKills.Count, Is.EqualTo(0)); |
124 | 124 | ||
125 | // Check that we have a copy in inventory | 125 | // Check that we have a copy in inventory |
126 | InventoryItemBase item | 126 | InventoryItemBase item |
127 | = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Lost And Found/so1"); | 127 | = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Lost And Found/so1"); |
128 | Assert.That(item, Is.Not.Null); | 128 | Assert.That(item, Is.Not.Null); |
129 | } | 129 | } |
@@ -145,7 +145,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
145 | 145 | ||
146 | // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. | 146 | // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. |
147 | AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; | 147 | AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; |
148 | sogd.Enabled = false; | 148 | sogd.Enabled = false; |
149 | 149 | ||
150 | SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, "so1", ua.PrincipalID); | 150 | SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, "so1", ua.PrincipalID); |
151 | uint soLocalId = so.LocalId; | 151 | uint soLocalId = so.LocalId; |
@@ -168,11 +168,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
168 | 168 | ||
169 | // Check that object is still there. | 169 | // Check that object is still there. |
170 | SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); | 170 | SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); |
171 | Assert.That(retrievedPart2, Is.Not.Null); | 171 | Assert.That(retrievedPart2, Is.Not.Null); |
172 | Assert.That(client.ReceivedKills.Count, Is.EqualTo(0)); | 172 | Assert.That(client.ReceivedKills.Count, Is.EqualTo(0)); |
173 | 173 | ||
174 | // Check that we do not have a copy in inventory | 174 | // Check that we do not have a copy in inventory |
175 | InventoryItemBase item | 175 | InventoryItemBase item |
176 | = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Lost And Found/so1"); | 176 | = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Lost And Found/so1"); |
177 | Assert.That(item, Is.Null); | 177 | Assert.That(item, Is.Null); |
178 | } | 178 | } |
@@ -194,7 +194,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
194 | 194 | ||
195 | // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. | 195 | // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. |
196 | AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; | 196 | AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; |
197 | sogd.Enabled = false; | 197 | sogd.Enabled = false; |
198 | 198 | ||
199 | SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, "so1", TestHelpers.ParseTail(0x2)); | 199 | SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, "so1", TestHelpers.ParseTail(0x2)); |
200 | uint soLocalId = so.LocalId; | 200 | uint soLocalId = so.LocalId; |
@@ -219,11 +219,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
219 | 219 | ||
220 | // Check that object is still there. | 220 | // Check that object is still there. |
221 | SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); | 221 | SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); |
222 | Assert.That(retrievedPart2, Is.Not.Null); | 222 | Assert.That(retrievedPart2, Is.Not.Null); |
223 | Assert.That(client.ReceivedKills.Count, Is.EqualTo(0)); | 223 | Assert.That(client.ReceivedKills.Count, Is.EqualTo(0)); |
224 | 224 | ||
225 | // Check that we have a copy in inventory | 225 | // Check that we have a copy in inventory |
226 | InventoryItemBase item | 226 | InventoryItemBase item |
227 | = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Objects/so1"); | 227 | = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Objects/so1"); |
228 | Assert.That(item, Is.Not.Null); | 228 | Assert.That(item, Is.Not.Null); |
229 | } | 229 | } |
@@ -245,7 +245,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
245 | 245 | ||
246 | // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. | 246 | // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. |
247 | AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; | 247 | AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; |
248 | sogd.Enabled = false; | 248 | sogd.Enabled = false; |
249 | 249 | ||
250 | SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, "so1", TestHelpers.ParseTail(0x2)); | 250 | SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, "so1", TestHelpers.ParseTail(0x2)); |
251 | uint soLocalId = so.LocalId; | 251 | uint soLocalId = so.LocalId; |
@@ -272,11 +272,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
272 | sogd.InventoryDeQueueAndDelete(); | 272 | sogd.InventoryDeQueueAndDelete(); |
273 | // Check that object is still there. | 273 | // Check that object is still there. |
274 | SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); | 274 | SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); |
275 | Assert.That(retrievedPart2, Is.Not.Null); | 275 | Assert.That(retrievedPart2, Is.Not.Null); |
276 | Assert.That(client.ReceivedKills.Count, Is.EqualTo(0)); | 276 | Assert.That(client.ReceivedKills.Count, Is.EqualTo(0)); |
277 | 277 | ||
278 | // Check that we have a copy in inventory | 278 | // Check that we have a copy in inventory |
279 | InventoryItemBase item | 279 | InventoryItemBase item |
280 | = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Objects/so1"); | 280 | = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Objects/so1"); |
281 | Assert.That(item, Is.Null); | 281 | Assert.That(item, Is.Null); |
282 | } | 282 | } |
@@ -303,11 +303,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
303 | sogd.InventoryDeQueueAndDelete(); | 303 | sogd.InventoryDeQueueAndDelete(); |
304 | // Check that object is still there. | 304 | // Check that object is still there. |
305 | SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); | 305 | SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); |
306 | Assert.That(retrievedPart2, Is.Not.Null); | 306 | Assert.That(retrievedPart2, Is.Not.Null); |
307 | Assert.That(client.ReceivedKills.Count, Is.EqualTo(0)); | 307 | Assert.That(client.ReceivedKills.Count, Is.EqualTo(0)); |
308 | 308 | ||
309 | // Check that we have a copy in inventory | 309 | // Check that we have a copy in inventory |
310 | InventoryItemBase item | 310 | InventoryItemBase item |
311 | = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Objects/so1"); | 311 | = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Objects/so1"); |
312 | Assert.That(item, Is.Null); | 312 | Assert.That(item, Is.Null); |
313 | } | 313 | } |
@@ -334,11 +334,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
334 | sogd.InventoryDeQueueAndDelete(); | 334 | sogd.InventoryDeQueueAndDelete(); |
335 | // Check that object is still there. | 335 | // Check that object is still there. |
336 | SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); | 336 | SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); |
337 | Assert.That(retrievedPart2, Is.Not.Null); | 337 | Assert.That(retrievedPart2, Is.Not.Null); |
338 | Assert.That(client.ReceivedKills.Count, Is.EqualTo(0)); | 338 | Assert.That(client.ReceivedKills.Count, Is.EqualTo(0)); |
339 | 339 | ||
340 | // Check that we have a copy in inventory | 340 | // Check that we have a copy in inventory |
341 | InventoryItemBase item | 341 | InventoryItemBase item |
342 | = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Objects/so1"); | 342 | = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Objects/so1"); |
343 | Assert.That(item, Is.Null); | 343 | Assert.That(item, Is.Null); |
344 | } | 344 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCrossingTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCrossingTests.cs index 4a98746..e1e973c 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCrossingTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCrossingTests.cs | |||
@@ -98,7 +98,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
98 | 98 | ||
99 | // crossing is async | 99 | // crossing is async |
100 | Thread.Sleep(500); | 100 | Thread.Sleep(500); |
101 | 101 | ||
102 | Assert.IsNull(sceneA.GetSceneObjectGroup(so1Id)); | 102 | Assert.IsNull(sceneA.GetSceneObjectGroup(so1Id)); |
103 | Assert.NotNull(sceneB.GetSceneObjectGroup(so1Id)); | 103 | Assert.NotNull(sceneB.GetSceneObjectGroup(so1Id)); |
104 | } | 104 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs index f0debd0..b84ecac 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs | |||
@@ -77,19 +77,19 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
77 | public void TestDeRezSceneObject() | 77 | public void TestDeRezSceneObject() |
78 | { | 78 | { |
79 | TestHelpers.InMethod(); | 79 | TestHelpers.InMethod(); |
80 | 80 | ||
81 | UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001"); | 81 | UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001"); |
82 | 82 | ||
83 | TestScene scene = new SceneHelpers().SetupScene(); | 83 | TestScene scene = new SceneHelpers().SetupScene(); |
84 | IConfigSource configSource = new IniConfigSource(); | 84 | IConfigSource configSource = new IniConfigSource(); |
85 | IConfig config = configSource.AddConfig("Startup"); | 85 | IConfig config = configSource.AddConfig("Startup"); |
86 | config.Set("serverside_object_permissions", true); | 86 | config.Set("serverside_object_permissions", true); |
87 | SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new DefaultPermissionsModule() }); | 87 | SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new DefaultPermissionsModule() }); |
88 | IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; | 88 | IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; |
89 | 89 | ||
90 | // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. | 90 | // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. |
91 | AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; | 91 | AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; |
92 | sogd.Enabled = false; | 92 | sogd.Enabled = false; |
93 | 93 | ||
94 | SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, "so1", userId); | 94 | SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, "so1", userId); |
95 | uint soLocalId = so.LocalId; | 95 | uint soLocalId = so.LocalId; |
@@ -104,9 +104,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
104 | // Assert.That(retrievedPart.ParentGroup.IsDeleted, Is.False); | 104 | // Assert.That(retrievedPart.ParentGroup.IsDeleted, Is.False); |
105 | 105 | ||
106 | sogd.InventoryDeQueueAndDelete(); | 106 | sogd.InventoryDeQueueAndDelete(); |
107 | 107 | ||
108 | // SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); | 108 | // SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); |
109 | Assert.That(retrievedPart, Is.Null); | 109 | Assert.That(retrievedPart, Is.Null); |
110 | } | 110 | } |
111 | 111 | ||
112 | /// <summary> | 112 | /// <summary> |
@@ -154,48 +154,48 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
154 | 154 | ||
155 | sceneA.DeleteSceneObject(so, false); | 155 | sceneA.DeleteSceneObject(so, false); |
156 | } | 156 | } |
157 | 157 | ||
158 | /// <summary> | 158 | /// <summary> |
159 | /// Test deleting an object from a scene where the deleter is not the owner | 159 | /// Test deleting an object from a scene where the deleter is not the owner |
160 | /// </summary> | 160 | /// </summary> |
161 | /// <remarks> | 161 | /// <remarks> |
162 | /// This test assumes that the deleter is not a god. | 162 | /// This test assumes that the deleter is not a god. |
163 | /// </remarks> | 163 | /// </remarks> |
164 | [Test] | 164 | [Test] |
165 | public void TestDeRezSceneObjectNotOwner() | 165 | public void TestDeRezSceneObjectNotOwner() |
166 | { | 166 | { |
167 | TestHelpers.InMethod(); | 167 | TestHelpers.InMethod(); |
168 | // log4net.Config.XmlConfigurator.Configure(); | 168 | // log4net.Config.XmlConfigurator.Configure(); |
169 | 169 | ||
170 | UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001"); | 170 | UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001"); |
171 | UUID objectOwnerId = UUID.Parse("20000000-0000-0000-0000-000000000001"); | 171 | UUID objectOwnerId = UUID.Parse("20000000-0000-0000-0000-000000000001"); |
172 | 172 | ||
173 | TestScene scene = new SceneHelpers().SetupScene(); | 173 | TestScene scene = new SceneHelpers().SetupScene(); |
174 | IConfigSource configSource = new IniConfigSource(); | 174 | IConfigSource configSource = new IniConfigSource(); |
175 | IConfig config = configSource.AddConfig("Startup"); | 175 | IConfig config = configSource.AddConfig("Startup"); |
176 | config.Set("serverside_object_permissions", true); | 176 | config.Set("serverside_object_permissions", true); |
177 | SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new DefaultPermissionsModule() }); | 177 | SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new DefaultPermissionsModule() }); |
178 | IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; | 178 | IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; |
179 | 179 | ||
180 | // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. | 180 | // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. |
181 | AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; | 181 | AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; |
182 | sogd.Enabled = false; | 182 | sogd.Enabled = false; |
183 | 183 | ||
184 | SceneObjectPart part | 184 | SceneObjectPart part |
185 | = new SceneObjectPart(objectOwnerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero); | 185 | = new SceneObjectPart(objectOwnerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero); |
186 | part.Name = "obj1"; | 186 | part.Name = "obj1"; |
187 | scene.AddNewSceneObject(new SceneObjectGroup(part), false); | 187 | scene.AddNewSceneObject(new SceneObjectGroup(part), false); |
188 | List<uint> localIds = new List<uint>(); | 188 | List<uint> localIds = new List<uint>(); |
189 | localIds.Add(part.LocalId); | 189 | localIds.Add(part.LocalId); |
190 | 190 | ||
191 | scene.DeRezObjects(client, localIds, UUID.Zero, DeRezAction.Delete, UUID.Zero); | 191 | scene.DeRezObjects(client, localIds, UUID.Zero, DeRezAction.Delete, UUID.Zero); |
192 | sogd.InventoryDeQueueAndDelete(); | 192 | sogd.InventoryDeQueueAndDelete(); |
193 | 193 | ||
194 | // Object should still be in the scene. | 194 | // Object should still be in the scene. |
195 | SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); | 195 | SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); |
196 | Assert.That(retrievedPart.UUID, Is.EqualTo(part.UUID)); | 196 | Assert.That(retrievedPart.UUID, Is.EqualTo(part.UUID)); |
197 | } | 197 | } |
198 | 198 | ||
199 | /// <summary> | 199 | /// <summary> |
200 | /// Test deleting an object asynchronously to user inventory. | 200 | /// Test deleting an object asynchronously to user inventory. |
201 | /// </summary> | 201 | /// </summary> |
@@ -211,7 +211,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
211 | TestScene scene = new SceneHelpers().SetupScene(); | 211 | TestScene scene = new SceneHelpers().SetupScene(); |
212 | 212 | ||
213 | IConfigSource configSource = new IniConfigSource(); | 213 | IConfigSource configSource = new IniConfigSource(); |
214 | IConfig config = configSource.AddConfig("Modules"); | 214 | IConfig config = configSource.AddConfig("Modules"); |
215 | config.Set("InventoryAccessModule", "BasicInventoryAccessModule"); | 215 | config.Set("InventoryAccessModule", "BasicInventoryAccessModule"); |
216 | SceneHelpers.SetupSceneModules( | 216 | SceneHelpers.SetupSceneModules( |
217 | scene, configSource, new object[] { new BasicInventoryAccessModule() }); | 217 | scene, configSource, new object[] { new BasicInventoryAccessModule() }); |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs index 1718734..41f61ac 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs | |||
@@ -66,8 +66,8 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
66 | public void TestLinkDelink2SceneObjects() | 66 | public void TestLinkDelink2SceneObjects() |
67 | { | 67 | { |
68 | TestHelpers.InMethod(); | 68 | TestHelpers.InMethod(); |
69 | 69 | ||
70 | bool debugtest = false; | 70 | bool debugtest = false; |
71 | 71 | ||
72 | Scene scene = new SceneHelpers().SetupScene(); | 72 | Scene scene = new SceneHelpers().SetupScene(); |
73 | SceneObjectGroup grp1 = SceneHelpers.AddSceneObject(scene); | 73 | SceneObjectGroup grp1 = SceneHelpers.AddSceneObject(scene); |
@@ -83,7 +83,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
83 | 83 | ||
84 | // <180,0,0> | 84 | // <180,0,0> |
85 | grp2.UpdateGroupRotationR(Quaternion.CreateFromEulers(180 * Utils.DEG_TO_RAD, 0, 0)); | 85 | grp2.UpdateGroupRotationR(Quaternion.CreateFromEulers(180 * Utils.DEG_TO_RAD, 0, 0)); |
86 | 86 | ||
87 | // Required for linking | 87 | // Required for linking |
88 | grp1.RootPart.ClearUpdateSchedule(); | 88 | grp1.RootPart.ClearUpdateSchedule(); |
89 | grp2.RootPart.ClearUpdateSchedule(); | 89 | grp2.RootPart.ClearUpdateSchedule(); |
@@ -111,7 +111,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
111 | } | 111 | } |
112 | 112 | ||
113 | // root part should have no offset position or rotation | 113 | // root part should have no offset position or rotation |
114 | Assert.That(part1.OffsetPosition == Vector3.Zero && part1.RotationOffset == Quaternion.Identity, | 114 | Assert.That(part1.OffsetPosition == Vector3.Zero && part1.RotationOffset == Quaternion.Identity, |
115 | "root part should have no offset position or rotation"); | 115 | "root part should have no offset position or rotation"); |
116 | 116 | ||
117 | // offset position should be root part position - part2.absolute position. | 117 | // offset position should be root part position - part2.absolute position. |
@@ -125,13 +125,13 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
125 | // There's a euler anomoly at 180, 0, 0 so expect 180 to turn into -180. | 125 | // There's a euler anomoly at 180, 0, 0 so expect 180 to turn into -180. |
126 | part1.RotationOffset.GetEulerAngles(out roll, out pitch, out yaw); | 126 | part1.RotationOffset.GetEulerAngles(out roll, out pitch, out yaw); |
127 | Vector3 rotEuler1 = new Vector3(roll * Utils.RAD_TO_DEG, pitch * Utils.RAD_TO_DEG, yaw * Utils.RAD_TO_DEG); | 127 | Vector3 rotEuler1 = new Vector3(roll * Utils.RAD_TO_DEG, pitch * Utils.RAD_TO_DEG, yaw * Utils.RAD_TO_DEG); |
128 | 128 | ||
129 | if (debugtest) | 129 | if (debugtest) |
130 | m_log.Debug(rotEuler1); | 130 | m_log.Debug(rotEuler1); |
131 | 131 | ||
132 | part2.RotationOffset.GetEulerAngles(out roll, out pitch, out yaw); | 132 | part2.RotationOffset.GetEulerAngles(out roll, out pitch, out yaw); |
133 | Vector3 rotEuler2 = new Vector3(roll * Utils.RAD_TO_DEG, pitch * Utils.RAD_TO_DEG, yaw * Utils.RAD_TO_DEG); | 133 | Vector3 rotEuler2 = new Vector3(roll * Utils.RAD_TO_DEG, pitch * Utils.RAD_TO_DEG, yaw * Utils.RAD_TO_DEG); |
134 | 134 | ||
135 | if (debugtest) | 135 | if (debugtest) |
136 | m_log.Debug(rotEuler2); | 136 | m_log.Debug(rotEuler2); |
137 | 137 | ||
@@ -153,7 +153,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
153 | public void TestLinkDelink2groups4SceneObjects() | 153 | public void TestLinkDelink2groups4SceneObjects() |
154 | { | 154 | { |
155 | TestHelpers.InMethod(); | 155 | TestHelpers.InMethod(); |
156 | 156 | ||
157 | bool debugtest = false; | 157 | bool debugtest = false; |
158 | 158 | ||
159 | Scene scene = new SceneHelpers().SetupScene(); | 159 | Scene scene = new SceneHelpers().SetupScene(); |
@@ -194,7 +194,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
194 | 194 | ||
195 | // Link grp4 to grp3. | 195 | // Link grp4 to grp3. |
196 | grp3.LinkToGroup(grp4); | 196 | grp3.LinkToGroup(grp4); |
197 | 197 | ||
198 | // At this point we should have 4 parts total in two groups. | 198 | // At this point we should have 4 parts total in two groups. |
199 | Assert.That(grp1.Parts.Length == 2, "Group1 children count should be 2"); | 199 | Assert.That(grp1.Parts.Length == 2, "Group1 children count should be 2"); |
200 | Assert.That(grp2.IsDeleted, "Group 2 was not registered as deleted after link."); | 200 | Assert.That(grp2.IsDeleted, "Group 2 was not registered as deleted after link."); |
@@ -202,7 +202,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
202 | Assert.That(grp3.Parts.Length == 2, "Group3 children count should be 2"); | 202 | Assert.That(grp3.Parts.Length == 2, "Group3 children count should be 2"); |
203 | Assert.That(grp4.IsDeleted, "Group 4 was not registered as deleted after link."); | 203 | Assert.That(grp4.IsDeleted, "Group 4 was not registered as deleted after link."); |
204 | Assert.That(grp4.Parts.Length, Is.EqualTo(0), "Group 4 still contained parts after delink."); | 204 | Assert.That(grp4.Parts.Length, Is.EqualTo(0), "Group 4 still contained parts after delink."); |
205 | 205 | ||
206 | if (debugtest) | 206 | if (debugtest) |
207 | { | 207 | { |
208 | m_log.Debug("--------After Link-------"); | 208 | m_log.Debug("--------After Link-------"); |
@@ -273,13 +273,13 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
273 | Assert.That(part2.AbsolutePosition == Vector3.Zero, "Badness 1"); | 273 | Assert.That(part2.AbsolutePosition == Vector3.Zero, "Badness 1"); |
274 | Assert.That(part4.OffsetPosition == new Vector3(20, 20, 20), "Badness 2"); | 274 | Assert.That(part4.OffsetPosition == new Vector3(20, 20, 20), "Badness 2"); |
275 | Quaternion compareQuaternion = new Quaternion(0, 0.7071068f, 0, 0.7071068f); | 275 | Quaternion compareQuaternion = new Quaternion(0, 0.7071068f, 0, 0.7071068f); |
276 | Assert.That((part4.RotationOffset.X - compareQuaternion.X < 0.00003) | 276 | Assert.That((part4.RotationOffset.X - compareQuaternion.X < 0.00003) |
277 | && (part4.RotationOffset.Y - compareQuaternion.Y < 0.00003) | 277 | && (part4.RotationOffset.Y - compareQuaternion.Y < 0.00003) |
278 | && (part4.RotationOffset.Z - compareQuaternion.Z < 0.00003) | 278 | && (part4.RotationOffset.Z - compareQuaternion.Z < 0.00003) |
279 | && (part4.RotationOffset.W - compareQuaternion.W < 0.00003), | 279 | && (part4.RotationOffset.W - compareQuaternion.W < 0.00003), |
280 | "Badness 3"); | 280 | "Badness 3"); |
281 | } | 281 | } |
282 | 282 | ||
283 | /// <summary> | 283 | /// <summary> |
284 | /// Test that a new scene object which is already linked is correctly persisted to the persistence layer. | 284 | /// Test that a new scene object which is already linked is correctly persisted to the persistence layer. |
285 | /// </summary> | 285 | /// </summary> |
@@ -288,37 +288,37 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
288 | { | 288 | { |
289 | TestHelpers.InMethod(); | 289 | TestHelpers.InMethod(); |
290 | //log4net.Config.XmlConfigurator.Configure(); | 290 | //log4net.Config.XmlConfigurator.Configure(); |
291 | 291 | ||
292 | TestScene scene = new SceneHelpers().SetupScene(); | 292 | TestScene scene = new SceneHelpers().SetupScene(); |
293 | 293 | ||
294 | string rootPartName = "rootpart"; | 294 | string rootPartName = "rootpart"; |
295 | UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001"); | 295 | UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001"); |
296 | string linkPartName = "linkpart"; | 296 | string linkPartName = "linkpart"; |
297 | UUID linkPartUuid = new UUID("00000000-0000-0000-0001-000000000000"); | 297 | UUID linkPartUuid = new UUID("00000000-0000-0000-0001-000000000000"); |
298 | 298 | ||
299 | SceneObjectPart rootPart | 299 | SceneObjectPart rootPart |
300 | = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) | 300 | = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) |
301 | { Name = rootPartName, UUID = rootPartUuid }; | 301 | { Name = rootPartName, UUID = rootPartUuid }; |
302 | SceneObjectPart linkPart | 302 | SceneObjectPart linkPart |
303 | = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) | 303 | = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) |
304 | { Name = linkPartName, UUID = linkPartUuid }; | 304 | { Name = linkPartName, UUID = linkPartUuid }; |
305 | 305 | ||
306 | SceneObjectGroup sog = new SceneObjectGroup(rootPart); | 306 | SceneObjectGroup sog = new SceneObjectGroup(rootPart); |
307 | sog.AddPart(linkPart); | 307 | sog.AddPart(linkPart); |
308 | scene.AddNewSceneObject(sog, true); | 308 | scene.AddNewSceneObject(sog, true); |
309 | 309 | ||
310 | // In a test, we have to crank the backup handle manually. Normally this would be done by the timer invoked | 310 | // In a test, we have to crank the backup handle manually. Normally this would be done by the timer invoked |
311 | // scene backup thread. | 311 | // scene backup thread. |
312 | scene.Backup(true); | 312 | scene.Backup(true); |
313 | 313 | ||
314 | List<SceneObjectGroup> storedObjects = scene.SimulationDataService.LoadObjects(scene.RegionInfo.RegionID); | 314 | List<SceneObjectGroup> storedObjects = scene.SimulationDataService.LoadObjects(scene.RegionInfo.RegionID); |
315 | 315 | ||
316 | Assert.That(storedObjects.Count, Is.EqualTo(1)); | 316 | Assert.That(storedObjects.Count, Is.EqualTo(1)); |
317 | Assert.That(storedObjects[0].Parts.Length, Is.EqualTo(2)); | 317 | Assert.That(storedObjects[0].Parts.Length, Is.EqualTo(2)); |
318 | Assert.That(storedObjects[0].ContainsPart(rootPartUuid)); | 318 | Assert.That(storedObjects[0].ContainsPart(rootPartUuid)); |
319 | Assert.That(storedObjects[0].ContainsPart(linkPartUuid)); | 319 | Assert.That(storedObjects[0].ContainsPart(linkPartUuid)); |
320 | } | 320 | } |
321 | 321 | ||
322 | /// <summary> | 322 | /// <summary> |
323 | /// Test that a delink of a previously linked object is correctly persisted to the database | 323 | /// Test that a delink of a previously linked object is correctly persisted to the database |
324 | /// </summary> | 324 | /// </summary> |
@@ -327,20 +327,20 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
327 | { | 327 | { |
328 | TestHelpers.InMethod(); | 328 | TestHelpers.InMethod(); |
329 | //log4net.Config.XmlConfigurator.Configure(); | 329 | //log4net.Config.XmlConfigurator.Configure(); |
330 | 330 | ||
331 | TestScene scene = new SceneHelpers().SetupScene(); | 331 | TestScene scene = new SceneHelpers().SetupScene(); |
332 | 332 | ||
333 | string rootPartName = "rootpart"; | 333 | string rootPartName = "rootpart"; |
334 | UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001"); | 334 | UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001"); |
335 | string linkPartName = "linkpart"; | 335 | string linkPartName = "linkpart"; |
336 | UUID linkPartUuid = new UUID("00000000-0000-0000-0001-000000000000"); | 336 | UUID linkPartUuid = new UUID("00000000-0000-0000-0001-000000000000"); |
337 | 337 | ||
338 | SceneObjectPart rootPart | 338 | SceneObjectPart rootPart |
339 | = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) | 339 | = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) |
340 | { Name = rootPartName, UUID = rootPartUuid }; | 340 | { Name = rootPartName, UUID = rootPartUuid }; |
341 | 341 | ||
342 | SceneObjectPart linkPart | 342 | SceneObjectPart linkPart |
343 | = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) | 343 | = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) |
344 | { Name = linkPartName, UUID = linkPartUuid }; | 344 | { Name = linkPartName, UUID = linkPartUuid }; |
345 | SceneObjectGroup linkGroup = new SceneObjectGroup(linkPart); | 345 | SceneObjectGroup linkGroup = new SceneObjectGroup(linkPart); |
346 | scene.AddNewSceneObject(linkGroup, true); | 346 | scene.AddNewSceneObject(linkGroup, true); |
@@ -359,7 +359,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
359 | SceneObjectGroup groupToDelete = sog.DelinkFromGroup(linkPart, false); | 359 | SceneObjectGroup groupToDelete = sog.DelinkFromGroup(linkPart, false); |
360 | Assert.IsFalse(groupToDelete.GroupContainsForeignPrims); | 360 | Assert.IsFalse(groupToDelete.GroupContainsForeignPrims); |
361 | 361 | ||
362 | /* backup is async | 362 | /* backup is async |
363 | scene.DeleteSceneObject(groupToDelete, false); | 363 | scene.DeleteSceneObject(groupToDelete, false); |
364 | 364 | ||
365 | List<SceneObjectGroup> storedObjects = scene.SimulationDataService.LoadObjects(scene.RegionInfo.RegionID); | 365 | List<SceneObjectGroup> storedObjects = scene.SimulationDataService.LoadObjects(scene.RegionInfo.RegionID); |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectSpatialTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectSpatialTests.cs index ec58a5a..c2c7822 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectSpatialTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectSpatialTests.cs | |||
@@ -137,7 +137,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
137 | Vector3 childPosition = new Vector3(rootPartPosition + rotatedChildOffsetPosition); | 137 | Vector3 childPosition = new Vector3(rootPartPosition + rotatedChildOffsetPosition); |
138 | 138 | ||
139 | SceneObjectPart childPart = so.Parts[1]; | 139 | SceneObjectPart childPart = so.Parts[1]; |
140 | 140 | ||
141 | Assert.That(childPart.AbsolutePosition, Is.EqualTo(childPosition)); | 141 | Assert.That(childPart.AbsolutePosition, Is.EqualTo(childPosition)); |
142 | 142 | ||
143 | Assert.That(childPart.GroupPosition, Is.EqualTo(rootPartPosition)); | 143 | Assert.That(childPart.GroupPosition, Is.EqualTo(rootPartPosition)); |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs index e98e631..8d88083 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs | |||
@@ -71,7 +71,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
71 | m_so1.ScriptSetTemporaryStatus(false); | 71 | m_so1.ScriptSetTemporaryStatus(false); |
72 | 72 | ||
73 | Assert.That(m_so1.RootPart.Flags, Is.EqualTo(PrimFlags.None)); | 73 | Assert.That(m_so1.RootPart.Flags, Is.EqualTo(PrimFlags.None)); |
74 | Assert.That(m_so1.Backup, Is.True); | 74 | Assert.That(m_so1.Backup, Is.True); |
75 | } | 75 | } |
76 | 76 | ||
77 | [Test] | 77 | [Test] |
@@ -91,7 +91,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
91 | 91 | ||
92 | m_so1.ScriptSetPhantomStatus(false); | 92 | m_so1.ScriptSetPhantomStatus(false); |
93 | 93 | ||
94 | Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None)); | 94 | Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None)); |
95 | } | 95 | } |
96 | 96 | ||
97 | [Test] | 97 | [Test] |
@@ -112,7 +112,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
112 | 112 | ||
113 | m_so1.ScriptSetVolumeDetect(false); | 113 | m_so1.ScriptSetVolumeDetect(false); |
114 | 114 | ||
115 | Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None)); | 115 | Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None)); |
116 | } | 116 | } |
117 | 117 | ||
118 | [Test] | 118 | [Test] |
@@ -152,9 +152,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
152 | 152 | ||
153 | m_so1.ScriptSetVolumeDetect(false); | 153 | m_so1.ScriptSetVolumeDetect(false); |
154 | 154 | ||
155 | Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.Physics)); | 155 | Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.Physics)); |
156 | } | 156 | } |
157 | 157 | ||
158 | [Test] | 158 | [Test] |
159 | public void TestSetPhysicsLinkset() | 159 | public void TestSetPhysicsLinkset() |
160 | { | 160 | { |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs index a92e364..4ec69cd 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs | |||
@@ -53,30 +53,30 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
53 | { | 53 | { |
54 | TestHelpers.InMethod(); | 54 | TestHelpers.InMethod(); |
55 | // log4net.Config.XmlConfigurator.Configure(); | 55 | // log4net.Config.XmlConfigurator.Configure(); |
56 | 56 | ||
57 | UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001"); | 57 | UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001"); |
58 | 58 | ||
59 | TestScene scene = new SceneHelpers().SetupScene(); | 59 | TestScene scene = new SceneHelpers().SetupScene(); |
60 | IConfigSource configSource = new IniConfigSource(); | 60 | IConfigSource configSource = new IniConfigSource(); |
61 | 61 | ||
62 | IConfig startupConfig = configSource.AddConfig("Startup"); | 62 | IConfig startupConfig = configSource.AddConfig("Startup"); |
63 | startupConfig.Set("serverside_object_permissions", true); | 63 | startupConfig.Set("serverside_object_permissions", true); |
64 | 64 | ||
65 | IConfig groupsConfig = configSource.AddConfig("Groups"); | 65 | IConfig groupsConfig = configSource.AddConfig("Groups"); |
66 | groupsConfig.Set("Enabled", true); | 66 | groupsConfig.Set("Enabled", true); |
67 | groupsConfig.Set("Module", "GroupsModule"); | 67 | groupsConfig.Set("Module", "GroupsModule"); |
68 | groupsConfig.Set("DebugEnabled", true); | 68 | groupsConfig.Set("DebugEnabled", true); |
69 | 69 | ||
70 | SceneHelpers.SetupSceneModules( | 70 | SceneHelpers.SetupSceneModules( |
71 | scene, configSource, new object[] | 71 | scene, configSource, new object[] |
72 | { new DefaultPermissionsModule(), | 72 | { new DefaultPermissionsModule(), |
73 | new GroupsModule(), | 73 | new GroupsModule(), |
74 | new MockGroupsServicesConnector() }); | 74 | new MockGroupsServicesConnector() }); |
75 | 75 | ||
76 | IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; | 76 | IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; |
77 | 77 | ||
78 | IGroupsModule groupsModule = scene.RequestModuleInterface<IGroupsModule>(); | 78 | IGroupsModule groupsModule = scene.RequestModuleInterface<IGroupsModule>(); |
79 | 79 | ||
80 | groupsModule.CreateGroup(client, "group1", "To boldly go", true, UUID.Zero, 5, true, true, true); | 80 | groupsModule.CreateGroup(client, "group1", "To boldly go", true, UUID.Zero, 5, true, true, true); |
81 | } | 81 | } |
82 | } | 82 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs index ada407f..0f386bc 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs | |||
@@ -142,7 +142,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
142 | // Check rest of exepcted parameters. | 142 | // Check rest of exepcted parameters. |
143 | Assert.That(scene.AuthenticateHandler.GetAgentCircuitData(spUuid), Is.Not.Null); | 143 | Assert.That(scene.AuthenticateHandler.GetAgentCircuitData(spUuid), Is.Not.Null); |
144 | Assert.That(scene.AuthenticateHandler.GetAgentCircuits().Count, Is.EqualTo(1)); | 144 | Assert.That(scene.AuthenticateHandler.GetAgentCircuits().Count, Is.EqualTo(1)); |
145 | 145 | ||
146 | Assert.That(sp.IsChildAgent, Is.False); | 146 | Assert.That(sp.IsChildAgent, Is.False); |
147 | Assert.That(sp.UUID, Is.EqualTo(spUuid)); | 147 | Assert.That(sp.UUID, Is.EqualTo(spUuid)); |
148 | 148 | ||
@@ -262,9 +262,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
262 | { | 262 | { |
263 | TestHelpers.InMethod(); | 263 | TestHelpers.InMethod(); |
264 | // log4net.Config.XmlConfigurator.Configure(); | 264 | // log4net.Config.XmlConfigurator.Configure(); |
265 | 265 | ||
266 | // UUID agent1Id = UUID.Parse("00000000-0000-0000-0000-000000000001"); | 266 | // UUID agent1Id = UUID.Parse("00000000-0000-0000-0000-000000000001"); |
267 | 267 | ||
268 | TestScene myScene1 = new SceneHelpers().SetupScene("Neighbour y", UUID.Random(), 1000, 1000); | 268 | TestScene myScene1 = new SceneHelpers().SetupScene("Neighbour y", UUID.Random(), 1000, 1000); |
269 | TestScene myScene2 = new SceneHelpers().SetupScene("Neighbour y + 1", UUID.Random(), 1001, 1000); | 269 | TestScene myScene2 = new SceneHelpers().SetupScene("Neighbour y + 1", UUID.Random(), 1001, 1000); |
270 | 270 | ||
@@ -279,7 +279,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
279 | 279 | ||
280 | EventQueueGetModule eqgm2 = new EventQueueGetModule(); | 280 | EventQueueGetModule eqgm2 = new EventQueueGetModule(); |
281 | SceneHelpers.SetupSceneModules(myScene2, configSource, etm, eqgm2); | 281 | SceneHelpers.SetupSceneModules(myScene2, configSource, etm, eqgm2); |
282 | 282 | ||
283 | // SceneHelpers.AddScenePresence(myScene1, agent1Id); | 283 | // SceneHelpers.AddScenePresence(myScene1, agent1Id); |
284 | // ScenePresence childPresence = myScene2.GetScenePresence(agent1); | 284 | // ScenePresence childPresence = myScene2.GetScenePresence(agent1); |
285 | // | 285 | // |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs index b8f7458..86500c7 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs | |||
@@ -465,7 +465,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
465 | teleportLookAt, | 465 | teleportLookAt, |
466 | (uint)TeleportFlags.ViaLocation); | 466 | (uint)TeleportFlags.ViaLocation); |
467 | 467 | ||
468 | // FIXME: Not setting up InformClientOfNeighbour on the TestClient means that it does not initiate | 468 | // FIXME: Not setting up InformClientOfNeighbour on the TestClient means that it does not initiate |
469 | // communication with the destination region. But this is a very non-obvious way of doing it - really we | 469 | // communication with the destination region. But this is a very non-obvious way of doing it - really we |
470 | // should be forced to expicitly set this up. | 470 | // should be forced to expicitly set this up. |
471 | 471 | ||
@@ -627,8 +627,8 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
627 | // Both these operations will occur on different threads and will wait for each other. | 627 | // Both these operations will occur on different threads and will wait for each other. |
628 | // We have to do this via ThreadPool directly since FireAndForget has been switched to sync for the V1 | 628 | // We have to do this via ThreadPool directly since FireAndForget has been switched to sync for the V1 |
629 | // test protocol, where we are trying to avoid unpredictable async operations in regression tests. | 629 | // test protocol, where we are trying to avoid unpredictable async operations in regression tests. |
630 | tc.OnTestClientSendRegionTeleport | 630 | tc.OnTestClientSendRegionTeleport |
631 | += (regionHandle, simAccess, regionExternalEndPoint, locationID, flags, capsURL) | 631 | += (regionHandle, simAccess, regionExternalEndPoint, locationID, flags, capsURL) |
632 | => ThreadPool.UnsafeQueueUserWorkItem(o => destinationTestClients[0].CompleteMovement(), null); | 632 | => ThreadPool.UnsafeQueueUserWorkItem(o => destinationTestClients[0].CompleteMovement(), null); |
633 | 633 | ||
634 | sceneA.RequestTeleportLocation( | 634 | sceneA.RequestTeleportLocation( |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneTelehubTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneTelehubTests.cs index 584a03c..dbb6a37 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneTelehubTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneTelehubTests.cs | |||
@@ -70,7 +70,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
70 | // Must still be possible to successfully log in | 70 | // Must still be possible to successfully log in |
71 | UUID loggingInUserId = TestHelpers.ParseTail(0x2); | 71 | UUID loggingInUserId = TestHelpers.ParseTail(0x2); |
72 | 72 | ||
73 | UserAccount ua | 73 | UserAccount ua |
74 | = UserAccountHelpers.CreateUserWithInventory(scene, "Test", "User", loggingInUserId, "password"); | 74 | = UserAccountHelpers.CreateUserWithInventory(scene, "Test", "User", loggingInUserId, "password"); |
75 | 75 | ||
76 | SceneHelpers.AddScenePresence(scene, ua); | 76 | SceneHelpers.AddScenePresence(scene, ua); |
@@ -107,7 +107,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
107 | // Must still be possible to successfully log in | 107 | // Must still be possible to successfully log in |
108 | UUID loggingInUserId = TestHelpers.ParseTail(0x2); | 108 | UUID loggingInUserId = TestHelpers.ParseTail(0x2); |
109 | 109 | ||
110 | UserAccount ua | 110 | UserAccount ua |
111 | = UserAccountHelpers.CreateUserWithInventory(scene, "Test", "User", loggingInUserId, "password"); | 111 | = UserAccountHelpers.CreateUserWithInventory(scene, "Test", "User", loggingInUserId, "password"); |
112 | 112 | ||
113 | SceneHelpers.AddScenePresence(scene, ua); | 113 | SceneHelpers.AddScenePresence(scene, ua); |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs index 517faf1..6c0af8f 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs | |||
@@ -66,7 +66,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
66 | uint sizeX = 512; | 66 | uint sizeX = 512; |
67 | uint sizeY = 512; | 67 | uint sizeY = 512; |
68 | 68 | ||
69 | Scene scene | 69 | Scene scene |
70 | = new SceneHelpers().SetupScene("scene", regionUuid, 1000, 1000, sizeX, sizeY, new IniConfigSource()); | 70 | = new SceneHelpers().SetupScene("scene", regionUuid, 1000, 1000, sizeX, sizeY, new IniConfigSource()); |
71 | 71 | ||
72 | Assert.AreEqual(sizeX, scene.RegionInfo.RegionSizeX); | 72 | Assert.AreEqual(sizeX, scene.RegionInfo.RegionSizeX); |
@@ -83,7 +83,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
83 | 83 | ||
84 | Scene scene = new SceneHelpers().SetupScene(); | 84 | Scene scene = new SceneHelpers().SetupScene(); |
85 | scene.Update(1); | 85 | scene.Update(1); |
86 | 86 | ||
87 | Assert.That(scene.Frame, Is.EqualTo(1)); | 87 | Assert.That(scene.Frame, Is.EqualTo(1)); |
88 | } | 88 | } |
89 | 89 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SharedRegionModuleTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SharedRegionModuleTests.cs index eeda84f..c74c83f 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SharedRegionModuleTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SharedRegionModuleTests.cs | |||
@@ -105,7 +105,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
105 | // rmcp.LoadModulesFromAddins = false; | 105 | // rmcp.LoadModulesFromAddins = false; |
106 | //// reg.RegisterInterface<IRegionModulesController>(rmcp); | 106 | //// reg.RegisterInterface<IRegionModulesController>(rmcp); |
107 | // rmcp.Initialise(sim); | 107 | // rmcp.Initialise(sim); |
108 | // rmcp.PostInitialise(); | 108 | // rmcp.PostInitialise(); |
109 | // TypeExtensionNode node = new TypeExtensionNode(); | 109 | // TypeExtensionNode node = new TypeExtensionNode(); |
110 | // node. | 110 | // node. |
111 | // rmcp.AddNode(node, configSource.Configs["Modules"], new Dictionary<RuntimeAddin, IList<int>>()); | 111 | // rmcp.AddNode(node, configSource.Configs["Modules"], new Dictionary<RuntimeAddin, IList<int>>()); |
@@ -120,9 +120,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
120 | int expectedEventCount = 6; | 120 | int expectedEventCount = 6; |
121 | 121 | ||
122 | Assert.AreEqual( | 122 | Assert.AreEqual( |
123 | expectedEventCount, | 123 | expectedEventCount, |
124 | co.Count, | 124 | co.Count, |
125 | "Expected {0} events but only got {1} ({2})", | 125 | "Expected {0} events but only got {1} ({2})", |
126 | expectedEventCount, co.Count, string.Join(",", co)); | 126 | expectedEventCount, co.Count, string.Join(",", co)); |
127 | Assert.AreEqual("Initialise", co[0]); | 127 | Assert.AreEqual("Initialise", co[0]); |
128 | Assert.AreEqual("PostInitialise", co[1]); | 128 | Assert.AreEqual("PostInitialise", co[1]); |
@@ -137,7 +137,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
137 | { | 137 | { |
138 | // FIXME: Should really use MethodInfo | 138 | // FIXME: Should really use MethodInfo |
139 | public List<string> CallOrder = new List<string>(); | 139 | public List<string> CallOrder = new List<string>(); |
140 | 140 | ||
141 | public string Name { get { return "TestSharedRegion"; } } | 141 | public string Name { get { return "TestSharedRegion"; } } |
142 | 142 | ||
143 | public Type ReplaceableInterface { get { return null; } } | 143 | public Type ReplaceableInterface { get { return null; } } |
@@ -186,13 +186,13 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
186 | 186 | ||
187 | public void Initialise() {} | 187 | public void Initialise() {} |
188 | 188 | ||
189 | public void Initialise(OpenSimBase sim) | 189 | public void Initialise(OpenSimBase sim) |
190 | { | 190 | { |
191 | m_openSim = sim; | 191 | m_openSim = sim; |
192 | } | 192 | } |
193 | 193 | ||
194 | /// <summary> | 194 | /// <summary> |
195 | /// Called when the application loading is completed | 195 | /// Called when the application loading is completed |
196 | /// </summary> | 196 | /// </summary> |
197 | public void PostInitialise() | 197 | public void PostInitialise() |
198 | { | 198 | { |
@@ -228,8 +228,8 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
228 | } | 228 | } |
229 | 229 | ||
230 | scene.RegionModules.Clear(); | 230 | scene.RegionModules.Clear(); |
231 | } | 231 | } |
232 | 232 | ||
233 | public void AddNode(ISharedRegionModule module) | 233 | public void AddNode(ISharedRegionModule module) |
234 | { | 234 | { |
235 | m_sharedInstances.Add(module); | 235 | m_sharedInstances.Add(module); |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs index 33a630c..8273e32 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs | |||
@@ -55,7 +55,7 @@ namespace OpenSim.Region.Framework.Tests | |||
55 | { | 55 | { |
56 | TestHelpers.InMethod(); | 56 | TestHelpers.InMethod(); |
57 | // log4net.Config.XmlConfigurator.Configure(); | 57 | // log4net.Config.XmlConfigurator.Configure(); |
58 | 58 | ||
59 | Scene scene = new SceneHelpers().SetupScene(); | 59 | Scene scene = new SceneHelpers().SetupScene(); |
60 | UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene); | 60 | UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene); |
61 | SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID); | 61 | SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID); |
@@ -78,7 +78,7 @@ namespace OpenSim.Region.Framework.Tests | |||
78 | { | 78 | { |
79 | TestHelpers.InMethod(); | 79 | TestHelpers.InMethod(); |
80 | // log4net.Config.XmlConfigurator.Configure(); | 80 | // log4net.Config.XmlConfigurator.Configure(); |
81 | 81 | ||
82 | Scene scene = new SceneHelpers().SetupScene(); | 82 | Scene scene = new SceneHelpers().SetupScene(); |
83 | UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene); | 83 | UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene); |
84 | SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID); | 84 | SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID); |
@@ -121,7 +121,7 @@ namespace OpenSim.Region.Framework.Tests | |||
121 | { | 121 | { |
122 | TestHelpers.InMethod(); | 122 | TestHelpers.InMethod(); |
123 | // log4net.Config.XmlConfigurator.Configure(); | 123 | // log4net.Config.XmlConfigurator.Configure(); |
124 | 124 | ||
125 | Scene scene = new SceneHelpers().SetupScene(); | 125 | Scene scene = new SceneHelpers().SetupScene(); |
126 | UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene); | 126 | UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene); |
127 | SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID); | 127 | SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID); |
@@ -130,18 +130,18 @@ namespace OpenSim.Region.Framework.Tests | |||
130 | = TaskInventoryHelpers.AddNotecard( | 130 | = TaskInventoryHelpers.AddNotecard( |
131 | scene.AssetService, sop1, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!"); | 131 | scene.AssetService, sop1, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!"); |
132 | 132 | ||
133 | InventoryFolderBase folder | 133 | InventoryFolderBase folder |
134 | = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, user1.PrincipalID, "Objects")[0]; | 134 | = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, user1.PrincipalID, "Objects")[0]; |
135 | 135 | ||
136 | // Perform test | 136 | // Perform test |
137 | string message; | 137 | string message; |
138 | scene.MoveTaskInventoryItem(user1.PrincipalID, folder.ID, sop1, sopItem1.ItemID, out message); | 138 | scene.MoveTaskInventoryItem(user1.PrincipalID, folder.ID, sop1, sopItem1.ItemID, out message); |
139 | 139 | ||
140 | InventoryItemBase ncUserItem | 140 | InventoryItemBase ncUserItem |
141 | = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, user1.PrincipalID, "Objects/ncItem"); | 141 | = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, user1.PrincipalID, "Objects/ncItem"); |
142 | Assert.That(ncUserItem, Is.Not.Null, "Objects/ncItem was not found"); | 142 | Assert.That(ncUserItem, Is.Not.Null, "Objects/ncItem was not found"); |
143 | } | 143 | } |
144 | 144 | ||
145 | /// <summary> | 145 | /// <summary> |
146 | /// Test MoveTaskInventoryItem from a part inventory to a user inventory where the item has no parent folder assigned. | 146 | /// Test MoveTaskInventoryItem from a part inventory to a user inventory where the item has no parent folder assigned. |
147 | /// </summary> | 147 | /// </summary> |
@@ -153,7 +153,7 @@ namespace OpenSim.Region.Framework.Tests | |||
153 | { | 153 | { |
154 | TestHelpers.InMethod(); | 154 | TestHelpers.InMethod(); |
155 | // log4net.Config.XmlConfigurator.Configure(); | 155 | // log4net.Config.XmlConfigurator.Configure(); |
156 | 156 | ||
157 | Scene scene = new SceneHelpers().SetupScene(); | 157 | Scene scene = new SceneHelpers().SetupScene(); |
158 | UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene); | 158 | UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene); |
159 | SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID); | 159 | SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID); |
@@ -162,11 +162,11 @@ namespace OpenSim.Region.Framework.Tests | |||
162 | TaskInventoryItem sopItem1 | 162 | TaskInventoryItem sopItem1 |
163 | = TaskInventoryHelpers.AddNotecard( | 163 | = TaskInventoryHelpers.AddNotecard( |
164 | scene.AssetService, sop1, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!"); | 164 | scene.AssetService, sop1, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!"); |
165 | 165 | ||
166 | // Perform test | 166 | // Perform test |
167 | string message; | 167 | string message; |
168 | scene.MoveTaskInventoryItem(user1.PrincipalID, UUID.Zero, sop1, sopItem1.ItemID, out message); | 168 | scene.MoveTaskInventoryItem(user1.PrincipalID, UUID.Zero, sop1, sopItem1.ItemID, out message); |
169 | 169 | ||
170 | InventoryItemBase ncUserItem | 170 | InventoryItemBase ncUserItem |
171 | = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, user1.PrincipalID, "Notecards/ncItem"); | 171 | = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, user1.PrincipalID, "Notecards/ncItem"); |
172 | Assert.That(ncUserItem, Is.Not.Null, "Notecards/ncItem was not found"); | 172 | Assert.That(ncUserItem, Is.Not.Null, "Notecards/ncItem was not found"); |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs b/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs index 142ad84..58e157c 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs | |||
@@ -113,7 +113,7 @@ namespace OpenSim.Region.Framework.Tests | |||
113 | { | 113 | { |
114 | TestHelpers.InMethod(); | 114 | TestHelpers.InMethod(); |
115 | // TestHelpers.EnableLogging(); | 115 | // TestHelpers.EnableLogging(); |
116 | 116 | ||
117 | Scene scene = new SceneHelpers().SetupScene(); | 117 | Scene scene = new SceneHelpers().SetupScene(); |
118 | UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene, TestHelpers.ParseTail(1001)); | 118 | UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene, TestHelpers.ParseTail(1001)); |
119 | UserAccount user2 = UserAccountHelpers.CreateUserWithInventory(scene, TestHelpers.ParseTail(1002)); | 119 | UserAccount user2 = UserAccountHelpers.CreateUserWithInventory(scene, TestHelpers.ParseTail(1002)); |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs b/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs index 937c414..4ceebc1 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs | |||
@@ -41,7 +41,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
41 | { | 41 | { |
42 | protected IAssetService m_assetService; | 42 | protected IAssetService m_assetService; |
43 | protected UuidGatherer m_uuidGatherer; | 43 | protected UuidGatherer m_uuidGatherer; |
44 | 44 | ||
45 | [SetUp] | 45 | [SetUp] |
46 | public void Init() | 46 | public void Init() |
47 | { | 47 | { |
@@ -55,9 +55,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
55 | public void TestCorruptAsset() | 55 | public void TestCorruptAsset() |
56 | { | 56 | { |
57 | TestHelpers.InMethod(); | 57 | TestHelpers.InMethod(); |
58 | 58 | ||
59 | UUID corruptAssetUuid = UUID.Parse("00000000-0000-0000-0000-000000000666"); | 59 | UUID corruptAssetUuid = UUID.Parse("00000000-0000-0000-0000-000000000666"); |
60 | AssetBase corruptAsset | 60 | AssetBase corruptAsset |
61 | = AssetHelpers.CreateAsset(corruptAssetUuid, AssetType.Notecard, "CORRUPT ASSET", UUID.Zero); | 61 | = AssetHelpers.CreateAsset(corruptAssetUuid, AssetType.Notecard, "CORRUPT ASSET", UUID.Zero); |
62 | m_assetService.Store(corruptAsset); | 62 | m_assetService.Store(corruptAsset); |
63 | 63 | ||
@@ -67,7 +67,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
67 | // We count the uuid as gathered even if the asset itself is corrupt. | 67 | // We count the uuid as gathered even if the asset itself is corrupt. |
68 | Assert.That(m_uuidGatherer.GatheredUuids.Count, Is.EqualTo(1)); | 68 | Assert.That(m_uuidGatherer.GatheredUuids.Count, Is.EqualTo(1)); |
69 | } | 69 | } |
70 | 70 | ||
71 | /// <summary> | 71 | /// <summary> |
72 | /// Test requests made for non-existent assets while we're gathering | 72 | /// Test requests made for non-existent assets while we're gathering |
73 | /// </summary> | 73 | /// </summary> |
@@ -75,7 +75,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
75 | public void TestMissingAsset() | 75 | public void TestMissingAsset() |
76 | { | 76 | { |
77 | TestHelpers.InMethod(); | 77 | TestHelpers.InMethod(); |
78 | 78 | ||
79 | UUID missingAssetUuid = UUID.Parse("00000000-0000-0000-0000-000000000666"); | 79 | UUID missingAssetUuid = UUID.Parse("00000000-0000-0000-0000-000000000666"); |
80 | 80 | ||
81 | m_uuidGatherer.AddForInspection(missingAssetUuid); | 81 | m_uuidGatherer.AddForInspection(missingAssetUuid); |
@@ -89,23 +89,23 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
89 | { | 89 | { |
90 | TestHelpers.InMethod(); | 90 | TestHelpers.InMethod(); |
91 | // TestHelpers.EnableLogging(); | 91 | // TestHelpers.EnableLogging(); |
92 | 92 | ||
93 | UUID ownerId = TestHelpers.ParseTail(0x10); | 93 | UUID ownerId = TestHelpers.ParseTail(0x10); |
94 | UUID embeddedId = TestHelpers.ParseTail(0x20); | 94 | UUID embeddedId = TestHelpers.ParseTail(0x20); |
95 | UUID secondLevelEmbeddedId = TestHelpers.ParseTail(0x21); | 95 | UUID secondLevelEmbeddedId = TestHelpers.ParseTail(0x21); |
96 | UUID missingEmbeddedId = TestHelpers.ParseTail(0x22); | 96 | UUID missingEmbeddedId = TestHelpers.ParseTail(0x22); |
97 | UUID ncAssetId = TestHelpers.ParseTail(0x30); | 97 | UUID ncAssetId = TestHelpers.ParseTail(0x30); |
98 | 98 | ||
99 | AssetBase ncAsset | 99 | AssetBase ncAsset |
100 | = AssetHelpers.CreateNotecardAsset( | 100 | = AssetHelpers.CreateNotecardAsset( |
101 | ncAssetId, string.Format("Hello{0}World{1}", embeddedId, missingEmbeddedId)); | 101 | ncAssetId, string.Format("Hello{0}World{1}", embeddedId, missingEmbeddedId)); |
102 | m_assetService.Store(ncAsset); | 102 | m_assetService.Store(ncAsset); |
103 | 103 | ||
104 | AssetBase embeddedAsset | 104 | AssetBase embeddedAsset |
105 | = AssetHelpers.CreateNotecardAsset(embeddedId, string.Format("{0} We'll meet again.", secondLevelEmbeddedId)); | 105 | = AssetHelpers.CreateNotecardAsset(embeddedId, string.Format("{0} We'll meet again.", secondLevelEmbeddedId)); |
106 | m_assetService.Store(embeddedAsset); | 106 | m_assetService.Store(embeddedAsset); |
107 | 107 | ||
108 | AssetBase secondLevelEmbeddedAsset | 108 | AssetBase secondLevelEmbeddedAsset |
109 | = AssetHelpers.CreateNotecardAsset(secondLevelEmbeddedId, "Don't know where, don't know when."); | 109 | = AssetHelpers.CreateNotecardAsset(secondLevelEmbeddedId, "Don't know where, don't know when."); |
110 | m_assetService.Store(secondLevelEmbeddedAsset); | 110 | m_assetService.Store(secondLevelEmbeddedAsset); |
111 | 111 | ||
diff --git a/OpenSim/Region/Framework/Scenes/UndoState.cs b/OpenSim/Region/Framework/Scenes/UndoState.cs index 7bbf1bd..8fff38f 100644 --- a/OpenSim/Region/Framework/Scenes/UndoState.cs +++ b/OpenSim/Region/Framework/Scenes/UndoState.cs | |||
@@ -46,7 +46,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
46 | /// </summary> | 46 | /// </summary> |
47 | /// <param name="part"></param> | 47 | /// <param name="part"></param> |
48 | /// <param name="change">bit field with what is changed</param> | 48 | /// <param name="change">bit field with what is changed</param> |
49 | /// | 49 | /// |
50 | public UndoState(SceneObjectPart part, ObjectChangeType change) | 50 | public UndoState(SceneObjectPart part, ObjectChangeType change) |
51 | { | 51 | { |
52 | data = new ObjectChangeData(); | 52 | data = new ObjectChangeData(); |
@@ -73,7 +73,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
73 | } | 73 | } |
74 | } | 74 | } |
75 | /// <summary> | 75 | /// <summary> |
76 | /// check if undo or redo is too old | 76 | /// check if undo or redo is too old |
77 | /// </summary> | 77 | /// </summary> |
78 | 78 | ||
79 | public bool checkExpire() | 79 | public bool checkExpire() |
@@ -97,8 +97,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
97 | /// </summary> | 97 | /// </summary> |
98 | /// <param name="part"></param> | 98 | /// <param name="part"></param> |
99 | /// <returns>true what fiels and related data are equal, False otherwise.</returns> | 99 | /// <returns>true what fiels and related data are equal, False otherwise.</returns> |
100 | /// | 100 | /// |
101 | public bool Compare(SceneObjectPart part, ObjectChangeType change) | 101 | public bool Compare(SceneObjectPart part, ObjectChangeType change) |
102 | { | 102 | { |
103 | if (data.change != change) // if diferent targets, then they are diferent | 103 | if (data.change != change) // if diferent targets, then they are diferent |
104 | return false; | 104 | return false; |
@@ -130,7 +130,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
130 | /// executes the undo or redo to a part or its group | 130 | /// executes the undo or redo to a part or its group |
131 | /// </summary> | 131 | /// </summary> |
132 | /// <param name="part"></param> | 132 | /// <param name="part"></param> |
133 | /// | 133 | /// |
134 | 134 | ||
135 | public void PlayState(SceneObjectPart part) | 135 | public void PlayState(SceneObjectPart part) |
136 | { | 136 | { |
@@ -140,7 +140,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
140 | 140 | ||
141 | if (grp != null) | 141 | if (grp != null) |
142 | { | 142 | { |
143 | grp.doChangeObject(part, data); | 143 | grp.doChangeObject(part, data); |
144 | } | 144 | } |
145 | part.Undoing = false; | 145 | part.Undoing = false; |
146 | } | 146 | } |
diff --git a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs index 37b91d3..93406cb 100644 --- a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs +++ b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs | |||
@@ -92,7 +92,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
92 | /// <param name="assetService"> | 92 | /// <param name="assetService"> |
93 | /// Asset service. | 93 | /// Asset service. |
94 | /// </param> | 94 | /// </param> |
95 | public UuidGatherer(IAssetService assetService) : this(assetService, new Dictionary<UUID, sbyte>()) {} | 95 | public UuidGatherer(IAssetService assetService) : this(assetService, new Dictionary<UUID, sbyte>()) {} |
96 | 96 | ||
97 | /// <summary> | 97 | /// <summary> |
98 | /// Initializes a new instance of the <see cref="OpenSim.Region.Framework.Scenes.UuidGatherer"/> class. | 98 | /// Initializes a new instance of the <see cref="OpenSim.Region.Framework.Scenes.UuidGatherer"/> class. |
@@ -101,7 +101,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
101 | /// Asset service. | 101 | /// Asset service. |
102 | /// </param> | 102 | /// </param> |
103 | /// <param name="collector"> | 103 | /// <param name="collector"> |
104 | /// Gathered UUIDs will be collected in this dictinaory. | 104 | /// Gathered UUIDs will be collected in this dictinaory. |
105 | /// It can be pre-populated if you want to stop the gatherer from analyzing assets that have already been fetched and inspected. | 105 | /// It can be pre-populated if you want to stop the gatherer from analyzing assets that have already been fetched and inspected. |
106 | /// </param> | 106 | /// </param> |
107 | public UuidGatherer(IAssetService assetService, IDictionary<UUID, sbyte> collector) | 107 | public UuidGatherer(IAssetService assetService, IDictionary<UUID, sbyte> collector) |
@@ -128,7 +128,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
128 | m_assetUuidsToInspect.Enqueue(uuid); | 128 | m_assetUuidsToInspect.Enqueue(uuid); |
129 | return true; | 129 | return true; |
130 | } | 130 | } |
131 | 131 | ||
132 | /// <summary> | 132 | /// <summary> |
133 | /// Gather all the asset uuids associated with a given object. | 133 | /// Gather all the asset uuids associated with a given object. |
134 | /// </summary> | 134 | /// </summary> |
@@ -194,7 +194,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
194 | catch (Exception) | 194 | catch (Exception) |
195 | { | 195 | { |
196 | m_log.WarnFormat( | 196 | m_log.WarnFormat( |
197 | "[UUID GATHERER]: Could not check particle system for part {0} {1} in object {2} {3} since it is corrupt. Continuing.", | 197 | "[UUID GATHERER]: Could not check particle system for part {0} {1} in object {2} {3} since it is corrupt. Continuing.", |
198 | part.Name, part.UUID, sceneObject.Name, sceneObject.UUID); | 198 | part.Name, part.UUID, sceneObject.Name, sceneObject.UUID); |
199 | } | 199 | } |
200 | } | 200 | } |
@@ -205,7 +205,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
205 | foreach (TaskInventoryItem tii in taskDictionary.Values) | 205 | foreach (TaskInventoryItem tii in taskDictionary.Values) |
206 | { | 206 | { |
207 | // m_log.DebugFormat( | 207 | // m_log.DebugFormat( |
208 | // "[ARCHIVER]: Analysing item {0} asset type {1} in {2} {3}", | 208 | // "[ARCHIVER]: Analysing item {0} asset type {1} in {2} {3}", |
209 | // tii.Name, tii.Type, part.Name, part.UUID); | 209 | // tii.Name, tii.Type, part.Name, part.UUID); |
210 | 210 | ||
211 | if (!GatheredUuids.ContainsKey(tii.AssetID)) | 211 | if (!GatheredUuids.ContainsKey(tii.AssetID)) |
@@ -214,19 +214,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
214 | 214 | ||
215 | // FIXME: We need to make gathering modular but we cannot yet, since gatherers are not guaranteed | 215 | // FIXME: We need to make gathering modular but we cannot yet, since gatherers are not guaranteed |
216 | // to be called with scene objects that are in a scene (e.g. in the case of hg asset mapping and | 216 | // to be called with scene objects that are in a scene (e.g. in the case of hg asset mapping and |
217 | // inventory transfer. There needs to be a way for a module to register a method without assuming a | 217 | // inventory transfer. There needs to be a way for a module to register a method without assuming a |
218 | // Scene.EventManager is present. | 218 | // Scene.EventManager is present. |
219 | // part.ParentGroup.Scene.EventManager.TriggerGatherUuids(part, assetUuids); | 219 | // part.ParentGroup.Scene.EventManager.TriggerGatherUuids(part, assetUuids); |
220 | 220 | ||
221 | 221 | ||
222 | // still needed to retrieve textures used as materials for any parts containing legacy materials stored in DynAttrs | 222 | // still needed to retrieve textures used as materials for any parts containing legacy materials stored in DynAttrs |
223 | RecordMaterialsUuids(part); | 223 | RecordMaterialsUuids(part); |
224 | } | 224 | } |
225 | catch (Exception e) | 225 | catch (Exception e) |
226 | { | 226 | { |
227 | m_log.ErrorFormat("[UUID GATHERER]: Failed to get part - {0}", e); | 227 | m_log.ErrorFormat("[UUID GATHERER]: Failed to get part - {0}", e); |
228 | m_log.DebugFormat( | 228 | m_log.DebugFormat( |
229 | "[UUID GATHERER]: Texture entry length for prim was {0} (min is 46)", | 229 | "[UUID GATHERER]: Texture entry length for prim was {0} (min is 46)", |
230 | part.Shape.TextureEntry.Length); | 230 | part.Shape.TextureEntry.Length); |
231 | } | 231 | } |
232 | } | 232 | } |
@@ -283,7 +283,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
283 | return; | 283 | return; |
284 | 284 | ||
285 | try | 285 | try |
286 | { | 286 | { |
287 | AssetBase assetBase = GetAsset(assetUuid); | 287 | AssetBase assetBase = GetAsset(assetUuid); |
288 | 288 | ||
289 | if (null != assetBase) | 289 | if (null != assetBase) |
@@ -322,14 +322,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
322 | m_log.ErrorFormat("[UUID GATHERER]: Failed to gather uuids for asset id {0}", assetUuid); | 322 | m_log.ErrorFormat("[UUID GATHERER]: Failed to gather uuids for asset id {0}", assetUuid); |
323 | throw; | 323 | throw; |
324 | } | 324 | } |
325 | } | 325 | } |
326 | 326 | ||
327 | private void AddForInspection(UUID assetUuid, sbyte assetType) | 327 | private void AddForInspection(UUID assetUuid, sbyte assetType) |
328 | { | 328 | { |
329 | // Here, we want to collect uuids which require further asset fetches but mark the others as gathered | 329 | // Here, we want to collect uuids which require further asset fetches but mark the others as gathered |
330 | try | 330 | try |
331 | { | 331 | { |
332 | if ((sbyte)AssetType.Bodypart == assetType | 332 | if ((sbyte)AssetType.Bodypart == assetType |
333 | || (sbyte)AssetType.Clothing == assetType | 333 | || (sbyte)AssetType.Clothing == assetType |
334 | || (sbyte)AssetType.Gesture == assetType | 334 | || (sbyte)AssetType.Gesture == assetType |
335 | || (sbyte)AssetType.Notecard == assetType | 335 | || (sbyte)AssetType.Notecard == assetType |
@@ -347,7 +347,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
347 | catch (Exception) | 347 | catch (Exception) |
348 | { | 348 | { |
349 | m_log.ErrorFormat( | 349 | m_log.ErrorFormat( |
350 | "[UUID GATHERER]: Failed to gather uuids for asset id {0}, type {1}", | 350 | "[UUID GATHERER]: Failed to gather uuids for asset id {0}, type {1}", |
351 | assetUuid, assetType); | 351 | assetUuid, assetType); |
352 | throw; | 352 | throw; |
353 | } | 353 | } |
@@ -511,7 +511,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
511 | /// </summary> | 511 | /// </summary> |
512 | /// <param name="gestureAsset"></param> | 512 | /// <param name="gestureAsset"></param> |
513 | private void RecordGestureAssetUuids(AssetBase gestureAsset) | 513 | private void RecordGestureAssetUuids(AssetBase gestureAsset) |
514 | { | 514 | { |
515 | using (MemoryStream ms = new MemoryStream(gestureAsset.Data)) | 515 | using (MemoryStream ms = new MemoryStream(gestureAsset.Data)) |
516 | using (StreamReader sr = new StreamReader(ms)) | 516 | using (StreamReader sr = new StreamReader(ms)) |
517 | { | 517 | { |