diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llagent.cpp | 127 |
1 files changed, 67 insertions, 60 deletions
diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp index 6d9137d..a6ec948 100644 --- a/linden/indra/newview/llagent.cpp +++ b/linden/indra/newview/llagent.cpp | |||
@@ -122,7 +122,6 @@ | |||
122 | // end Ventrella | 122 | // end Ventrella |
123 | 123 | ||
124 | extern LLMenuBarGL* gMenuBarView; | 124 | extern LLMenuBarGL* gMenuBarView; |
125 | extern F32 gMinObjectDistance; | ||
126 | extern U8 gLastPickAlpha; | 125 | extern U8 gLastPickAlpha; |
127 | extern F32 gFrameDTClamped; | 126 | extern F32 gFrameDTClamped; |
128 | 127 | ||
@@ -481,17 +480,20 @@ void LLAgent::resetView(BOOL reset_camera) | |||
481 | 480 | ||
482 | if (!gNoRender) | 481 | if (!gNoRender) |
483 | { | 482 | { |
484 | gSelectMgr->deselectAll(); | ||
485 | gSelectMgr->unhighlightAll(); | 483 | gSelectMgr->unhighlightAll(); |
486 | 484 | ||
487 | // By popular request, keep land selection while walking around. JC | 485 | // By popular request, keep land selection while walking around. JC |
488 | // gParcelMgr->deselectLand(); | 486 | // gParcelMgr->deselectLand(); |
489 | 487 | ||
488 | // force deselect when walking and attachment is selected | ||
489 | // this is so people don't wig out when their avatar moves without animating | ||
490 | if (gSelectMgr->getSelection()->isAttachment()) | ||
491 | { | ||
492 | gSelectMgr->deselectAll(); | ||
493 | } | ||
494 | |||
490 | // Hide all popup menus | 495 | // Hide all popup menus |
491 | gPieSelf->hide(FALSE); | 496 | gMenuHolder->hideMenus(); |
492 | gPieAvatar->hide(FALSE); | ||
493 | gPieObject->hide(FALSE); | ||
494 | gPieLand->hide(FALSE); | ||
495 | } | 497 | } |
496 | 498 | ||
497 | if (reset_camera && !gSavedSettings.getBOOL("FreezeTime")) | 499 | if (reset_camera && !gSavedSettings.getBOOL("FreezeTime")) |
@@ -787,7 +789,7 @@ void LLAgent::setRegion(LLViewerRegion *regionp) | |||
787 | // char host_name[MAX_STRING]; | 789 | // char host_name[MAX_STRING]; |
788 | // regionp->getHost().getHostName(host_name, MAX_STRING); | 790 | // regionp->getHost().getHostName(host_name, MAX_STRING); |
789 | 791 | ||
790 | char ip[MAX_STRING]; | 792 | char ip[MAX_STRING]; /*Flawfinder: ignore*/ |
791 | regionp->getHost().getString(ip, MAX_STRING); | 793 | regionp->getHost().getString(ip, MAX_STRING); |
792 | llinfos << "Moving agent into region: " << regionp->getName() | 794 | llinfos << "Moving agent into region: " << regionp->getName() |
793 | << " located at " << ip << llendl; | 795 | << " located at " << ip << llendl; |
@@ -850,6 +852,8 @@ void LLAgent::setRegion(LLViewerRegion *regionp) | |||
850 | // we could trake this at the dataserver side, but that's harder | 852 | // we could trake this at the dataserver side, but that's harder |
851 | U64 handle = regionp->getHandle(); | 853 | U64 handle = regionp->getHandle(); |
852 | mRegionsVisited.insert(handle); | 854 | mRegionsVisited.insert(handle); |
855 | |||
856 | gSelectMgr->updateSelectionCenter(); | ||
853 | } | 857 | } |
854 | 858 | ||
855 | 859 | ||
@@ -1584,7 +1588,8 @@ F32 LLAgent::getCameraZoomFraction() | |||
1584 | { | 1588 | { |
1585 | // 0.f -> camera zoomed all the way out | 1589 | // 0.f -> camera zoomed all the way out |
1586 | // 1.f -> camera zoomed all the way in | 1590 | // 1.f -> camera zoomed all the way in |
1587 | if (gSelectMgr->getObjectCount() && gSelectMgr->getSelectType() == SELECT_TYPE_HUD) | 1591 | LLObjectSelectionHandle selection = gSelectMgr->getSelection(); |
1592 | if (selection->getObjectCount() && selection->getSelectType() == SELECT_TYPE_HUD) | ||
1588 | { | 1593 | { |
1589 | // already [0,1] | 1594 | // already [0,1] |
1590 | return mAvatarObject->mHUDTargetZoom; | 1595 | return mAvatarObject->mHUDTargetZoom; |
@@ -1631,7 +1636,9 @@ void LLAgent::setCameraZoomFraction(F32 fraction) | |||
1631 | { | 1636 | { |
1632 | // 0.f -> camera zoomed all the way out | 1637 | // 0.f -> camera zoomed all the way out |
1633 | // 1.f -> camera zoomed all the way in | 1638 | // 1.f -> camera zoomed all the way in |
1634 | if (gSelectMgr->getObjectCount() && gSelectMgr->getSelectType() == SELECT_TYPE_HUD) | 1639 | LLObjectSelectionHandle selection = gSelectMgr->getSelection(); |
1640 | |||
1641 | if (selection->getObjectCount() && selection->getSelectType() == SELECT_TYPE_HUD) | ||
1635 | { | 1642 | { |
1636 | mAvatarObject->mHUDTargetZoom = fraction; | 1643 | mAvatarObject->mHUDTargetZoom = fraction; |
1637 | } | 1644 | } |
@@ -1681,7 +1688,8 @@ void LLAgent::setCameraZoomFraction(F32 fraction) | |||
1681 | //----------------------------------------------------------------------------- | 1688 | //----------------------------------------------------------------------------- |
1682 | void LLAgent::cameraOrbitAround(const F32 radians) | 1689 | void LLAgent::cameraOrbitAround(const F32 radians) |
1683 | { | 1690 | { |
1684 | if (gSelectMgr->getObjectCount() && gSelectMgr->getSelectType() == SELECT_TYPE_HUD) | 1691 | LLObjectSelectionHandle selection = gSelectMgr->getSelection(); |
1692 | if (selection->getObjectCount() && selection->getSelectType() == SELECT_TYPE_HUD) | ||
1685 | { | 1693 | { |
1686 | // do nothing for hud selection | 1694 | // do nothing for hud selection |
1687 | } | 1695 | } |
@@ -1703,7 +1711,8 @@ void LLAgent::cameraOrbitAround(const F32 radians) | |||
1703 | //----------------------------------------------------------------------------- | 1711 | //----------------------------------------------------------------------------- |
1704 | void LLAgent::cameraOrbitOver(const F32 angle) | 1712 | void LLAgent::cameraOrbitOver(const F32 angle) |
1705 | { | 1713 | { |
1706 | if (gSelectMgr->getObjectCount() && gSelectMgr->getSelectType() == SELECT_TYPE_HUD) | 1714 | LLObjectSelectionHandle selection = gSelectMgr->getSelection(); |
1715 | if (selection->getObjectCount() && selection->getSelectType() == SELECT_TYPE_HUD) | ||
1707 | { | 1716 | { |
1708 | // do nothing for hud selection | 1717 | // do nothing for hud selection |
1709 | } | 1718 | } |
@@ -1737,7 +1746,8 @@ void LLAgent::cameraZoomIn(const F32 fraction) | |||
1737 | return; | 1746 | return; |
1738 | } | 1747 | } |
1739 | 1748 | ||
1740 | if (gSelectMgr->getObjectCount() && gSelectMgr->getSelectType() == SELECT_TYPE_HUD) | 1749 | LLObjectSelectionHandle selection = gSelectMgr->getSelection(); |
1750 | if (selection->getObjectCount() && selection->getSelectType() == SELECT_TYPE_HUD) | ||
1741 | { | 1751 | { |
1742 | // just update hud zoom level | 1752 | // just update hud zoom level |
1743 | mAvatarObject->mHUDTargetZoom /= fraction; | 1753 | mAvatarObject->mHUDTargetZoom /= fraction; |
@@ -2256,11 +2266,9 @@ void LLAgent::stopAutoPilot(BOOL user_cancel) | |||
2256 | resetAxes(mAutoPilotTargetFacing); | 2266 | resetAxes(mAutoPilotTargetFacing); |
2257 | } | 2267 | } |
2258 | //NB: auto pilot can terminate for a reason other than reaching the destination | 2268 | //NB: auto pilot can terminate for a reason other than reaching the destination |
2259 | //TODO: enforce rotation constraint here as well | 2269 | if (mAutoPilotFinishedCallback) |
2260 | if (mAutoPilotFinishedCallback && | ||
2261 | ((mAutoPilotTargetDist < mAutoPilotStopDistance) || (mAutoPilotNoProgressFrameCount > AUTOPILOT_MAX_TIME_NO_PROGRESS * gFPSClamped))) | ||
2262 | { | 2270 | { |
2263 | mAutoPilotFinishedCallback(!user_cancel && dist_vec(gAgent.getPositionGlobal(), mAutoPilotTargetGlobal) < mAutoPilotTargetDist, mAutoPilotCallbackData); | 2271 | mAutoPilotFinishedCallback(!user_cancel && dist_vec(gAgent.getPositionGlobal(), mAutoPilotTargetGlobal) < mAutoPilotStopDistance, mAutoPilotCallbackData); |
2264 | } | 2272 | } |
2265 | mLeaderID = LLUUID::null; | 2273 | mLeaderID = LLUUID::null; |
2266 | 2274 | ||
@@ -2731,8 +2739,8 @@ U8 LLAgent::getRenderState() | |||
2731 | stopTyping(); | 2739 | stopTyping(); |
2732 | } | 2740 | } |
2733 | 2741 | ||
2734 | if ((!gSelectMgr->isEmpty() && gSelectMgr->shouldShowSelection()) | 2742 | if ((!gSelectMgr->getSelection()->isEmpty() && gSelectMgr->shouldShowSelection()) |
2735 | || gToolMgr->getCurrentTool( gKeyboard->currentMask(TRUE) )->isEditing() ) | 2743 | || gToolMgr->getCurrentTool()->isEditing() ) |
2736 | { | 2744 | { |
2737 | setRenderState(AGENT_STATE_EDITING); | 2745 | setRenderState(AGENT_STATE_EDITING); |
2738 | } | 2746 | } |
@@ -2774,8 +2782,7 @@ void LLAgent::endAnimationUpdateUI() | |||
2774 | gMenuBarView->setVisible(TRUE); | 2782 | gMenuBarView->setVisible(TRUE); |
2775 | gStatusBar->setVisibleForMouselook(true); | 2783 | gStatusBar->setVisibleForMouselook(true); |
2776 | 2784 | ||
2777 | gCurrentToolset = gBasicToolset; | 2785 | gToolMgr->setCurrentToolset(gBasicToolset); |
2778 | gToolMgr->useSelectedTool( gCurrentToolset ); | ||
2779 | 2786 | ||
2780 | // Only pop if we have pushed... | 2787 | // Only pop if we have pushed... |
2781 | if (TRUE == mViewsPushed) | 2788 | if (TRUE == mViewsPushed) |
@@ -2823,8 +2830,7 @@ void LLAgent::endAnimationUpdateUI() | |||
2823 | { | 2830 | { |
2824 | // make sure we ask to save changes | 2831 | // make sure we ask to save changes |
2825 | 2832 | ||
2826 | gCurrentToolset = gBasicToolset; | 2833 | gToolMgr->setCurrentToolset(gBasicToolset); |
2827 | gToolMgr->useSelectedTool( gCurrentToolset ); | ||
2828 | 2834 | ||
2829 | // HACK: If we're quitting, and we were in customize avatar, don't | 2835 | // HACK: If we're quitting, and we were in customize avatar, don't |
2830 | // let the mini-map go visible again. JC | 2836 | // let the mini-map go visible again. JC |
@@ -2861,8 +2867,7 @@ void LLAgent::endAnimationUpdateUI() | |||
2861 | // JC - Added for always chat in third person option | 2867 | // JC - Added for always chat in third person option |
2862 | gFocusMgr.setKeyboardFocus(NULL, NULL); | 2868 | gFocusMgr.setKeyboardFocus(NULL, NULL); |
2863 | 2869 | ||
2864 | gCurrentToolset = gMouselookToolset; | 2870 | gToolMgr->setCurrentToolset(gMouselookToolset); |
2865 | gToolMgr->useSelectedTool( gMouselookToolset ); | ||
2866 | 2871 | ||
2867 | mViewsPushed = TRUE; | 2872 | mViewsPushed = TRUE; |
2868 | 2873 | ||
@@ -2920,8 +2925,7 @@ void LLAgent::endAnimationUpdateUI() | |||
2920 | } | 2925 | } |
2921 | else if (mCameraMode == CAMERA_MODE_CUSTOMIZE_AVATAR) | 2926 | else if (mCameraMode == CAMERA_MODE_CUSTOMIZE_AVATAR) |
2922 | { | 2927 | { |
2923 | gCurrentToolset = gFaceEditToolset; | 2928 | gToolMgr->setCurrentToolset(gFaceEditToolset); |
2924 | gToolMgr->useSelectedTool( gFaceEditToolset ); | ||
2925 | 2929 | ||
2926 | gFloaterMap->pushVisible(FALSE); | 2930 | gFloaterMap->pushVisible(FALSE); |
2927 | /* | 2931 | /* |
@@ -3336,7 +3340,7 @@ void LLAgent::updateCamera() | |||
3336 | attachment; | 3340 | attachment; |
3337 | attachment = mAvatarObject->mAttachmentPoints.getNextData()) | 3341 | attachment = mAvatarObject->mAttachmentPoints.getNextData()) |
3338 | { | 3342 | { |
3339 | LLViewerObject *attached_object = attachment->getObject(0); | 3343 | LLViewerObject *attached_object = attachment->getObject(); |
3340 | if (attached_object && !attached_object->isDead() && attached_object->mDrawable.notNull()) | 3344 | if (attached_object && !attached_object->isDead() && attached_object->mDrawable.notNull()) |
3341 | { | 3345 | { |
3342 | // clear any existing "early" movements of attachment | 3346 | // clear any existing "early" movements of attachment |
@@ -3446,21 +3450,26 @@ LLVector3d LLAgent::calcFocusPositionTargetGlobal() | |||
3446 | { | 3450 | { |
3447 | LLDrawable* drawablep = mFocusObject->mDrawable; | 3451 | LLDrawable* drawablep = mFocusObject->mDrawable; |
3448 | 3452 | ||
3449 | if (mTrackFocusObject && drawablep && drawablep->isActive()) | 3453 | if (mTrackFocusObject && |
3454 | drawablep && | ||
3455 | drawablep->isActive()) | ||
3450 | { | 3456 | { |
3451 | if (mFocusObject->isSelected()) | 3457 | if (!mFocusObject->isAvatar()) |
3452 | { | 3458 | { |
3453 | gPipeline.updateMoveNormalAsync(drawablep); | 3459 | if (mFocusObject->isSelected()) |
3454 | } | ||
3455 | else | ||
3456 | { | ||
3457 | if (drawablep->isState(LLDrawable::MOVE_UNDAMPED)) | ||
3458 | { | 3460 | { |
3459 | gPipeline.updateMoveNormalAsync(drawablep); | 3461 | gPipeline.updateMoveNormalAsync(drawablep); |
3460 | } | 3462 | } |
3461 | else | 3463 | else |
3462 | { | 3464 | { |
3463 | gPipeline.updateMoveDampedAsync(drawablep); | 3465 | if (drawablep->isState(LLDrawable::MOVE_UNDAMPED)) |
3466 | { | ||
3467 | gPipeline.updateMoveNormalAsync(drawablep); | ||
3468 | } | ||
3469 | else | ||
3470 | { | ||
3471 | gPipeline.updateMoveDampedAsync(drawablep); | ||
3472 | } | ||
3464 | } | 3473 | } |
3465 | } | 3474 | } |
3466 | } | 3475 | } |
@@ -3471,11 +3480,6 @@ LLVector3d LLAgent::calcFocusPositionTargetGlobal() | |||
3471 | } | 3480 | } |
3472 | LLVector3 focus_agent = mFocusObject->getRenderPosition() + mFocusObjectOffset; | 3481 | LLVector3 focus_agent = mFocusObject->getRenderPosition() + mFocusObjectOffset; |
3473 | mFocusTargetGlobal.setVec(getPosGlobalFromAgent(focus_agent)); | 3482 | mFocusTargetGlobal.setVec(getPosGlobalFromAgent(focus_agent)); |
3474 | // *FIX: get camera pointat behavior working | ||
3475 | //if (mTrackFocusObject) | ||
3476 | //{ | ||
3477 | // mCameraFocusOffset = gAgent.getPosGlobalFromAgent(gCamera->getOrigin()) - mFocusTargetGlobal; | ||
3478 | //} | ||
3479 | } | 3483 | } |
3480 | return mFocusTargetGlobal; | 3484 | return mFocusTargetGlobal; |
3481 | } | 3485 | } |
@@ -3840,8 +3844,6 @@ LLVector3d LLAgent::calcCameraPositionTargetGlobal(BOOL *hit_limit) | |||
3840 | if (camera_position_global.mdV[VZ] < camera_land_height + camera_min_off_ground) | 3844 | if (camera_position_global.mdV[VZ] < camera_land_height + camera_min_off_ground) |
3841 | { | 3845 | { |
3842 | camera_position_global.mdV[VZ] = camera_land_height + camera_min_off_ground; | 3846 | camera_position_global.mdV[VZ] = camera_land_height + camera_min_off_ground; |
3843 | |||
3844 | gMinObjectDistance = MIN_NEAR_PLANE; | ||
3845 | isConstrained = TRUE; | 3847 | isConstrained = TRUE; |
3846 | } | 3848 | } |
3847 | 3849 | ||
@@ -3873,6 +3875,7 @@ void LLAgent::handleScrollWheel(S32 clicks) | |||
3873 | } | 3875 | } |
3874 | else | 3876 | else |
3875 | { | 3877 | { |
3878 | LLObjectSelectionHandle selection = gSelectMgr->getSelection(); | ||
3876 | const F32 ROOT_ROOT_TWO = sqrt(F_SQRT2); | 3879 | const F32 ROOT_ROOT_TWO = sqrt(F_SQRT2); |
3877 | 3880 | ||
3878 | // Block if camera is animating | 3881 | // Block if camera is animating |
@@ -3881,7 +3884,7 @@ void LLAgent::handleScrollWheel(S32 clicks) | |||
3881 | return; | 3884 | return; |
3882 | } | 3885 | } |
3883 | 3886 | ||
3884 | if (gSelectMgr->getObjectCount() && gSelectMgr->getSelectType() == SELECT_TYPE_HUD) | 3887 | if (selection->getObjectCount() && selection->getSelectType() == SELECT_TYPE_HUD) |
3885 | { | 3888 | { |
3886 | F32 zoom_factor = (F32)pow(0.8, -clicks); | 3889 | F32 zoom_factor = (F32)pow(0.8, -clicks); |
3887 | cameraZoomIn(zoom_factor); | 3890 | cameraZoomIn(zoom_factor); |
@@ -3952,9 +3955,7 @@ void LLAgent::changeCameraToMouselook(BOOL animate) | |||
3952 | // unpause avatar animation | 3955 | // unpause avatar animation |
3953 | mPauseRequest = NULL; | 3956 | mPauseRequest = NULL; |
3954 | 3957 | ||
3955 | gCurrentToolset = gMouselookToolset; | 3958 | gToolMgr->setCurrentToolset(gMouselookToolset); |
3956 | gCurrentToolset->selectFirstTool(); | ||
3957 | gToolMgr->useSelectedTool( gCurrentToolset ); | ||
3958 | 3959 | ||
3959 | gSavedSettings.setBOOL("FirstPersonBtnState", FALSE); | 3960 | gSavedSettings.setBOOL("FirstPersonBtnState", FALSE); |
3960 | gSavedSettings.setBOOL("MouselookBtnState", TRUE); | 3961 | gSavedSettings.setBOOL("MouselookBtnState", TRUE); |
@@ -4036,9 +4037,7 @@ void LLAgent::changeCameraToFollow(BOOL animate) | |||
4036 | 4037 | ||
4037 | if (gBasicToolset) | 4038 | if (gBasicToolset) |
4038 | { | 4039 | { |
4039 | gCurrentToolset = gBasicToolset; | 4040 | gToolMgr->setCurrentToolset(gBasicToolset); |
4040 | gCurrentToolset->selectFirstTool(); | ||
4041 | gToolMgr->useSelectedTool( gCurrentToolset ); | ||
4042 | } | 4041 | } |
4043 | 4042 | ||
4044 | if (mAvatarObject) | 4043 | if (mAvatarObject) |
@@ -4111,9 +4110,7 @@ void LLAgent::changeCameraToThirdPerson(BOOL animate) | |||
4111 | { | 4110 | { |
4112 | if (gBasicToolset) | 4111 | if (gBasicToolset) |
4113 | { | 4112 | { |
4114 | gCurrentToolset = gBasicToolset; | 4113 | gToolMgr->setCurrentToolset(gBasicToolset); |
4115 | gCurrentToolset->selectFirstTool(); | ||
4116 | gToolMgr->useSelectedTool( gCurrentToolset ); | ||
4117 | } | 4114 | } |
4118 | 4115 | ||
4119 | mCameraLag.clearVec(); | 4116 | mCameraLag.clearVec(); |
@@ -4176,9 +4173,7 @@ void LLAgent::changeCameraToCustomizeAvatar(BOOL animate) | |||
4176 | 4173 | ||
4177 | if (gFaceEditToolset) | 4174 | if (gFaceEditToolset) |
4178 | { | 4175 | { |
4179 | gCurrentToolset = gFaceEditToolset; | 4176 | gToolMgr->setCurrentToolset(gFaceEditToolset); |
4180 | gCurrentToolset->selectFirstTool(); | ||
4181 | gToolMgr->useSelectedTool( gCurrentToolset ); | ||
4182 | } | 4177 | } |
4183 | 4178 | ||
4184 | gSavedSettings.setBOOL("FirstPersonBtnState", FALSE); | 4179 | gSavedSettings.setBOOL("FirstPersonBtnState", FALSE); |
@@ -4673,14 +4668,26 @@ void LLAgent::requestStopMotion( LLMotion* motion ) | |||
4673 | // Notify all avatars that a motion has stopped. | 4668 | // Notify all avatars that a motion has stopped. |
4674 | // This is needed to clear the animation state bits | 4669 | // This is needed to clear the animation state bits |
4675 | LLUUID anim_state = motion->getID(); | 4670 | LLUUID anim_state = motion->getID(); |
4671 | onAnimStop(motion->getID()); | ||
4676 | 4672 | ||
4677 | // if motion is not looping, it could have stopped by running out of time | 4673 | // if motion is not looping, it could have stopped by running out of time |
4678 | // so we need to tell the server this | 4674 | // so we need to tell the server this |
4679 | // llinfos << "Sending stop for motion " << motion->getName() << llendl; | 4675 | // llinfos << "Sending stop for motion " << motion->getName() << llendl; |
4680 | sendAnimationRequest( anim_state, ANIM_REQUEST_STOP ); | 4676 | sendAnimationRequest( anim_state, ANIM_REQUEST_STOP ); |
4677 | } | ||
4681 | 4678 | ||
4679 | void LLAgent::onAnimStop(const LLUUID& id) | ||
4680 | { | ||
4682 | // handle automatic state transitions (based on completion of animation playback) | 4681 | // handle automatic state transitions (based on completion of animation playback) |
4683 | if (anim_state == ANIM_AGENT_STANDUP) | 4682 | if (id == ANIM_AGENT_STAND) |
4683 | { | ||
4684 | stopFidget(); | ||
4685 | } | ||
4686 | else if (id == ANIM_AGENT_AWAY) | ||
4687 | { | ||
4688 | clearAFK(); | ||
4689 | } | ||
4690 | else if (id == ANIM_AGENT_STANDUP) | ||
4684 | { | 4691 | { |
4685 | // send stand up command | 4692 | // send stand up command |
4686 | setControlFlags(AGENT_CONTROL_FINISH_ANIM); | 4693 | setControlFlags(AGENT_CONTROL_FINISH_ANIM); |
@@ -4689,7 +4696,7 @@ void LLAgent::requestStopMotion( LLMotion* motion ) | |||
4689 | if (mAvatarObject.notNull() && !mAvatarObject->mBelowWater && rand() % 3 == 0) | 4696 | if (mAvatarObject.notNull() && !mAvatarObject->mBelowWater && rand() % 3 == 0) |
4690 | sendAnimationRequest( ANIM_AGENT_BRUSH, ANIM_REQUEST_START ); | 4697 | sendAnimationRequest( ANIM_AGENT_BRUSH, ANIM_REQUEST_START ); |
4691 | } | 4698 | } |
4692 | else if (anim_state == ANIM_AGENT_PRE_JUMP || anim_state == ANIM_AGENT_LAND || anim_state == ANIM_AGENT_MEDIUM_LAND) | 4699 | else if (id == ANIM_AGENT_PRE_JUMP || id == ANIM_AGENT_LAND || id == ANIM_AGENT_MEDIUM_LAND) |
4693 | { | 4700 | { |
4694 | setControlFlags(AGENT_CONTROL_FINISH_ANIM); | 4701 | setControlFlags(AGENT_CONTROL_FINISH_ANIM); |
4695 | } | 4702 | } |
@@ -5184,7 +5191,7 @@ void LLAgent::processAgentGroupDataUpdate(LLMessageSystem *msg, void **) | |||
5184 | LLGroupData group; | 5191 | LLGroupData group; |
5185 | S32 index = -1; | 5192 | S32 index = -1; |
5186 | bool need_floater_update = false; | 5193 | bool need_floater_update = false; |
5187 | char group_name[DB_GROUP_NAME_BUF_SIZE]; | 5194 | char group_name[DB_GROUP_NAME_BUF_SIZE]; /*Flawfinder: ignore*/ |
5188 | for(S32 i = 0; i < count; ++i) | 5195 | for(S32 i = 0; i < count; ++i) |
5189 | { | 5196 | { |
5190 | msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupID, group.mID, i); | 5197 | msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupID, group.mID, i); |
@@ -6593,7 +6600,7 @@ void LLAgent::makeNewOutfit( | |||
6593 | S32 attachment_pt = attachments_to_include[i]; | 6600 | S32 attachment_pt = attachments_to_include[i]; |
6594 | LLViewerJointAttachment* attachment = mAvatarObject->mAttachmentPoints.getIfThere( attachment_pt ); | 6601 | LLViewerJointAttachment* attachment = mAvatarObject->mAttachmentPoints.getIfThere( attachment_pt ); |
6595 | if(!attachment) continue; | 6602 | if(!attachment) continue; |
6596 | LLViewerObject* attached_object = attachment->getObject(0); | 6603 | LLViewerObject* attached_object = attachment->getObject(); |
6597 | if(!attached_object) continue; | 6604 | if(!attached_object) continue; |
6598 | const LLUUID& item_id = attachment->getItemID(); | 6605 | const LLUUID& item_id = attachment->getItemID(); |
6599 | if(item_id.isNull()) continue; | 6606 | if(item_id.isNull()) continue; |
@@ -7216,7 +7223,7 @@ void LLAgent::userRemoveAllAttachments( void* userdata ) | |||
7216 | attachment; | 7223 | attachment; |
7217 | attachment = avatarp->mAttachmentPoints.getNextData()) | 7224 | attachment = avatarp->mAttachmentPoints.getNextData()) |
7218 | { | 7225 | { |
7219 | LLViewerObject* objectp = attachment->getObject(0); | 7226 | LLViewerObject* objectp = attachment->getObject(); |
7220 | if (objectp) | 7227 | if (objectp) |
7221 | { | 7228 | { |
7222 | gMessageSystem->nextBlockFast(_PREHASH_ObjectData); | 7229 | gMessageSystem->nextBlockFast(_PREHASH_ObjectData); |