merge
parent
b2eb26e4ba
commit
36bcda6cfa
|
@ -101,7 +101,7 @@ namespace OpenSim
|
||||||
avp.ObjectData.TextureEntry = textureEntry;
|
avp.ObjectData.TextureEntry = textureEntry;
|
||||||
|
|
||||||
AvatarAppearancePacket.VisualParamBlock avblock = null;
|
AvatarAppearancePacket.VisualParamBlock avblock = null;
|
||||||
for (int i = 0; i < 218; i++)
|
for (int i = 0; i < visualParams.Length; i++)
|
||||||
{
|
{
|
||||||
avblock = new AvatarAppearancePacket.VisualParamBlock();
|
avblock = new AvatarAppearancePacket.VisualParamBlock();
|
||||||
avblock.ParamValue = visualParams[i];
|
avblock.ParamValue = visualParams[i];
|
||||||
|
|
|
@ -37,15 +37,16 @@ namespace OpenSim.world
|
||||||
private ushort m_regionWaterHeight;
|
private ushort m_regionWaterHeight;
|
||||||
private bool m_regionTerraform;
|
private bool m_regionTerraform;
|
||||||
private bool childAvatar = false;
|
private bool childAvatar = false;
|
||||||
|
private RegionInfo regionData;
|
||||||
|
|
||||||
public Avatar(IClientAPI TheClient, World world, string regionName, Dictionary<uint, IClientAPI> clientThreads, ulong regionHandle, bool regionTerraform, ushort regionWater)
|
public Avatar(IClientAPI TheClient, World world, Dictionary<uint, IClientAPI> clientThreads, RegionInfo regionDat)
|
||||||
{
|
{
|
||||||
m_world = world;
|
m_world = world;
|
||||||
// m_clientThreads = clientThreads;
|
// m_clientThreads = clientThreads;
|
||||||
m_regionName = regionName;
|
m_regionName = regionData.RegionName;
|
||||||
m_regionHandle = regionHandle;
|
m_regionHandle = regionData.RegionHandle;
|
||||||
m_regionTerraform = regionTerraform;
|
m_regionTerraform = regionData.RegionTerraform;
|
||||||
m_regionWaterHeight = regionWater;
|
m_regionWaterHeight = regionData.RegionWaterHeight;
|
||||||
|
|
||||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Avatar.cs - Loading details from grid (DUMMY)");
|
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Avatar.cs - Loading details from grid (DUMMY)");
|
||||||
ControllingClient = TheClient;
|
ControllingClient = TheClient;
|
||||||
|
|
|
@ -503,12 +503,57 @@ namespace OpenSim.world
|
||||||
|
|
||||||
public override void AddNewAvatar(IClientAPI remoteClient, LLUUID agentID, bool child)
|
public override void AddNewAvatar(IClientAPI remoteClient, LLUUID agentID, bool child)
|
||||||
{
|
{
|
||||||
return ;
|
remoteClient.OnRegionHandShakeReply += new GenericCall(this.SendLayerData);
|
||||||
|
remoteClient.OnRequestWearables += new GenericCall(this.GetInitialPrims);
|
||||||
|
|
||||||
|
Avatar newAvatar = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent");
|
||||||
|
newAvatar = new Avatar(remoteClient, this, m_clientThreads, this.m_regInfo);
|
||||||
|
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Adding new avatar to world");
|
||||||
|
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Starting RegionHandshake ");
|
||||||
|
newAvatar.SendRegionHandshake(this);
|
||||||
|
|
||||||
|
PhysicsVector pVec = new PhysicsVector(newAvatar.Pos.X, newAvatar.Pos.Y, newAvatar.Pos.Z);
|
||||||
|
lock (this.LockPhysicsEngine)
|
||||||
|
{
|
||||||
|
newAvatar.PhysActor = this.phyScene.AddAvatar(pVec);
|
||||||
|
}
|
||||||
|
|
||||||
|
lock (Entities)
|
||||||
|
{
|
||||||
|
if (!Entities.ContainsKey(agentID))
|
||||||
|
{
|
||||||
|
this.Entities.Add(agentID, newAvatar);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Entities[agentID] = newAvatar;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
lock (Avatars)
|
||||||
|
{
|
||||||
|
if (Avatars.ContainsKey(agentID))
|
||||||
|
{
|
||||||
|
Avatars[agentID] = newAvatar;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.Avatars.Add(agentID, newAvatar);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: AddViewerAgent() - Failed with exception " + e.ToString());
|
||||||
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void RemoveAvatar(LLUUID agentID)
|
public override void RemoveAvatar(LLUUID agentID)
|
||||||
{
|
{
|
||||||
return ;
|
return;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue