LIBOMV-623 Corrects issue with avatar location when simulator changes, Thanks Douglas R Miles for the patch

git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3125 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
Jim Radford
2009-10-06 00:09:53 +00:00
parent 2d37ccf9eb
commit c84de4e684

View File

@@ -1828,7 +1828,7 @@ namespace OpenMetaverse
#region Avatar
case PCode.Avatar:
// Update some internals if this is our avatar
if (block.FullID == Client.Self.AgentID)
if (block.FullID == Client.Self.AgentID && simulator == Client.Network.CurrentSim)
{
#region Update Client.Self
@@ -2639,8 +2639,13 @@ namespace OpenMetaverse
/// <param name="oldSeatID"></param>
protected void SetAvatarSittingOn(Simulator sim, Avatar av, uint localid, uint oldSeatID)
{
if (av.LocalID == Client.Self.localID) Client.Self.sittingOn = localid;
if (Client.Network.CurrentSim == sim && av.LocalID == Client.Self.localID)
{
Client.Self.sittingOn = localid;
}
av.ParentID = localid;
if (OnAvatarSitChanged != null && oldSeatID != localid)
{