diff options
author | MW | 2007-06-10 13:14:46 +0000 |
---|---|---|
committer | MW | 2007-06-10 13:14:46 +0000 |
commit | 6cfad7ff14b78ce4e817aa130861a2cd179edfb3 (patch) | |
tree | 0cc869e31fc65f519cc10adf026672f0cac39b8e | |
parent | allows the texture of the created/sent primitive to be set. (diff) | |
download | opensim-SC_OLD-6cfad7ff14b78ce4e817aa130861a2cd179edfb3.zip opensim-SC_OLD-6cfad7ff14b78ce4e817aa130861a2cd179edfb3.tar.gz opensim-SC_OLD-6cfad7ff14b78ce4e817aa130861a2cd179edfb3.tar.bz2 opensim-SC_OLD-6cfad7ff14b78ce4e817aa130861a2cd179edfb3.tar.xz |
a few bug fixes
Diffstat (limited to '')
-rw-r--r-- | Common/OpenSim.Framework/Interfaces/IClientAPI.cs | 2 | ||||
-rw-r--r-- | OpenSim/OpenSim.Region/World/Primitive.cs | 69 | ||||
-rw-r--r-- | OpenSim/OpenSim.RegionServer/ClientView.API.cs | 4 |
3 files changed, 5 insertions, 70 deletions
diff --git a/Common/OpenSim.Framework/Interfaces/IClientAPI.cs b/Common/OpenSim.Framework/Interfaces/IClientAPI.cs index 871b8fd..719c634 100644 --- a/Common/OpenSim.Framework/Interfaces/IClientAPI.cs +++ b/Common/OpenSim.Framework/Interfaces/IClientAPI.cs | |||
@@ -102,6 +102,6 @@ namespace OpenSim.Framework.Interfaces | |||
102 | void InformClientOfNeighbour(ulong neighbourHandle, System.Net.IPAddress neighbourIP, ushort neighbourPort); | 102 | void InformClientOfNeighbour(ulong neighbourHandle, System.Net.IPAddress neighbourIP, ushort neighbourPort); |
103 | AgentCircuitData RequestClientInfo(); | 103 | AgentCircuitData RequestClientInfo(); |
104 | 104 | ||
105 | void SendPrimitiveToClient(PrimData primData, LLVector3 pos, LLUUID textureID); | 105 | void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, PrimData primData, LLVector3 pos, LLUUID textureID); |
106 | } | 106 | } |
107 | } | 107 | } |
diff --git a/OpenSim/OpenSim.Region/World/Primitive.cs b/OpenSim/OpenSim.Region/World/Primitive.cs index 1b1894b..be0b6ba 100644 --- a/OpenSim/OpenSim.Region/World/Primitive.cs +++ b/OpenSim/OpenSim.Region/World/Primitive.cs | |||
@@ -270,13 +270,7 @@ namespace OpenSim.Region | |||
270 | lPos = this.Pos; | 270 | lPos = this.Pos; |
271 | } | 271 | } |
272 | 272 | ||
273 | ObjectUpdatePacket outPacket = new ObjectUpdatePacket(); | 273 | remoteClient.SendPrimitiveToClient(this.m_regionHandle, 64096, this.primData, lPos, new LLUUID("00000000-0000-0000-5005-000000000005")); |
274 | outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; | ||
275 | outPacket.ObjectData[0] = this.CreateUpdateBlock(); | ||
276 | byte[] pb = lPos.GetBytes(); | ||
277 | Array.Copy(pb, 0, outPacket.ObjectData[0].ObjectData, 0, pb.Length); | ||
278 | |||
279 | remoteClient.OutPacket(outPacket); | ||
280 | } | 274 | } |
281 | 275 | ||
282 | public void SendFullUpdateToAllClients() | 276 | public void SendFullUpdateToAllClients() |
@@ -349,67 +343,6 @@ namespace OpenSim.Region | |||
349 | 343 | ||
350 | #endregion | 344 | #endregion |
351 | 345 | ||
352 | #region Packet Update Methods | ||
353 | protected void SetDefaultPacketValues(ObjectUpdatePacket.ObjectDataBlock objdata) | ||
354 | { | ||
355 | objdata.PSBlock = new byte[0]; | ||
356 | objdata.ExtraParams = new byte[1]; | ||
357 | objdata.MediaURL = new byte[0]; | ||
358 | objdata.NameValue = new byte[0]; | ||
359 | objdata.Text = new byte[0]; | ||
360 | objdata.TextColor = new byte[4]; | ||
361 | objdata.JointAxisOrAnchor = new LLVector3(0, 0, 0); | ||
362 | objdata.JointPivot = new LLVector3(0, 0, 0); | ||
363 | objdata.Material = 3; | ||
364 | objdata.TextureAnim = new byte[0]; | ||
365 | objdata.Sound = LLUUID.Zero; | ||
366 | LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005")); | ||
367 | this.primData.Texture = objdata.TextureEntry = ntex.ToBytes(); | ||
368 | objdata.State = 0; | ||
369 | objdata.Data = new byte[0]; | ||
370 | |||
371 | objdata.ObjectData = new byte[60]; | ||
372 | objdata.ObjectData[46] = 128; | ||
373 | objdata.ObjectData[47] = 63; | ||
374 | } | ||
375 | |||
376 | protected void SetPacketShapeData(ObjectUpdatePacket.ObjectDataBlock objectData) | ||
377 | { | ||
378 | objectData.OwnerID = this.primData.OwnerID; | ||
379 | objectData.PCode = this.primData.PCode; | ||
380 | objectData.PathBegin = this.primData.PathBegin; | ||
381 | objectData.PathEnd = this.primData.PathEnd; | ||
382 | objectData.PathScaleX = this.primData.PathScaleX; | ||
383 | objectData.PathScaleY = this.primData.PathScaleY; | ||
384 | objectData.PathShearX = this.primData.PathShearX; | ||
385 | objectData.PathShearY = this.primData.PathShearY; | ||
386 | objectData.PathSkew = this.primData.PathSkew; | ||
387 | objectData.ProfileBegin = this.primData.ProfileBegin; | ||
388 | objectData.ProfileEnd = this.primData.ProfileEnd; | ||
389 | objectData.Scale = this.primData.Scale; | ||
390 | objectData.PathCurve = this.primData.PathCurve; | ||
391 | objectData.ProfileCurve = this.primData.ProfileCurve; | ||
392 | objectData.ParentID = this.primData.ParentID; | ||
393 | objectData.ProfileHollow = this.primData.ProfileHollow; | ||
394 | objectData.PathRadiusOffset = this.primData.PathRadiusOffset; | ||
395 | objectData.PathRevolutions = this.primData.PathRevolutions; | ||
396 | objectData.PathTaperX = this.primData.PathTaperX; | ||
397 | objectData.PathTaperY = this.primData.PathTaperY; | ||
398 | objectData.PathTwist = this.primData.PathTwist; | ||
399 | objectData.PathTwistBegin = this.primData.PathTwistBegin; | ||
400 | } | ||
401 | |||
402 | #endregion | ||
403 | protected ObjectUpdatePacket.ObjectDataBlock CreateUpdateBlock() | ||
404 | { | ||
405 | ObjectUpdatePacket.ObjectDataBlock objupdate = new ObjectUpdatePacket.ObjectDataBlock(); | ||
406 | this.SetDefaultPacketValues(objupdate); | ||
407 | objupdate.UpdateFlags = 32 + 65536 + 131072 + 256 + 4 + 8 + 2048 + 524288 + 268435456; | ||
408 | this.SetPacketShapeData(objupdate); | ||
409 | byte[] pb = this.Pos.GetBytes(); | ||
410 | Array.Copy(pb, 0, objupdate.ObjectData, 0, pb.Length); | ||
411 | return objupdate; | ||
412 | } | ||
413 | 346 | ||
414 | protected ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreateImprovedBlock() | 347 | protected ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreateImprovedBlock() |
415 | { | 348 | { |
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.API.cs b/OpenSim/OpenSim.RegionServer/ClientView.API.cs index 09ba266..d9a137f 100644 --- a/OpenSim/OpenSim.RegionServer/ClientView.API.cs +++ b/OpenSim/OpenSim.RegionServer/ClientView.API.cs | |||
@@ -421,9 +421,11 @@ namespace OpenSim | |||
421 | /// </summary> | 421 | /// </summary> |
422 | /// <param name="primData"></param> | 422 | /// <param name="primData"></param> |
423 | /// <param name="pos"></param> | 423 | /// <param name="pos"></param> |
424 | public void SendPrimitiveToClient( PrimData primData, LLVector3 pos, LLUUID textureID) | 424 | public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, PrimData primData, LLVector3 pos, LLUUID textureID) |
425 | { | 425 | { |
426 | ObjectUpdatePacket outPacket = new ObjectUpdatePacket(); | 426 | ObjectUpdatePacket outPacket = new ObjectUpdatePacket(); |
427 | outPacket.RegionData.RegionHandle = regionHandle; | ||
428 | outPacket.RegionData.TimeDilation = timeDilation; | ||
427 | outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; | 429 | outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; |
428 | outPacket.ObjectData[0] = this.CreatePrimUpdateBlock(primData, textureID); | 430 | outPacket.ObjectData[0] = this.CreatePrimUpdateBlock(primData, textureID); |
429 | byte[] pb = pos.GetBytes(); | 431 | byte[] pb = pos.GetBytes(); |