All submissions to this site are governed by the Second Life Viewer Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.

Review Board 1.6.11

Welcome to the Second Life Viewer Code Review tool.
See the documentation on our wiki for how to use this site.

BUG-840: Viewer 3.4.2 (Beta) breaks almost every sliding door script in SL

Review Request #616 - Created Feb. 15, 2013 and updated

MartinRJ Fayray Reviewers
viewer-release viewer
BUG-840
None viewer-release
Fixes missing childprim- position/rotation-updates when the avatar was 20+m away and didn't have the object in view when it was changed.


Repository: https://bitbucket.org/MartinRJ/bug-840
Create an object with two prims, add a script with a listener on PUBLIC_CHANNEL and make it change the relative position of the child prim in the listen-event.

Move the avatar 20+ m away from the test object, and look in the opposite direction, so that the object is not in view.

Shout something in public chat so that the child prim changes its relative position.

Turn around so that the test object is in view again.

Expected result: the prims visibly changed.

Without this fix, the child prim would not update its position (or rotation).

This fix has to be tested against the following related bugs:
BUG-840 [positionbug], BUG-840: Viewer 3.4.2 (Beta) breaks almost every sliding door script in SL
MAINT-2275 [vehiclebug],  Child prims are "left behind" by animated, moving physical objects
MAINT-1742 [selection], Child object does not update position while selected.
MAINT-2247 [selection]  Child object does not update rotation while selected.

Changes between revision 2 and 3

1 2 3
1 2 3

  1. indra/newview/lldrawable.cpp: Loading...
indra/newview/lldrawable.cpp
Diff Revision 2 Diff Revision 3
1
/**
1
/** 
2
 * @file lldrawable.cpp
2
 * @file lldrawable.cpp
3
 * @brief LLDrawable class implementation
3
 * @brief LLDrawable class implementation
4
 *
4
 *
5
 * $LicenseInfo:firstyear=2002&license=viewerlgpl$
5
 * $LicenseInfo:firstyear=2002&license=viewerlgpl$
6
 * Second Life Viewer Source Code
6
 * Second Life Viewer Source Code
7
 * Copyright (C) 2010, Linden Research, Inc.
7
 * Copyright (C) 2010, Linden Research, Inc.
8
 * 
8
 * 
9
 * This library is free software; you can redistribute it and/or
9
 * This library is free software; you can redistribute it and/or
10
 * modify it under the terms of the GNU Lesser General Public
10
 * modify it under the terms of the GNU Lesser General Public
11
 * License as published by the Free Software Foundation;
11
 * License as published by the Free Software Foundation;
... 562 lines hidden [Expand]
F32 LLDrawable::updateXform(BOOL undamped)
574
		{			
574
		{			
575
			setState(LLDrawable::ANIMATED_CHILD);
575
			setState(LLDrawable::ANIMATED_CHILD);
576
			gPipeline.markRebuild(this, LLDrawable::REBUILD_ALL, TRUE);
576
			gPipeline.markRebuild(this, LLDrawable::REBUILD_ALL, TRUE);
577
			mVObjp->dirtySpatialGroup();
577
			mVObjp->dirtySpatialGroup();
578
		}
578
		}
579
	}
579
	}
580
	else if (!isRoot() &&
580
	else if (!isRoot() &&
581
            (
581
            (
582
            dist_vec_squared(old_pos, target_pos) > 0.f
582
            dist_vec_squared(old_pos, target_pos) > 0.f
583
            ||
583
            ||
584
            (1.f - dot(old_rot, target_rot)) * 10.f > 0.f
584
            (1.f - dot(old_rot, target_rot)) > 0.f
585
            ))
585
            ))
586
	{ //fix for BUG-860, MAINT-2275, MAINT-1742, MAINT-2247
586
	{ //fix for BUG-840, MAINT-2275, MAINT-1742, MAINT-2247
587
		gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION, TRUE);
587
		gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION, TRUE);
588
	}
588
	}
589
	else if (!getVOVolume() && !isAvatar())
589
	else if (!getVOVolume() && !isAvatar())
590
	{
590
	{
591
		movePartition();
591
		movePartition();
592
	}
592
	}
593

   
593

   
594
	// Update
594
	// Update
595
	mXform.setPosition(target_pos);
595
	mXform.setPosition(target_pos);
596
	mXform.setRotation(target_rot);
596
	mXform.setRotation(target_rot);
... 1039 lines hidden [Expand]
  1. indra/newview/lldrawable.cpp: Loading...