diff options
Diffstat (limited to 'OpenSim/Region')
6 files changed, 46 insertions, 2 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs index 54ddd97..440f583 100644 --- a/OpenSim/Region/ClientStack/ClientView.API.cs +++ b/OpenSim/Region/ClientStack/ClientView.API.cs | |||
@@ -59,6 +59,7 @@ namespace OpenSim.Region.ClientStack | |||
59 | public event ObjectDuplicate OnObjectDuplicate; | 59 | public event ObjectDuplicate OnObjectDuplicate; |
60 | public event MoveObject OnGrapUpdate; | 60 | public event MoveObject OnGrapUpdate; |
61 | public event AddNewPrim OnAddPrim; | 61 | public event AddNewPrim OnAddPrim; |
62 | public event ObjectExtraParams OnUpdateExtraParams; | ||
62 | public event UpdateShape OnUpdatePrimShape; | 63 | public event UpdateShape OnUpdatePrimShape; |
63 | public event ObjectSelect OnObjectSelect; | 64 | public event ObjectSelect OnObjectSelect; |
64 | public event ObjectDeselect OnObjectDeselect; | 65 | public event ObjectDeselect OnObjectDeselect; |
@@ -968,6 +969,7 @@ namespace OpenSim.Region.ClientStack | |||
968 | objectData.PathTaperY = primData.PathTaperY; | 969 | objectData.PathTaperY = primData.PathTaperY; |
969 | objectData.PathTwist = primData.PathTwist; | 970 | objectData.PathTwist = primData.PathTwist; |
970 | objectData.PathTwistBegin = primData.PathTwistBegin; | 971 | objectData.PathTwistBegin = primData.PathTwistBegin; |
972 | objectData.ExtraParams = primData.ExtraParams; | ||
971 | } | 973 | } |
972 | 974 | ||
973 | /// <summary> | 975 | /// <summary> |
diff --git a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs index 338471e..c248b29 100644 --- a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs +++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs | |||
@@ -218,8 +218,6 @@ namespace OpenSim.Region.ClientStack | |||
218 | if (OnAddPrim != null) | 218 | if (OnAddPrim != null) |
219 | { | 219 | { |
220 | ObjectAddPacket addPacket = (ObjectAddPacket) Pack ; | 220 | ObjectAddPacket addPacket = (ObjectAddPacket) Pack ; |
221 | Console.WriteLine(addPacket.ToString()); | ||
222 | |||
223 | PrimitiveBaseShape shape = new PrimitiveBaseShape(); | 221 | PrimitiveBaseShape shape = new PrimitiveBaseShape(); |
224 | 222 | ||
225 | shape.PCode = addPacket.ObjectData.PCode; | 223 | shape.PCode = addPacket.ObjectData.PCode; |
@@ -258,6 +256,13 @@ namespace OpenSim.Region.ClientStack | |||
258 | } | 256 | } |
259 | } | 257 | } |
260 | break; | 258 | break; |
259 | case PacketType.ObjectExtraParams: | ||
260 | ObjectExtraParamsPacket extraPar = (ObjectExtraParamsPacket)Pack; | ||
261 | if (OnUpdateExtraParams != null) | ||
262 | { | ||
263 | OnUpdateExtraParams(extraPar.ObjectData[0].ObjectLocalID, extraPar.ObjectData[0].ParamType, extraPar.ObjectData[0].ParamInUse, extraPar.ObjectData[0].ParamData); | ||
264 | } | ||
265 | break; | ||
261 | case PacketType.ObjectDuplicate: | 266 | case PacketType.ObjectDuplicate: |
262 | ObjectDuplicatePacket dupe = (ObjectDuplicatePacket)Pack; | 267 | ObjectDuplicatePacket dupe = (ObjectDuplicatePacket)Pack; |
263 | for (int i = 0; i < dupe.ObjectData.Length; i++) | 268 | for (int i = 0; i < dupe.ObjectData.Length; i++) |
diff --git a/OpenSim/Region/Environment/Scenes/Primitive.cs b/OpenSim/Region/Environment/Scenes/Primitive.cs index 4818348..bca8e0c 100644 --- a/OpenSim/Region/Environment/Scenes/Primitive.cs +++ b/OpenSim/Region/Environment/Scenes/Primitive.cs | |||
@@ -588,6 +588,24 @@ namespace OpenSim.Region.Environment.Scenes | |||
588 | 588 | ||
589 | #endregion | 589 | #endregion |
590 | 590 | ||
591 | public void UpdateExtraParam(ushort type, bool inUse, byte[] data) | ||
592 | { | ||
593 | this.m_Shape.ExtraParams = new byte[data.Length + 7]; | ||
594 | int i =0; | ||
595 | uint length = (uint) data.Length; | ||
596 | this.m_Shape.ExtraParams[i++] = 1; | ||
597 | this.m_Shape.ExtraParams[i++] = (byte)(type % 256); | ||
598 | this.m_Shape.ExtraParams[i++] = (byte)((type >> 8) % 256); | ||
599 | |||
600 | this.m_Shape.ExtraParams[i++] = (byte)(length % 256); | ||
601 | this.m_Shape.ExtraParams[i++] = (byte)((length >> 8) % 256); | ||
602 | this.m_Shape.ExtraParams[i++] = (byte)((length >> 16) % 256); | ||
603 | this.m_Shape.ExtraParams[i++] = (byte)((length >> 24) % 256); | ||
604 | Array.Copy(data, 0, this.m_Shape.ExtraParams, i, data.Length); | ||
605 | |||
606 | this.ScheduleFullUpdate(); | ||
607 | } | ||
608 | |||
591 | #region Texture | 609 | #region Texture |
592 | 610 | ||
593 | /// <summary> | 611 | /// <summary> |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs index f39d56a..5bfdccb 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | |||
@@ -327,6 +327,22 @@ namespace OpenSim.Region.Environment.Scenes | |||
327 | } | 327 | } |
328 | } | 328 | } |
329 | 329 | ||
330 | public void UpdateExtraParam(uint primLocalID, ushort type, bool inUse, byte[] data) | ||
331 | { | ||
332 | Primitive prim = null; | ||
333 | foreach (EntityBase ent in Entities.Values) | ||
334 | { | ||
335 | if (ent is SceneObject) | ||
336 | { | ||
337 | prim = ((SceneObject)ent).HasChildPrim(primLocalID); | ||
338 | if (prim != null) | ||
339 | { | ||
340 | prim.UpdateExtraParam(type, inUse, data); | ||
341 | break; | ||
342 | } | ||
343 | } | ||
344 | } | ||
345 | } | ||
330 | /// <summary> | 346 | /// <summary> |
331 | /// | 347 | /// |
332 | /// </summary> | 348 | /// </summary> |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 70d2c6a..1ba23b4 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -548,6 +548,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
548 | client.OnUpdatePrimGroupMouseRotation += UpdatePrimRotation; | 548 | client.OnUpdatePrimGroupMouseRotation += UpdatePrimRotation; |
549 | client.OnUpdatePrimSingleRotation += UpdatePrimSingleRotation; | 549 | client.OnUpdatePrimSingleRotation += UpdatePrimSingleRotation; |
550 | client.OnUpdatePrimScale += UpdatePrimScale; | 550 | client.OnUpdatePrimScale += UpdatePrimScale; |
551 | client.OnUpdateExtraParams += UpdateExtraParam; | ||
551 | client.OnUpdatePrimShape += UpdatePrimShape; | 552 | client.OnUpdatePrimShape += UpdatePrimShape; |
552 | client.OnRequestMapBlocks += RequestMapBlocks; | 553 | client.OnRequestMapBlocks += RequestMapBlocks; |
553 | client.OnUpdatePrimTexture += UpdatePrimTexture; | 554 | client.OnUpdatePrimTexture += UpdatePrimTexture; |
diff --git a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs index f7bf5d6..308dea7 100644 --- a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs | |||
@@ -47,7 +47,9 @@ namespace SimpleApp | |||
47 | public event ObjectSelect OnDeGrapObject; | 47 | public event ObjectSelect OnDeGrapObject; |
48 | public event MoveObject OnGrapUpdate; | 48 | public event MoveObject OnGrapUpdate; |
49 | 49 | ||
50 | |||
50 | public event UpdateShape OnUpdatePrimShape; | 51 | public event UpdateShape OnUpdatePrimShape; |
52 | public event ObjectExtraParams OnUpdateExtraParams; | ||
51 | public event ObjectSelect OnObjectSelect; | 53 | public event ObjectSelect OnObjectSelect; |
52 | public event GenericCall7 OnObjectDescription; | 54 | public event GenericCall7 OnObjectDescription; |
53 | public event GenericCall7 OnObjectName; | 55 | public event GenericCall7 OnObjectName; |