Check the existing ScenePresence.ParentPart to make sure we're not trying to sit on a prim we're already sat upon, rather than looking up the part from scratch.

An adaptation of commit 055b8a2
Having both ParentID and ParentPart references now is redundant.  ParentID should probably be eliminated.
user_profiles
Justin Clark-Casey (justincc) 2013-01-19 02:29:02 +00:00
parent b77da5039e
commit fc6115f777
1 changed files with 1 additions and 2 deletions

View File

@ -1954,8 +1954,7 @@ namespace OpenSim.Region.Framework.Scenes
{ {
if (ParentID != 0) if (ParentID != 0)
{ {
var targetPart = m_scene.GetSceneObjectPart(targetID); if (ParentPart.UUID == targetID)
if (targetPart != null && targetPart.LocalId == ParentID)
return; // already sitting here, ignore return; // already sitting here, ignore
StandUp(); StandUp();