diff options
author | Kitto Flora | 2010-02-12 14:08:32 -0500 |
---|---|---|
committer | Kitto Flora | 2010-02-12 14:08:32 -0500 |
commit | 6a70349512a612948918db2f2f485e87b0bc87e6 (patch) | |
tree | bdbb11f3ec840c7a14402f0acdc302b04d5a0692 /OpenSim/Region | |
parent | Merge branch 'master' of ssh://3dhosting.de/var/git/careminster (diff) | |
parent | Resolve a merge issue (diff) | |
download | opensim-SC-6a70349512a612948918db2f2f485e87b0bc87e6.zip opensim-SC-6a70349512a612948918db2f2f485e87b0bc87e6.tar.gz opensim-SC-6a70349512a612948918db2f2f485e87b0bc87e6.tar.bz2 opensim-SC-6a70349512a612948918db2f2f485e87b0bc87e6.tar.xz |
Merge branch 'master' of ssh://3dhosting.de/var/git/careminster
Diffstat (limited to 'OpenSim/Region')
13 files changed, 175 insertions, 64 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 1496f5c..3d9eaa1 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -5177,6 +5177,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5177 | { | 5177 | { |
5178 | ScriptDialogReplyPacket rdialog = (ScriptDialogReplyPacket)Pack; | 5178 | ScriptDialogReplyPacket rdialog = (ScriptDialogReplyPacket)Pack; |
5179 | 5179 | ||
5180 | //m_log.DebugFormat("[CLIENT]: Received ScriptDialogReply from {0}", rdialog.Data.ObjectID); | ||
5181 | |||
5180 | #region Packet Session and User Check | 5182 | #region Packet Session and User Check |
5181 | if (m_checkPackets) | 5183 | if (m_checkPackets) |
5182 | { | 5184 | { |
@@ -5197,7 +5199,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5197 | args.Type = ChatTypeEnum.Shout; | 5199 | args.Type = ChatTypeEnum.Shout; |
5198 | args.Position = new Vector3(); | 5200 | args.Position = new Vector3(); |
5199 | args.Scene = Scene; | 5201 | args.Scene = Scene; |
5200 | args.Sender = this; | 5202 | args.Sender = this; |
5201 | ChatMessage handlerChatFromClient2 = OnChatFromClient; | 5203 | ChatMessage handlerChatFromClient2 = OnChatFromClient; |
5202 | if (handlerChatFromClient2 != null) | 5204 | if (handlerChatFromClient2 != null) |
5203 | handlerChatFromClient2(this, args); | 5205 | handlerChatFromClient2(this, args); |
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 35c59aa..144c8d1 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -115,7 +115,6 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
115 | // client.OnAvatarNowWearing -= AvatarIsWearing; | 115 | // client.OnAvatarNowWearing -= AvatarIsWearing; |
116 | } | 116 | } |
117 | 117 | ||
118 | |||
119 | public void SetAppearanceAssets(UUID userID, ref AvatarAppearance appearance) | 118 | public void SetAppearanceAssets(UUID userID, ref AvatarAppearance appearance) |
120 | { | 119 | { |
121 | IInventoryService invService = m_scene.InventoryService; | 120 | IInventoryService invService = m_scene.InventoryService; |
@@ -139,7 +138,10 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
139 | } | 138 | } |
140 | else | 139 | else |
141 | { | 140 | { |
142 | m_log.ErrorFormat("[APPEARANCE]: Can't find inventory item {0}, setting to default", appearance.Wearables[i].ItemID); | 141 | m_log.ErrorFormat( |
142 | "[APPEARANCE]: Can't find inventory item {0} for {1}, setting to default", | ||
143 | appearance.Wearables[i].ItemID, (WearableType)i); | ||
144 | |||
143 | appearance.Wearables[i].AssetID = def.Wearables[i].AssetID; | 145 | appearance.Wearables[i].AssetID = def.Wearables[i].AssetID; |
144 | } | 146 | } |
145 | } | 147 | } |
diff --git a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs index 679c871..e3c7bbf 100644 --- a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs | |||
@@ -358,18 +358,18 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture | |||
358 | // tmptex.DefaultTexture.Fullbright = true; | 358 | // tmptex.DefaultTexture.Fullbright = true; |
359 | 359 | ||
360 | part.UpdateTexture(tmptex); | 360 | part.UpdateTexture(tmptex); |
361 | } | 361 | } |
362 | 362 | ||
363 | if (oldID != UUID.Zero && ((Disp & DISP_EXPIRE) != 0)) | 363 | if (oldID != UUID.Zero && ((Disp & DISP_EXPIRE) != 0)) |
364 | { | 364 | { |
365 | if (oldAsset == null) oldAsset = scene.AssetService.Get(oldID.ToString()); | 365 | if (oldAsset == null) oldAsset = scene.AssetService.Get(oldID.ToString()); |
366 | if (oldAsset != null) | 366 | if (oldAsset != null) |
367 | { | 367 | { |
368 | if (oldAsset.Temporary == true) | 368 | if (oldAsset.Temporary == true) |
369 | { | 369 | { |
370 | scene.AssetService.Delete(oldID.ToString()); | 370 | scene.AssetService.Delete(oldID.ToString()); |
371 | } | 371 | } |
372 | } | 372 | } |
373 | } | 373 | } |
374 | } | 374 | } |
375 | 375 | ||
diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs index d57a8e5..3291be4 100644 --- a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs | |||
@@ -342,6 +342,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender | |||
342 | m_log.Error( | 342 | m_log.Error( |
343 | "[VECTORRENDERMODULE]: OpenJpeg Encode Failed. Empty byte data returned!"); | 343 | "[VECTORRENDERMODULE]: OpenJpeg Encode Failed. Empty byte data returned!"); |
344 | } | 344 | } |
345 | |||
345 | m_textureManager.ReturnData(id, imageJ2000); | 346 | m_textureManager.ReturnData(id, imageJ2000); |
346 | } | 347 | } |
347 | 348 | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs index 0357c60..b7f3adf 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs | |||
@@ -435,12 +435,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion | |||
435 | } | 435 | } |
436 | 436 | ||
437 | OSDMap resp = new OSDMap(2); | 437 | OSDMap resp = new OSDMap(2); |
438 | string reason = String.Empty; | 438 | string reason = String.Empty; |
439 | uint teleportFlags = 0; | 439 | uint teleportFlags = 0; |
440 | if (args.ContainsKey("teleport_flags")) | 440 | if (args.ContainsKey("teleport_flags")) |
441 | { | 441 | { |
442 | teleportFlags = args["teleport_flags"].AsUInteger(); | 442 | teleportFlags = args["teleport_flags"].AsUInteger(); |
443 | } | 443 | } |
444 | 444 | ||
445 | // This is the meaning of POST agent | 445 | // This is the meaning of POST agent |
446 | m_regionClient.AdjustUserInformation(aCircuit); | 446 | m_regionClient.AdjustUserInformation(aCircuit); |
diff --git a/OpenSim/Region/Framework/Interfaces/IDynamicTextureManager.cs b/OpenSim/Region/Framework/Interfaces/IDynamicTextureManager.cs index abcaf91..c289cdb 100644 --- a/OpenSim/Region/Framework/Interfaces/IDynamicTextureManager.cs +++ b/OpenSim/Region/Framework/Interfaces/IDynamicTextureManager.cs | |||
@@ -43,10 +43,67 @@ namespace OpenSim.Region.Framework.Interfaces | |||
43 | int updateTimer, bool SetBlending, int disp, byte AlphaValue, int face); | 43 | int updateTimer, bool SetBlending, int disp, byte AlphaValue, int face); |
44 | UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data, string extraParams, | 44 | UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data, string extraParams, |
45 | int updateTimer); | 45 | int updateTimer); |
46 | |||
47 | /// Apply a dynamically generated texture to all sides of the given prim. The texture is not persisted to the | ||
48 | /// asset service. | ||
49 | /// </summary> | ||
50 | /// <param name="simID">The simulator in which the texture is being generated</param> | ||
51 | /// <param name="primID">The prim to which to apply the texture.</param> | ||
52 | /// <param name="contentType">The content type to create. Current choices are "vector" to create a vector | ||
53 | /// based texture or "image" to create a texture from an image at a particular URL</param> | ||
54 | /// <param name="data">The data for the generator</param> | ||
55 | /// <param name="extraParams">Parameters for the generator that don't form part of the main data.</param> | ||
56 | /// <param name="updateTimer">If zero, the image is never updated after the first generation. If positive | ||
57 | /// the image is updated at the given interval. Not implemented for </param> | ||
58 | /// <param name="SetBlending"> | ||
59 | /// If true, the newly generated texture is blended with the appropriate existing ones on the prim | ||
60 | /// </param> | ||
61 | /// <param name="AlphaValue"> | ||
62 | /// The alpha value of the generated texture. | ||
63 | /// </param> | ||
64 | /// <returns> | ||
65 | /// The UUID of the texture updater, not the texture UUID. If you need the texture UUID then you will need | ||
66 | /// to obtain it directly from the SceneObjectPart. For instance, if ALL_SIDES is set then this texture | ||
67 | /// can be obtained as SceneObjectPart.Shape.Textures.DefaultTexture.TextureID | ||
68 | /// </returns> | ||
46 | UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data, string extraParams, | 69 | UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data, string extraParams, |
47 | int updateTimer, bool SetBlending, byte AlphaValue); | 70 | int updateTimer, bool SetBlending, byte AlphaValue); |
48 | UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data, string extraParams, | 71 | |
49 | int updateTimer, bool SetBlending, int disp, byte AlphaValue, int face); | 72 | /// <summary> |
73 | /// Apply a dynamically generated texture to the given prim. | ||
74 | /// </summary> | ||
75 | /// <param name="simID">The simulator in which the texture is being generated</param> | ||
76 | /// <param name="primID">The prim to which to apply the texture.</param> | ||
77 | /// <param name="contentType">The content type to create. Current choices are "vector" to create a vector | ||
78 | /// based texture or "image" to create a texture from an image at a particular URL</param> | ||
79 | /// <param name="data">The data for the generator</param> | ||
80 | /// <param name="extraParams">Parameters for the generator that don't form part of the main data.</param> | ||
81 | /// <param name="updateTimer">If zero, the image is never updated after the first generation. If positive | ||
82 | /// the image is updated at the given interval. Not implemented for </param> | ||
83 | /// <param name="SetBlending"> | ||
84 | /// If true, the newly generated texture is blended with the appropriate existing ones on the prim | ||
85 | /// </param> | ||
86 | /// <param name="disp"> | ||
87 | /// Display flags. If DISP_EXPIRE then the old texture is deleted if it is replaced by a | ||
88 | /// newer generated texture (may not currently be implemented). If DISP_TEMP then the asset is flagged as | ||
89 | /// temporary, which often means that it is not persisted to the database. | ||
90 | /// </param> | ||
91 | /// <param name="AlphaValue"> | ||
92 | /// The alpha value of the generated texture. | ||
93 | /// </param> | ||
94 | /// <param name="face"> | ||
95 | /// The face of the prim on which to put the generated texture. If ALL_SIDES then all sides of the prim are | ||
96 | /// set | ||
97 | /// </param> | ||
98 | /// <returns> | ||
99 | /// The UUID of the texture updater, not the texture UUID. If you need the texture UUID then you will need | ||
100 | /// to obtain it directly from the SceneObjectPart. For instance, if ALL_SIDES is set then this texture | ||
101 | /// can be obtained as SceneObjectPart.Shape.Textures.DefaultTexture.TextureID | ||
102 | /// </returns> | ||
103 | UUID AddDynamicTextureData( | ||
104 | UUID simID, UUID primID, string contentType, string data, string extraParams, | ||
105 | int updateTimer, bool SetBlending, int disp, byte AlphaValue, int face); | ||
106 | |||
50 | void GetDrawStringSize(string contentType, string text, string fontName, int fontSize, | 107 | void GetDrawStringSize(string contentType, string text, string fontName, int fontSize, |
51 | out double xSize, out double ySize); | 108 | out double xSize, out double ySize); |
52 | } | 109 | } |
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index cabb5f9..22909bc 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -209,6 +209,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
209 | public event OnSendNewWindlightProfileTargetedDelegate OnSendNewWindlightProfileTargeted; | 209 | public event OnSendNewWindlightProfileTargetedDelegate OnSendNewWindlightProfileTargeted; |
210 | public event OnSaveNewWindlightProfileDelegate OnSaveNewWindlightProfile; | 210 | public event OnSaveNewWindlightProfileDelegate OnSaveNewWindlightProfile; |
211 | 211 | ||
212 | /// <summary> | ||
213 | /// Triggered when an object or attachment enters a scene | ||
214 | /// </summary> | ||
215 | public event OnIncomingSceneObjectDelegate OnIncomingSceneObject; | ||
216 | public delegate void OnIncomingSceneObjectDelegate(SceneObjectGroup so); | ||
217 | |||
212 | public delegate void NewInventoryItemUploadComplete(UUID avatarID, UUID assetID, string name, int userlevel); | 218 | public delegate void NewInventoryItemUploadComplete(UUID avatarID, UUID assetID, string name, int userlevel); |
213 | 219 | ||
214 | public event NewInventoryItemUploadComplete OnNewInventoryItemUploadComplete; | 220 | public event NewInventoryItemUploadComplete OnNewInventoryItemUploadComplete; |
@@ -411,7 +417,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
411 | } | 417 | } |
412 | } | 418 | } |
413 | } | 419 | } |
414 | } | 420 | } |
415 | 421 | ||
416 | public void TriggerGetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID) | 422 | public void TriggerGetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID) |
417 | { | 423 | { |
@@ -1228,6 +1234,27 @@ namespace OpenSim.Region.Framework.Scenes | |||
1228 | } | 1234 | } |
1229 | } | 1235 | } |
1230 | 1236 | ||
1237 | public void TriggerOnIncomingSceneObject(SceneObjectGroup so) | ||
1238 | { | ||
1239 | OnIncomingSceneObjectDelegate handlerIncomingSceneObject = OnIncomingSceneObject; | ||
1240 | if (handlerIncomingSceneObject != null) | ||
1241 | { | ||
1242 | foreach (OnIncomingSceneObjectDelegate d in handlerIncomingSceneObject.GetInvocationList()) | ||
1243 | { | ||
1244 | try | ||
1245 | { | ||
1246 | d(so); | ||
1247 | } | ||
1248 | catch (Exception e) | ||
1249 | { | ||
1250 | m_log.ErrorFormat( | ||
1251 | "[EVENT MANAGER]: Delegate for TriggerOnIncomingSceneObject failed - continuing. {0} {1}", | ||
1252 | e.Message, e.StackTrace); | ||
1253 | } | ||
1254 | } | ||
1255 | } | ||
1256 | } | ||
1257 | |||
1231 | public void TriggerOnRegisterCaps(UUID agentID, Caps caps) | 1258 | public void TriggerOnRegisterCaps(UUID agentID, Caps caps) |
1232 | { | 1259 | { |
1233 | RegisterCapsEvent handlerRegisterCaps = OnRegisterCaps; | 1260 | RegisterCapsEvent handlerRegisterCaps = OnRegisterCaps; |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index d2f33b0..12f0489 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2433,9 +2433,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
2433 | return successYN; | 2433 | return successYN; |
2434 | } | 2434 | } |
2435 | 2435 | ||
2436 | /// <summary> | ||
2437 | /// Called when objects or attachments cross the border between regions. | ||
2438 | /// </summary> | ||
2439 | /// <param name="sog"></param> | ||
2440 | /// <returns></returns> | ||
2436 | public bool IncomingCreateObject(ISceneObject sog) | 2441 | public bool IncomingCreateObject(ISceneObject sog) |
2437 | { | 2442 | { |
2438 | //m_log.Debug(" >>> IncomingCreateObject <<< " + ((SceneObjectGroup)sog).AbsolutePosition + " deleted? " + ((SceneObjectGroup)sog).IsDeleted); | 2443 | //m_log.Debug(" >>> IncomingCreateObject(sog) <<< " + ((SceneObjectGroup)sog).AbsolutePosition + " deleted? " + ((SceneObjectGroup)sog).IsDeleted); |
2439 | SceneObjectGroup newObject; | 2444 | SceneObjectGroup newObject; |
2440 | try | 2445 | try |
2441 | { | 2446 | { |
@@ -2452,7 +2457,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
2452 | m_log.DebugFormat("[SCENE]: Problem adding scene object {0} in {1} ", sog.UUID, RegionInfo.RegionName); | 2457 | m_log.DebugFormat("[SCENE]: Problem adding scene object {0} in {1} ", sog.UUID, RegionInfo.RegionName); |
2453 | return false; | 2458 | return false; |
2454 | } | 2459 | } |
2460 | |||
2455 | newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, 1); | 2461 | newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, 1); |
2462 | |||
2463 | // Do this as late as possible so that listeners have full access to the incoming object | ||
2464 | EventManager.TriggerOnIncomingSceneObject(newObject); | ||
2465 | |||
2456 | return true; | 2466 | return true; |
2457 | } | 2467 | } |
2458 | 2468 | ||
@@ -2464,6 +2474,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2464 | /// <returns>False</returns> | 2474 | /// <returns>False</returns> |
2465 | public virtual bool IncomingCreateObject(UUID userID, UUID itemID) | 2475 | public virtual bool IncomingCreateObject(UUID userID, UUID itemID) |
2466 | { | 2476 | { |
2477 | //m_log.DebugFormat(" >>> IncomingCreateObject(userID, itemID) <<< {0} {1}", userID, itemID); | ||
2478 | |||
2467 | ScenePresence sp = GetScenePresence(userID); | 2479 | ScenePresence sp = GetScenePresence(userID); |
2468 | if (sp != null) | 2480 | if (sp != null) |
2469 | { | 2481 | { |
@@ -2498,7 +2510,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2498 | foreach (SceneObjectPart p in sceneObject.Children.Values) | 2510 | foreach (SceneObjectPart p in sceneObject.Children.Values) |
2499 | p.LocalId = 0; | 2511 | p.LocalId = 0; |
2500 | 2512 | ||
2501 | if ((sceneObject.RootPart.Shape.PCode == (byte)PCode.Prim) && (sceneObject.RootPart.Shape.State != 0)) // Attachment | 2513 | if (sceneObject.IsAttachmentCheckFull()) // Attachment |
2502 | { | 2514 | { |
2503 | sceneObject.RootPart.AddFlag(PrimFlags.TemporaryOnRez); | 2515 | sceneObject.RootPart.AddFlag(PrimFlags.TemporaryOnRez); |
2504 | sceneObject.RootPart.AddFlag(PrimFlags.Phantom); | 2516 | sceneObject.RootPart.AddFlag(PrimFlags.Phantom); |
@@ -2523,29 +2535,23 @@ namespace OpenSim.Region.Framework.Scenes | |||
2523 | 2535 | ||
2524 | //RootPrim.SetParentLocalId(parentLocalID); | 2536 | //RootPrim.SetParentLocalId(parentLocalID); |
2525 | 2537 | ||
2526 | m_log.DebugFormat("[ATTACHMENT]: Received " + | 2538 | m_log.DebugFormat( |
2527 | "attachment {0}, inworld asset id {1}", | 2539 | "[ATTACHMENT]: Received attachment {0}, inworld asset id {1}", grp.GetFromItemID(), grp.UUID); |
2528 | //grp.RootPart.LastOwnerID.ToString(), | ||
2529 | grp.GetFromItemID(), | ||
2530 | grp.UUID.ToString()); | ||
2531 | 2540 | ||
2532 | //grp.SetFromAssetID(grp.RootPart.LastOwnerID); | 2541 | //grp.SetFromAssetID(grp.RootPart.LastOwnerID); |
2533 | m_log.DebugFormat("[ATTACHMENT]: Attach " + | 2542 | m_log.DebugFormat( |
2534 | "to avatar {0} at position {1}", | 2543 | "[ATTACHMENT]: Attach to avatar {0} at position {1}", sp.UUID, grp.AbsolutePosition); |
2535 | sp.UUID.ToString(), grp.AbsolutePosition); | 2544 | |
2536 | AttachObject(sp.ControllingClient, | 2545 | AttachObject( |
2537 | grp.LocalId, (uint)0, | 2546 | sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition, false); |
2538 | grp.GroupRotation, | ||
2539 | grp.AbsolutePosition, false); | ||
2540 | RootPrim.RemFlag(PrimFlags.TemporaryOnRez); | 2547 | RootPrim.RemFlag(PrimFlags.TemporaryOnRez); |
2541 | grp.SendGroupFullUpdate(); | 2548 | grp.SendGroupFullUpdate(); |
2542 | } | 2549 | } |
2543 | else | 2550 | else |
2544 | { | 2551 | { |
2545 | RootPrim.RemFlag(PrimFlags.TemporaryOnRez); | 2552 | RootPrim.RemFlag(PrimFlags.TemporaryOnRez); |
2546 | RootPrim.AddFlag(PrimFlags.TemporaryOnRez); | 2553 | RootPrim.AddFlag(PrimFlags.TemporaryOnRez); |
2547 | } | 2554 | } |
2548 | |||
2549 | } | 2555 | } |
2550 | else | 2556 | else |
2551 | { | 2557 | { |
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index 545183b..9ceab19 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | |||
@@ -191,7 +191,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
191 | if (handlerChildAgentUpdate != null) | 191 | if (handlerChildAgentUpdate != null) |
192 | handlerChildAgentUpdate(cAgentData); | 192 | handlerChildAgentUpdate(cAgentData); |
193 | 193 | ||
194 | |||
195 | return true; | 194 | return true; |
196 | } | 195 | } |
197 | 196 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 9cb1398..4676a30 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -337,7 +337,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
337 | } | 337 | } |
338 | } | 338 | } |
339 | 339 | ||
340 | private bool IsAttachmentCheckFull() | 340 | /// <summary> |
341 | /// Check both the attachment property and the relevant properties of the underlying root part. | ||
342 | /// </summary> | ||
343 | /// This is necessary in some cases, particularly when a scene object has just crossed into a region and doesn't | ||
344 | /// have the IsAttachment property yet checked. | ||
345 | /// | ||
346 | /// FIXME: However, this should be fixed so that this property | ||
347 | /// propertly reflects the underlying status. | ||
348 | /// <returns></returns> | ||
349 | public bool IsAttachmentCheckFull() | ||
341 | { | 350 | { |
342 | return (IsAttachment || (m_rootPart.Shape.PCode == 9 && m_rootPart.Shape.State != 0)); | 351 | return (IsAttachment || (m_rootPart.Shape.PCode == 9 && m_rootPart.Shape.State != 0)); |
343 | } | 352 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 72604d8..11682d9 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -4171,9 +4171,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
4171 | ScheduleFullUpdate(); | 4171 | ScheduleFullUpdate(); |
4172 | } | 4172 | } |
4173 | 4173 | ||
4174 | // Added to handle bug in libsecondlife's TextureEntry.ToBytes() | 4174 | /// <summary> |
4175 | // not handling RGBA properly. Cycles through, and "fixes" the color | 4175 | /// Update the textures on the part. |
4176 | // info | 4176 | /// </summary> |
4177 | /// Added to handle bug in libsecondlife's TextureEntry.ToBytes() | ||
4178 | /// not handling RGBA properly. Cycles through, and "fixes" the color | ||
4179 | /// info | ||
4180 | /// <param name="tex"></param> | ||
4177 | public void UpdateTexture(Primitive.TextureEntry tex) | 4181 | public void UpdateTexture(Primitive.TextureEntry tex) |
4178 | { | 4182 | { |
4179 | //Color4 tmpcolor; | 4183 | //Color4 tmpcolor; |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index f1555f7..1b7ca8b 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -106,6 +106,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
106 | } | 106 | } |
107 | protected ScenePresenceAnimator m_animator; | 107 | protected ScenePresenceAnimator m_animator; |
108 | 108 | ||
109 | /// <value> | ||
110 | /// The scene objects attached to this avatar. Do not change this list directly - use methods such as | ||
111 | /// AddAttachment() and RemoveAttachment(). Lock this list when performing any read operations upon it. | ||
112 | /// </value> | ||
113 | public List<SceneObjectGroup> Attachments | ||
114 | { | ||
115 | get { return m_attachments; } | ||
116 | } | ||
117 | protected List<SceneObjectGroup> m_attachments = new List<SceneObjectGroup>(); | ||
118 | |||
109 | private Dictionary<UUID, ScriptControllers> scriptedcontrols = new Dictionary<UUID, ScriptControllers>(); | 119 | private Dictionary<UUID, ScriptControllers> scriptedcontrols = new Dictionary<UUID, ScriptControllers>(); |
110 | private ScriptControlled IgnoredControls = ScriptControlled.CONTROL_ZERO; | 120 | private ScriptControlled IgnoredControls = ScriptControlled.CONTROL_ZERO; |
111 | private ScriptControlled LastCommands = ScriptControlled.CONTROL_ZERO; | 121 | private ScriptControlled LastCommands = ScriptControlled.CONTROL_ZERO; |
@@ -223,9 +233,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
223 | // Agent's Draw distance. | 233 | // Agent's Draw distance. |
224 | protected float m_DrawDistance; | 234 | protected float m_DrawDistance; |
225 | 235 | ||
226 | protected AvatarAppearance m_appearance; | 236 | protected AvatarAppearance m_appearance; |
227 | |||
228 | protected List<SceneObjectGroup> m_attachments = new List<SceneObjectGroup>(); | ||
229 | 237 | ||
230 | // neighbouring regions we have enabled a child agent in | 238 | // neighbouring regions we have enabled a child agent in |
231 | // holds the seed cap for the child agent in that region | 239 | // holds the seed cap for the child agent in that region |
@@ -640,12 +648,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
640 | #endregion | 648 | #endregion |
641 | 649 | ||
642 | #region Constructor(s) | 650 | #region Constructor(s) |
643 | 651 | ||
644 | private ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo) | 652 | public ScenePresence() |
645 | { | 653 | { |
646 | m_animator = new ScenePresenceAnimator(this); | ||
647 | m_sendCourseLocationsMethod = SendCoarseLocationsDefault; | 654 | m_sendCourseLocationsMethod = SendCoarseLocationsDefault; |
648 | CreateSceneViewer(); | 655 | CreateSceneViewer(); |
656 | m_animator = new ScenePresenceAnimator(this); | ||
657 | } | ||
658 | |||
659 | private ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo) : this() | ||
660 | { | ||
649 | m_rootRegionHandle = reginfo.RegionHandle; | 661 | m_rootRegionHandle = reginfo.RegionHandle; |
650 | m_controllingClient = client; | 662 | m_controllingClient = client; |
651 | m_firstname = m_controllingClient.FirstName; | 663 | m_firstname = m_controllingClient.FirstName; |
@@ -669,7 +681,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
669 | m_reprioritization_timer.Elapsed += new ElapsedEventHandler(Reprioritize); | 681 | m_reprioritization_timer.Elapsed += new ElapsedEventHandler(Reprioritize); |
670 | m_reprioritization_timer.AutoReset = false; | 682 | m_reprioritization_timer.AutoReset = false; |
671 | 683 | ||
672 | |||
673 | AdjustKnownSeeds(); | 684 | AdjustKnownSeeds(); |
674 | Animator.TrySetMovementAnimation("STAND"); | 685 | Animator.TrySetMovementAnimation("STAND"); |
675 | // we created a new ScenePresence (a new child agent) in a fresh region. | 686 | // we created a new ScenePresence (a new child agent) in a fresh region. |
@@ -1150,7 +1161,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1150 | 1161 | ||
1151 | m_controllingClient.MoveAgentIntoRegion(m_regionInfo, AbsolutePosition, look); | 1162 | m_controllingClient.MoveAgentIntoRegion(m_regionInfo, AbsolutePosition, look); |
1152 | SendInitialData(); | 1163 | SendInitialData(); |
1153 | |||
1154 | } | 1164 | } |
1155 | 1165 | ||
1156 | /// <summary> | 1166 | /// <summary> |
@@ -3388,8 +3398,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3388 | m_physicsActor.OnCollisionUpdate += PhysicsCollisionUpdate; | 3398 | m_physicsActor.OnCollisionUpdate += PhysicsCollisionUpdate; |
3389 | m_physicsActor.OnOutOfBounds += OutOfBoundsCall; // Called for PhysicsActors when there's something wrong | 3399 | m_physicsActor.OnOutOfBounds += OutOfBoundsCall; // Called for PhysicsActors when there's something wrong |
3390 | m_physicsActor.SubscribeEvents(500); | 3400 | m_physicsActor.SubscribeEvents(500); |
3391 | m_physicsActor.LocalID = LocalId; | 3401 | m_physicsActor.LocalID = LocalId; |
3392 | |||
3393 | } | 3402 | } |
3394 | 3403 | ||
3395 | private void OutOfBoundsCall(Vector3 pos) | 3404 | private void OutOfBoundsCall(Vector3 pos) |
@@ -3399,7 +3408,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3399 | 3408 | ||
3400 | //AddToPhysicalScene(flying); | 3409 | //AddToPhysicalScene(flying); |
3401 | if (ControllingClient != null) | 3410 | if (ControllingClient != null) |
3402 | ControllingClient.SendAgentAlertMessage("Physics is having a problem with your avatar. You may not be able to move until you relog.",true); | 3411 | ControllingClient.SendAgentAlertMessage("Physics is having a problem with your avatar. You may not be able to move until you relog.", true); |
3403 | } | 3412 | } |
3404 | 3413 | ||
3405 | // Event called by the physics plugin to tell the avatar about a collision. | 3414 | // Event called by the physics plugin to tell the avatar about a collision. |
@@ -3539,13 +3548,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3539 | m_animator = null; | 3548 | m_animator = null; |
3540 | } | 3549 | } |
3541 | 3550 | ||
3542 | public ScenePresence() | ||
3543 | { | ||
3544 | m_sendCourseLocationsMethod = SendCoarseLocationsDefault; | ||
3545 | CreateSceneViewer(); | ||
3546 | m_animator = new ScenePresenceAnimator(this); | ||
3547 | } | ||
3548 | |||
3549 | public void AddAttachment(SceneObjectGroup gobj) | 3551 | public void AddAttachment(SceneObjectGroup gobj) |
3550 | { | 3552 | { |
3551 | lock (m_attachments) | 3553 | lock (m_attachments) |
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 010d97f..f354328 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | |||
@@ -1575,6 +1575,7 @@ Console.WriteLine(" JointCreateFixed"); | |||
1575 | { | 1575 | { |
1576 | //Console.WriteLine("Move " + m_primName); | 1576 | //Console.WriteLine("Move " + m_primName); |
1577 | if (!d.BodyIsEnabled (Body)) d.BodyEnable (Body); // KF add 161009 | 1577 | if (!d.BodyIsEnabled (Body)) d.BodyEnable (Body); // KF add 161009 |
1578 | /* | ||
1578 | // NON-'VEHICLES' are dealt with here | 1579 | // NON-'VEHICLES' are dealt with here |
1579 | if (d.BodyIsEnabled(Body) && !m_angularlock.ApproxEquals(Vector3.Zero, 0.003f)) | 1580 | if (d.BodyIsEnabled(Body) && !m_angularlock.ApproxEquals(Vector3.Zero, 0.003f)) |
1580 | { | 1581 | { |
@@ -1587,6 +1588,7 @@ Console.WriteLine(" JointCreateFixed"); | |||
1587 | avel2.Z = 0; | 1588 | avel2.Z = 0; |
1588 | d.BodySetAngularVel(Body, avel2.X, avel2.Y, avel2.Z); | 1589 | d.BodySetAngularVel(Body, avel2.X, avel2.Y, avel2.Z); |
1589 | } | 1590 | } |
1591 | */ | ||
1590 | //float PID_P = 900.0f; | 1592 | //float PID_P = 900.0f; |
1591 | 1593 | ||
1592 | float m_mass = CalculateMass(); | 1594 | float m_mass = CalculateMass(); |