* I want to commit too!
parent
3f6c4e6187
commit
a076369fa3
|
@ -648,7 +648,7 @@ namespace OpenSim.Region.ClientStack
|
||||||
#region Avatar Packet/data sending Methods
|
#region Avatar Packet/data sending Methods
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
/// send a objectupdate packet with information about the clients avatar
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="regionInfo"></param>
|
/// <param name="regionInfo"></param>
|
||||||
/// <param name="firstName"></param>
|
/// <param name="firstName"></param>
|
||||||
|
@ -658,19 +658,16 @@ namespace OpenSim.Region.ClientStack
|
||||||
/// <param name="Pos"></param>
|
/// <param name="Pos"></param>
|
||||||
public void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos, byte[] textureEntry)
|
public void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos, byte[] textureEntry)
|
||||||
{
|
{
|
||||||
Encoding _enc = Encoding.ASCII;
|
|
||||||
//send a objectupdate packet with information about the clients avatar
|
|
||||||
|
|
||||||
ObjectUpdatePacket objupdate = new ObjectUpdatePacket();
|
ObjectUpdatePacket objupdate = new ObjectUpdatePacket();
|
||||||
objupdate.RegionData.RegionHandle = regionHandle;
|
objupdate.RegionData.RegionHandle = regionHandle;
|
||||||
objupdate.RegionData.TimeDilation = 64096;
|
objupdate.RegionData.TimeDilation = 64096;
|
||||||
objupdate.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1];
|
objupdate.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1];
|
||||||
objupdate.ObjectData[0] = this.CreateDefaultAvatarPacket(textureEntry);
|
objupdate.ObjectData[0] = this.CreateDefaultAvatarPacket(textureEntry);
|
||||||
//give this avatar object a local id and assign the user a name
|
|
||||||
|
|
||||||
|
//give this avatar object a local id and assign the user a name
|
||||||
objupdate.ObjectData[0].ID = avatarLocalID;
|
objupdate.ObjectData[0].ID = avatarLocalID;
|
||||||
objupdate.ObjectData[0].FullID = avatarID;
|
objupdate.ObjectData[0].FullID = avatarID;
|
||||||
objupdate.ObjectData[0].NameValue = _enc.GetBytes("FirstName STRING RW SV " + firstName + "\nLastName STRING RW SV " + lastName + " \0");
|
objupdate.ObjectData[0].NameValue = Helpers.StringToField("FirstName STRING RW SV " + firstName + "\nLastName STRING RW SV " + lastName );
|
||||||
LLVector3 pos2 = new LLVector3((float)Pos.X, (float)Pos.Y, (float)Pos.Z);
|
LLVector3 pos2 = new LLVector3((float)Pos.X, (float)Pos.Y, (float)Pos.Z);
|
||||||
byte[] pb = pos2.GetBytes();
|
byte[] pb = pos2.GetBytes();
|
||||||
Array.Copy(pb, 0, objupdate.ObjectData[0].ObjectData, 16, pb.Length);
|
Array.Copy(pb, 0, objupdate.ObjectData[0].ObjectData, 16, pb.Length);
|
||||||
|
|
|
@ -59,7 +59,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
private LLObject.TextureEntry avatarAppearanceTexture = null;
|
private LLObject.TextureEntry avatarAppearanceTexture = null;
|
||||||
private byte[] visualParams;
|
private byte[] visualParams;
|
||||||
private AvatarWearable[] Wearables;
|
private AvatarWearable[] Wearables;
|
||||||
private LLVector3 positionLastFrame = new LLVector3(0, 0, 0);
|
|
||||||
private ulong m_regionHandle;
|
private ulong m_regionHandle;
|
||||||
private bool childAgent = false;
|
private bool childAgent = false;
|
||||||
private bool newForce = false;
|
private bool newForce = false;
|
||||||
|
|
|
@ -52,7 +52,6 @@ namespace SimpleApp
|
||||||
client.SendChatMessage("Ready.", 1, pos, "System", LLUUID.Zero );
|
client.SendChatMessage("Ready.", 1, pos, "System", LLUUID.Zero );
|
||||||
};
|
};
|
||||||
|
|
||||||
client.OnRequestWearables += SendWearables;
|
|
||||||
client.OnAddPrim += AddNewPrim;
|
client.OnAddPrim += AddNewPrim;
|
||||||
client.OnUpdatePrimGroupPosition += this.UpdatePrimPosition;
|
client.OnUpdatePrimGroupPosition += this.UpdatePrimPosition;
|
||||||
client.OnRequestMapBlocks += this.RequestMapBlocks;
|
client.OnRequestMapBlocks += this.RequestMapBlocks;
|
||||||
|
@ -62,19 +61,7 @@ namespace SimpleApp
|
||||||
|
|
||||||
client.OnCompleteMovementToRegion += delegate()
|
client.OnCompleteMovementToRegion += delegate()
|
||||||
{
|
{
|
||||||
client.MoveAgentIntoRegion(m_regInfo, pos, LLVector3.Zero );
|
|
||||||
};
|
|
||||||
|
|
||||||
client.OnCompleteMovementToRegion += delegate()
|
|
||||||
{
|
|
||||||
client.SendAvatarData(m_regInfo.RegionHandle, client.FirstName,
|
|
||||||
client.LastName, client.AgentId, 0,
|
|
||||||
pos, null);
|
|
||||||
|
|
||||||
client.SendChatMessage("Welcome to My World.", 1, pos, "System", LLUUID.Zero );
|
client.SendChatMessage("Welcome to My World.", 1, pos, "System", LLUUID.Zero );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
client.SendRegionHandshake(m_regInfo);
|
client.SendRegionHandshake(m_regInfo);
|
||||||
|
@ -83,11 +70,6 @@ namespace SimpleApp
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SendWearables( IClientAPI client )
|
|
||||||
{
|
|
||||||
client.SendWearables( AvatarWearable.DefaultWearables );
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,9 +68,9 @@ namespace SimpleApp
|
||||||
|
|
||||||
PrimitiveBaseShape shape = PrimitiveBaseShape.DefaultBox();
|
PrimitiveBaseShape shape = PrimitiveBaseShape.DefaultBox();
|
||||||
|
|
||||||
shape.Scale = new LLVector3(1, 1, 1);
|
shape.Scale = new LLVector3(10, 10, 10);
|
||||||
|
|
||||||
LLVector3 pos = new LLVector3(1,1,1);
|
LLVector3 pos = new LLVector3(128,128,72);
|
||||||
|
|
||||||
world.AddNewPrim( LLUUID.Zero, pos, shape );
|
world.AddNewPrim( LLUUID.Zero, pos, shape );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue