* Now at least we're not creating physActors for child agents.
parent
c8f51836b8
commit
f71b315592
|
@ -703,7 +703,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
SubscribeToClientEvents(client);
|
SubscribeToClientEvents(client);
|
||||||
m_estateManager.sendRegionHandshake(client);
|
m_estateManager.sendRegionHandshake(client);
|
||||||
CreateAndAddScenePresence(client);
|
CreateAndAddScenePresence(client, child );
|
||||||
m_LandManager.sendParcelOverlay(client);
|
m_LandManager.sendParcelOverlay(client);
|
||||||
commsManager.UserProfiles.AddNewUser(client.AgentId);
|
commsManager.UserProfiles.AddNewUser(client.AgentId);
|
||||||
commsManager.TransactionsManager.AddUser(client.AgentId);
|
commsManager.TransactionsManager.AddUser(client.AgentId);
|
||||||
|
@ -768,20 +768,30 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
EventManager.TriggerOnNewClient(client);
|
EventManager.TriggerOnNewClient(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected ScenePresence CreateAndAddScenePresence(IClientAPI client)
|
protected ScenePresence CreateAndAddScenePresence(IClientAPI client, bool child )
|
||||||
{
|
{
|
||||||
ScenePresence newAvatar = null;
|
ScenePresence newAvatar = null;
|
||||||
|
|
||||||
MainLog.Instance.Verbose("World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent");
|
|
||||||
newAvatar = new ScenePresence(client, this, m_regInfo);
|
newAvatar = new ScenePresence(client, this, m_regInfo);
|
||||||
MainLog.Instance.Verbose("World.cs:AddViewerAgent() - Adding new avatar to world");
|
newAvatar.childAgent = child;
|
||||||
MainLog.Instance.Verbose("World.cs:AddViewerAgent() - Starting RegionHandshake ");
|
|
||||||
|
if (child)
|
||||||
|
{
|
||||||
|
MainLog.Instance.Verbose(this.RegionInfo.RegionName + ": Creating new child agent.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newAvatar.OnSignificantClientMovement += m_LandManager.handleSignificantClientMovement;
|
||||||
|
|
||||||
|
MainLog.Instance.Verbose(this.RegionInfo.RegionName + ": Creating new root agent.");
|
||||||
|
MainLog.Instance.Verbose(this.RegionInfo.RegionName + ": Adding Physical agent.");
|
||||||
|
|
||||||
PhysicsVector pVec = new PhysicsVector(newAvatar.AbsolutePosition.X, newAvatar.AbsolutePosition.Y, newAvatar.AbsolutePosition.Z);
|
PhysicsVector pVec = new PhysicsVector(newAvatar.AbsolutePosition.X, newAvatar.AbsolutePosition.Y, newAvatar.AbsolutePosition.Z);
|
||||||
lock (m_syncRoot)
|
lock (m_syncRoot)
|
||||||
{
|
{
|
||||||
newAvatar.PhysActor = phyScene.AddAvatar(pVec);
|
newAvatar.PhysActor = phyScene.AddAvatar(pVec);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
lock (Entities)
|
lock (Entities)
|
||||||
{
|
{
|
||||||
|
@ -805,7 +815,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
Avatars.Add(client.AgentId, newAvatar);
|
Avatars.Add(client.AgentId, newAvatar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
newAvatar.OnSignificantClientMovement += m_LandManager.handleSignificantClientMovement;
|
|
||||||
return newAvatar;
|
return newAvatar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ namespace SimpleApp
|
||||||
{
|
{
|
||||||
SubscribeToClientEvents(client);
|
SubscribeToClientEvents(client);
|
||||||
|
|
||||||
ScenePresence avatar = CreateAndAddScenePresence(client);
|
ScenePresence avatar = CreateAndAddScenePresence(client, child );
|
||||||
avatar.AbsolutePosition = new LLVector3(128, 128, 26);
|
avatar.AbsolutePosition = new LLVector3(128, 128, 26);
|
||||||
|
|
||||||
LLVector3 pos = new LLVector3(128, 128, 128);
|
LLVector3 pos = new LLVector3(128, 128, 128);
|
||||||
|
|
Loading…
Reference in New Issue