diff options
author | onefang | 2019-05-19 21:24:15 +1000 |
---|---|---|
committer | onefang | 2019-05-19 21:24:15 +1000 |
commit | 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb (patch) | |
tree | a9fbc62df9eb2d1d9ba2698d8552eae71eca20d8 /OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps | |
parent | Add a build script. (diff) | |
download | opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.zip opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.gz opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.bz2 opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.xz |
Dump OpenSim 0.9.0.1 into it's own branch.
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs | 14 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs | 18 |
2 files changed, 17 insertions, 15 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs index 94f8bc1..b044e56 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs | |||
@@ -47,7 +47,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
47 | { | 47 | { |
48 | // private static readonly ILog m_log = | 48 | // private static readonly ILog m_log = |
49 | // LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 49 | // LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
50 | 50 | ||
51 | private Scene m_scene; | 51 | private Scene m_scene; |
52 | 52 | ||
53 | #region INonSharedRegionModule Members | 53 | #region INonSharedRegionModule Members |
@@ -76,7 +76,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
76 | } | 76 | } |
77 | 77 | ||
78 | public void Close() | 78 | public void Close() |
79 | { | 79 | { |
80 | } | 80 | } |
81 | 81 | ||
82 | public string Name | 82 | public string Name |
@@ -121,6 +121,9 @@ namespace OpenSim.Region.ClientStack.Linden | |||
121 | 121 | ||
122 | 122 | ||
123 | OSD r = OSDParser.DeserializeLLSDXml((string)request["requestbody"]); | 123 | OSD r = OSDParser.DeserializeLLSDXml((string)request["requestbody"]); |
124 | if (r.Type != OSDType.Map) // not a proper req | ||
125 | return responsedata; | ||
126 | |||
124 | //UUID session_id = UUID.Zero; | 127 | //UUID session_id = UUID.Zero; |
125 | bool bypass_raycast = false; | 128 | bool bypass_raycast = false; |
126 | uint everyone_mask = 0; | 129 | uint everyone_mask = 0; |
@@ -157,9 +160,6 @@ namespace OpenSim.Region.ClientStack.Linden | |||
157 | int state = 0; | 160 | int state = 0; |
158 | int lastattach = 0; | 161 | int lastattach = 0; |
159 | 162 | ||
160 | if (r.Type != OSDType.Map) // not a proper req | ||
161 | return responsedata; | ||
162 | |||
163 | OSDMap rm = (OSDMap)r; | 163 | OSDMap rm = (OSDMap)r; |
164 | 164 | ||
165 | if (rm.ContainsKey("ObjectData")) //v2 | 165 | if (rm.ContainsKey("ObjectData")) //v2 |
@@ -307,8 +307,6 @@ namespace OpenSim.Region.ClientStack.Linden | |||
307 | } | 307 | } |
308 | } | 308 | } |
309 | 309 | ||
310 | |||
311 | |||
312 | Vector3 pos = m_scene.GetNewRezLocation(ray_start, ray_end, ray_target_id, rotation, (bypass_raycast) ? (byte)1 : (byte)0, (ray_end_is_intersection) ? (byte)1 : (byte)0, true, scale, false); | 310 | Vector3 pos = m_scene.GetNewRezLocation(ray_start, ray_end, ray_target_id, rotation, (bypass_raycast) ? (byte)1 : (byte)0, (ray_end_is_intersection) ? (byte)1 : (byte)0, true, scale, false); |
313 | 311 | ||
314 | PrimitiveBaseShape pbs = PrimitiveBaseShape.CreateBox(); | 312 | PrimitiveBaseShape pbs = PrimitiveBaseShape.CreateBox(); |
@@ -359,6 +357,8 @@ namespace OpenSim.Region.ClientStack.Linden | |||
359 | rootpart.NextOwnerMask = next_owner_mask; | 357 | rootpart.NextOwnerMask = next_owner_mask; |
360 | rootpart.Material = (byte)material; | 358 | rootpart.Material = (byte)material; |
361 | 359 | ||
360 | obj.InvalidateDeepEffectivePerms(); | ||
361 | |||
362 | m_scene.PhysicsScene.AddPhysicsActorTaint(rootpart.PhysActor); | 362 | m_scene.PhysicsScene.AddPhysicsActorTaint(rootpart.PhysActor); |
363 | 363 | ||
364 | responsedata["int_response_code"] = 200; //501; //410; //404; | 364 | responsedata["int_response_code"] = 200; //501; //410; //404; |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs index 769fe28..116c51f 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs | |||
@@ -189,7 +189,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
189 | if (i == 0) | 189 | if (i == 0) |
190 | { | 190 | { |
191 | rootpos = obj.Position; | 191 | rootpos = obj.Position; |
192 | // rootrot = obj.Rotation; | 192 | // rootrot = obj.Rotation; |
193 | } | 193 | } |
194 | 194 | ||
195 | // Combine the extraparams data into it's ugly blob again.... | 195 | // Combine the extraparams data into it's ugly blob again.... |
@@ -284,6 +284,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
284 | prim.OwnerID = AgentId; | 284 | prim.OwnerID = AgentId; |
285 | prim.GroupID = obj.GroupID; | 285 | prim.GroupID = obj.GroupID; |
286 | prim.LastOwnerID = prim.OwnerID; | 286 | prim.LastOwnerID = prim.OwnerID; |
287 | prim.RezzerID = AgentId; | ||
287 | prim.CreationDate = Util.UnixTimeSinceEpoch(); | 288 | prim.CreationDate = Util.UnixTimeSinceEpoch(); |
288 | prim.Name = obj.Name; | 289 | prim.Name = obj.Name; |
289 | prim.Description = ""; | 290 | prim.Description = ""; |
@@ -320,7 +321,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
320 | pbs.TextureEntry = tmp.GetBytes(); | 321 | pbs.TextureEntry = tmp.GetBytes(); |
321 | prim.Shape = pbs; | 322 | prim.Shape = pbs; |
322 | prim.Scale = obj.Scale; | 323 | prim.Scale = obj.Scale; |
323 | 324 | ||
324 | SceneObjectGroup grp = new SceneObjectGroup(); | 325 | SceneObjectGroup grp = new SceneObjectGroup(); |
325 | 326 | ||
326 | grp.SetRootPart(prim); | 327 | grp.SetRootPart(prim); |
@@ -328,21 +329,22 @@ namespace OpenSim.Region.ClientStack.Linden | |||
328 | if (i == 0) | 329 | if (i == 0) |
329 | { | 330 | { |
330 | rootGroup = grp; | 331 | rootGroup = grp; |
331 | 332 | ||
332 | } | 333 | } |
333 | grp.AttachToScene(m_scene); | 334 | grp.AttachToScene(m_scene); |
334 | grp.AbsolutePosition = obj.Position; | 335 | grp.AbsolutePosition = obj.Position; |
335 | prim.RotationOffset = obj.Rotation; | 336 | prim.RotationOffset = obj.Rotation; |
336 | 337 | ||
338 | |||
337 | // Required for linking | 339 | // Required for linking |
338 | grp.RootPart.ClearUpdateSchedule(); | 340 | grp.RootPart.ClearUpdateSchedule(); |
339 | 341 | ||
340 | if (m_scene.Permissions.CanRezObject(1, avatar.UUID, pos)) | 342 | if (m_scene.Permissions.CanRezObject(1, avatar.UUID, pos)) |
341 | { | 343 | { |
342 | m_scene.AddSceneObject(grp); | 344 | m_scene.AddSceneObject(grp); |
343 | grp.AbsolutePosition = obj.Position; | 345 | grp.AbsolutePosition = obj.Position; |
344 | } | 346 | } |
345 | 347 | ||
346 | allparts[i] = grp; | 348 | allparts[i] = grp; |
347 | } | 349 | } |
348 | 350 | ||
@@ -358,7 +360,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
358 | pos | 360 | pos |
359 | = m_scene.GetNewRezLocation( | 361 | = m_scene.GetNewRezLocation( |
360 | Vector3.Zero, rootpos, UUID.Zero, rot, (byte)1, 1, true, allparts[0].GroupScale, false); | 362 | Vector3.Zero, rootpos, UUID.Zero, rot, (byte)1, 1, true, allparts[0].GroupScale, false); |
361 | 363 | ||
362 | responsedata["int_response_code"] = 200; //501; //410; //404; | 364 | responsedata["int_response_code"] = 200; //501; //410; //404; |
363 | responsedata["content_type"] = "text/plain"; | 365 | responsedata["content_type"] = "text/plain"; |
364 | responsedata["keepalive"] = false; | 366 | responsedata["keepalive"] = false; |
@@ -366,7 +368,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
366 | 368 | ||
367 | return responsedata; | 369 | return responsedata; |
368 | } | 370 | } |
369 | 371 | ||
370 | private string ConvertUintToBytes(uint val) | 372 | private string ConvertUintToBytes(uint val) |
371 | { | 373 | { |
372 | byte[] resultbytes = Utils.UIntToBytes(val); | 374 | byte[] resultbytes = Utils.UIntToBytes(val); |