MW 2007-05-29 17:57:03 +00:00
parent cb33169fe6
commit 4d0261ed22
4 changed files with 22 additions and 6 deletions

View File

@ -72,5 +72,7 @@ namespace OpenSim.Framework.Interfaces
void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
void SendLayerData(float[] map);
void SendRegionHandshake(RegionInfo regionInfo);
void MoveAgentIntoRegion(RegionInfo regInfo);
void SendAvatarData(RegionInfo regionInfo, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos);
}
}

View File

@ -57,6 +57,20 @@ namespace OpenSim
}
#region World/Avatar to Client
public void MoveAgentIntoRegion(RegionInfo regInfo)
{
AgentMovementCompletePacket mov = new AgentMovementCompletePacket();
mov.AgentData.SessionID = this.SessionID;
mov.AgentData.AgentID = this.AgentID;
mov.Data.RegionHandle = regInfo.RegionHandle;
// TODO - dynamicalise this stuff
mov.Data.Timestamp = 1172750370;
mov.Data.Position = this.startpos;
mov.Data.LookAt = new LLVector3(0.99f, 0.042f, 0);
OutPacket(mov);
}
public void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID)
{
System.Text.Encoding enc = System.Text.Encoding.ASCII;

View File

@ -70,10 +70,10 @@ namespace OpenSim.world
/*
//register for events
ControllingClient.OnRequestWearables += new GenericCall(this.SendOurAppearance);
ControllingClient.OnSetAppearance += new SetAppearance(this.SetAppearance);
ControllingClient.OnSetAppearance += new SetAppearance(this.SetAppearance);*/
ControllingClient.OnCompleteMovementToRegion += new GenericCall2(this.CompleteMovement);
ControllingClient.OnCompleteMovementToRegion += new GenericCall2(this.SendInitialPosition);
ControllingClient.OnAgentUpdate += new GenericCall3(this.HandleAgentUpdate);
/* ControllingClient.OnAgentUpdate += new GenericCall3(this.HandleAgentUpdate);
ControllingClient.OnStartAnim += new StartAnim(this.SendAnimPack);
ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange);
ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement);
@ -116,7 +116,7 @@ namespace OpenSim.world
public void CompleteMovement()
{
this.ControllingClient.MoveAgentIntoRegion(this.regionData);
}
public void HandleAgentUpdate(Packet pack)
@ -130,9 +130,9 @@ namespace OpenSim.world
}
//really really should be moved somewhere else (RegionInfo.cs ?)
public void SendRegionHandshake(RegionInfo regionInfo)
public void SendRegionHandshake()
{
this.ControllingClient.SendRegionHandshake(regionInfo);
this.ControllingClient.SendRegionHandshake(this.regionData);
}
public static void LoadAnims()

View File

@ -513,7 +513,7 @@ namespace OpenSim.world
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.m_regInfo);
newAvatar.SendRegionHandshake();
PhysicsVector pVec = new PhysicsVector(newAvatar.Pos.X, newAvatar.Pos.Y, newAvatar.Pos.Z);
lock (this.LockPhysicsEngine)