コード例 #1
0
void LLFloaterMove::onOpen(const LLSD& key)
{
	if (gAgent.getFlying())
	{
		setFlyingMode(TRUE);
		showModeButtons(FALSE);
	}

	if (isAgentAvatarValid() && gAgentAvatarp->isSitting())
	{
		setSittingMode(TRUE);
		showModeButtons(FALSE);
	}

	sUpdateFlyingStatus();
}
コード例 #2
0
void LLFloaterMove::setMovementMode(const EMovementMode mode)
{
	mCurrentMode = mode;
	gAgent.setFlying(MM_FLY == mode);

	// attempts to set avatar flying can not set it real flying in some cases.
	// For ex. when avatar fell down & is standing up.
	// So, no need to continue processing FLY mode. See EXT-1079
	if (MM_FLY == mode && !gAgent.getFlying())
	{
		return;
	}

	switch (mode)
	{
	case MM_RUN:
		gAgent.setAlwaysRun();
		gAgent.setRunning();
//MK
		if (gRRenabled)
		{
			if (gAgent.mRRInterface.mContainsRun || gAgent.mRRInterface.mContainsAlwaysRun) 
			{
				gAgent.clearRunning();
				gAgent.clearAlwaysRun();
			}
		}
//mk
		break;
	case MM_WALK:
		gAgent.clearAlwaysRun();
		gAgent.clearRunning();
		break;
	default:
		//do nothing for other modes (MM_FLY)
		break;
	}
	// tell the simulator.
	gAgent.sendWalkRun(gAgent.getAlwaysRun());
	
	updateButtonsWithMovementMode(mode);
//MK
		if (gRRenabled && mode == MM_RUN)
		{
			if (gAgent.mRRInterface.mContainsRun || gAgent.mRRInterface.mContainsAlwaysRun) 
			{
				updateButtonsWithMovementMode(MM_WALK);
			}
		}
//mk

	bool bHideModeButtons = MM_FLY == mode
		|| (isAgentAvatarValid() && gAgentAvatarp->isSitting());

	showModeButtons(!bHideModeButtons);

}
コード例 #3
0
// virtual
void LLFloaterMove::setEnabled(BOOL enabled)
{
	//we need to enable/disable only buttons, EXT-1061.

	// is called before postBuild() - use findChild here.
	LLPanel *panel_actions = findChild<LLPanel>("panel_actions");
	if (panel_actions) panel_actions->setEnabled(enabled);

	showModeButtons(enabled);
}
コード例 #4
0
ファイル: llmoveview.cpp プロジェクト: wish-ds/firestorm-ds
void LLFloaterMove::onOpen(const LLSD& key)
{
	if (gAgent.getFlying())
	{
		setFlyingMode(TRUE);
		showModeButtons(FALSE);
	}

	if (isAgentAvatarValid() && gAgentAvatarp->isSitting())
	{
		setSittingMode(TRUE);
		showModeButtons(FALSE);
	}

//	sUpdateFlyingStatus();
// [RLVa:KB] - Checked: 2011-05-27 (RLVa-1.4.0a) | Added: RLVa-1.4.0a
	sUpdateMovementStatus();
// [/RLVa:KB]
}
コード例 #5
0
void LLFloaterMove::onOpen(const LLSD& key)
{
	LLButton *anchor_panel = LLBottomTray::getInstance()->getChild<LLButton>("movement_btn");

	if (gAgent.getFlying())
	{
		setFlyingMode(TRUE);
		showModeButtons(FALSE);
	}

	if (gAgent.getAvatarObject() && gAgent.getAvatarObject()->isSitting())
	{
		setSittingMode(TRUE);
		showModeButtons(FALSE);
	}

	setDockControl(new LLDockControl(
		anchor_panel, this,
		getDockTongue(), LLDockControl::TOP));

	sUpdateFlyingStatus();
}
コード例 #6
0
ファイル: llmoveview.cpp プロジェクト: wish-ds/firestorm-ds
void LLFloaterMove::initMovementMode()
{
	EMovementMode initMovementMode = gAgent.getAlwaysRun() ? MM_RUN : MM_WALK;
	if (gAgent.getFlying())
	{
		initMovementMode = MM_FLY;
	}
	setMovementMode(initMovementMode);

	if (isAgentAvatarValid())
	{
		showModeButtons(!gAgentAvatarp->isSitting());
	}
}
コード例 #7
0
ファイル: llmoveview.cpp プロジェクト: wish-ds/firestorm-ds
void LLFloaterMove::setMovementMode(const EMovementMode mode)
{
	mCurrentMode = mode;
	gAgent.setFlying(MM_FLY == mode);

	// attempts to set avatar flying can not set it real flying in some cases.
	// For ex. when avatar fell down & is standing up.
	// So, no need to continue processing FLY mode. See EXT-1079
	if (MM_FLY == mode && !gAgent.getFlying())
	{
		return;
	}

	switch (mode)
	{
	case MM_RUN:
		gAgent.setAlwaysRun();
//		gAgent.setRunning();
		break;
	case MM_WALK:
		gAgent.clearAlwaysRun();
//		gAgent.clearRunning();
		break;
	default:
		//do nothing for other modes (MM_FLY)
		break;
	}
	// tell the simulator.
//	gAgent.sendWalkRun(gAgent.getAlwaysRun());
//	
//	updateButtonsWithMovementMode(mode);
//
//	bool bHideModeButtons = MM_FLY == mode
//		|| (isAgentAvatarValid() && gAgentAvatarp->isSitting());
// [RLVa:KB] - Checked: 2011-05-11 (RLVa-1.3.0i) | Added: RLVa-1.3.0i
	// Running may have been restricted so update walk-vs-run from the agent's actual running state
	if ( (MM_WALK == mode) || (MM_RUN == mode) )
		mCurrentMode = (gAgent.getRunning()) ? MM_RUN : MM_WALK;

	updateButtonsWithMovementMode(mCurrentMode);

	bool bHideModeButtons = (MM_FLY == mCurrentMode) || (isAgentAvatarValid() && gAgentAvatarp->isSitting());
// [/RLVa:KB]

	showModeButtons(!bHideModeButtons);

}