* Decode layer boundaries when storing a texture asset
* Started fleshing out correct texture downloading
* Add avatars to the scene along with prims

git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@2224 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
John Hurliman
2008-09-15 23:17:21 +00:00
parent 939b2d50a8
commit 805fb7c18d
5 changed files with 215 additions and 48 deletions

View File

@@ -203,6 +203,7 @@ namespace Simian.Extensions
// Give testers a provisionary balance of 1000L
agent.Balance = 1000;
// Send a response back to the client
AgentMovementCompletePacket complete = new AgentMovementCompletePacket();
complete.AgentData.AgentID = agent.AgentID;
complete.AgentData.SessionID = agent.SessionID;
@@ -214,6 +215,9 @@ namespace Simian.Extensions
server.UDP.SendPacket(agent.AgentID, complete, PacketCategory.Transaction);
// Add this avatar as an object in the scene
ObjectAdd(this, agent, new SimulationObject(agent.Avatar, server), PrimFlags.None);
// Send updates and appearances for every avatar to this new avatar
SynchronizeStateTo(agent);
@@ -228,21 +232,7 @@ namespace Simian.Extensions
// HACK: The reduction provider will deprecate this at some point
void SynchronizeStateTo(Agent agent)
{
lock (server.Agents)
{
foreach (Agent otherAgent in server.Agents.Values)
{
// Send ObjectUpdate packets for this avatar
ObjectUpdatePacket update = SimulationObject.BuildFullUpdate(otherAgent.Avatar,
server.RegionHandle, otherAgent.State, otherAgent.Flags);
server.UDP.SendPacket(agent.AgentID, update, PacketCategory.State);
// Send appearances for this avatar
AvatarAppearancePacket appearance = AvatarManager.BuildAppearancePacket(otherAgent);
server.UDP.SendPacket(agent.AgentID, appearance, PacketCategory.State);
}
}
// Send object updates for objects and avatars
sceneObjects.ForEach(delegate(SimulationObject obj)
{
ObjectUpdatePacket update = SimulationObject.BuildFullUpdate(obj.Prim,
@@ -250,6 +240,20 @@ namespace Simian.Extensions
server.UDP.SendPacket(agent.AgentID, update, PacketCategory.State);
});
// Send appearances for all avatars
lock (server.Agents)
{
foreach (Agent otherAgent in server.Agents.Values)
{
if (otherAgent != agent)
{
// Send appearances for this avatar
AvatarAppearancePacket appearance = AvatarManager.BuildAppearancePacket(otherAgent);
server.UDP.SendPacket(agent.AgentID, appearance, PacketCategory.State);
}
}
}
// Send terrain data
SendLayerData(agent);
}