Skip to content

Commit

Permalink
Merged fix for LIBOMV-859: SimPosition reporting RelativePosition whe…
Browse files Browse the repository at this point in the history
…n avatar is sitting to 0.8 branch

git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/branches/0.8-devel@3396 52acb1d6-8a22-11de-b505-999d5b087335
  • Loading branch information
lkalif committed Jul 25, 2010
1 parent c28ad67 commit 6d630a5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion OpenMetaverse/AgentManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1248,7 +1248,11 @@ public Vector3 SimPosition
// a bit more complicatated, agent sitting on a prim
Primitive p = null;
Vector3 fullPosition = relativePosition;
Client.Network.CurrentSim.ObjectsPrimitives.TryGetValue(sittingOn, out p);

if (Client.Network.CurrentSim.ObjectsPrimitives.TryGetValue(sittingOn, out p))
{
fullPosition += p.Position;
}

// go up the hiearchy trying to find the root prim
while (p != null && p.ParentID != 0)
Expand Down

0 comments on commit 6d630a5

Please sign in to comment.