diff options
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.API.cs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs index 98bc84d..cc4fdbe 100644 --- a/OpenSim/Region/ClientStack/ClientView.API.cs +++ b/OpenSim/Region/ClientStack/ClientView.API.cs | |||
@@ -648,7 +648,7 @@ namespace OpenSim.Region.ClientStack | |||
648 | #region Avatar Packet/data sending Methods | 648 | #region Avatar Packet/data sending Methods |
649 | 649 | ||
650 | /// <summary> | 650 | /// <summary> |
651 | /// | 651 | /// send a objectupdate packet with information about the clients avatar |
652 | /// </summary> | 652 | /// </summary> |
653 | /// <param name="regionInfo"></param> | 653 | /// <param name="regionInfo"></param> |
654 | /// <param name="firstName"></param> | 654 | /// <param name="firstName"></param> |
@@ -658,19 +658,16 @@ namespace OpenSim.Region.ClientStack | |||
658 | /// <param name="Pos"></param> | 658 | /// <param name="Pos"></param> |
659 | public void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos, byte[] textureEntry) | 659 | public void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos, byte[] textureEntry) |
660 | { | 660 | { |
661 | Encoding _enc = Encoding.ASCII; | ||
662 | //send a objectupdate packet with information about the clients avatar | ||
663 | |||
664 | ObjectUpdatePacket objupdate = new ObjectUpdatePacket(); | 661 | ObjectUpdatePacket objupdate = new ObjectUpdatePacket(); |
665 | objupdate.RegionData.RegionHandle = regionHandle; | 662 | objupdate.RegionData.RegionHandle = regionHandle; |
666 | objupdate.RegionData.TimeDilation = 64096; | 663 | objupdate.RegionData.TimeDilation = 64096; |
667 | objupdate.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; | 664 | objupdate.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; |
668 | objupdate.ObjectData[0] = this.CreateDefaultAvatarPacket(textureEntry); | 665 | objupdate.ObjectData[0] = this.CreateDefaultAvatarPacket(textureEntry); |
669 | //give this avatar object a local id and assign the user a name | ||
670 | 666 | ||
667 | //give this avatar object a local id and assign the user a name | ||
671 | objupdate.ObjectData[0].ID = avatarLocalID; | 668 | objupdate.ObjectData[0].ID = avatarLocalID; |
672 | objupdate.ObjectData[0].FullID = avatarID; | 669 | objupdate.ObjectData[0].FullID = avatarID; |
673 | objupdate.ObjectData[0].NameValue = _enc.GetBytes("FirstName STRING RW SV " + firstName + "\nLastName STRING RW SV " + lastName + " \0"); | 670 | objupdate.ObjectData[0].NameValue = Helpers.StringToField("FirstName STRING RW SV " + firstName + "\nLastName STRING RW SV " + lastName ); |
674 | LLVector3 pos2 = new LLVector3((float)Pos.X, (float)Pos.Y, (float)Pos.Z); | 671 | LLVector3 pos2 = new LLVector3((float)Pos.X, (float)Pos.Y, (float)Pos.Z); |
675 | byte[] pb = pos2.GetBytes(); | 672 | byte[] pb = pos2.GetBytes(); |
676 | Array.Copy(pb, 0, objupdate.ObjectData[0].ObjectData, 16, pb.Length); | 673 | Array.Copy(pb, 0, objupdate.ObjectData[0].ObjectData, 16, pb.Length); |