Change signature of handle_go_to to be more versatile
This commit is contained in:
@@ -533,7 +533,7 @@ void LLToolPie::walkToClickedLocation()
|
|||||||
mAutoPilotDestination->setDuration(3.f);
|
mAutoPilotDestination->setDuration(3.f);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
handle_go_to();
|
handle_go_to(mPick.mPosGlobal);
|
||||||
}
|
}
|
||||||
|
|
||||||
// When we get object properties after left-clicking on an object
|
// When we get object properties after left-clicking on an object
|
||||||
@@ -763,8 +763,7 @@ BOOL LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask)
|
|||||||
|
|
||||||
void LLToolPie::stopClickToWalk()
|
void LLToolPie::stopClickToWalk()
|
||||||
{
|
{
|
||||||
mPick.mPosGlobal = gAgent.getPositionGlobal();
|
handle_go_to(gAgent.getPositionGlobal());
|
||||||
handle_go_to();
|
|
||||||
/* Singu TODO: llhudeffectblob
|
/* Singu TODO: llhudeffectblob
|
||||||
if(mAutoPilotDestination)
|
if(mAutoPilotDestination)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2837,12 +2837,11 @@ class LLObjectPFLinksetsSelected : public view_listener_t
|
|||||||
|
|
||||||
// </edit>
|
// </edit>
|
||||||
|
|
||||||
bool handle_go_to()
|
void handle_go_to(const LLVector3d& pos)
|
||||||
{
|
{
|
||||||
// try simulator autopilot
|
// try simulator autopilot
|
||||||
std::vector<std::string> strings;
|
std::vector<std::string> strings;
|
||||||
std::string val;
|
std::string val;
|
||||||
LLVector3d pos = LLToolPie::getInstance()->getPick().mPosGlobal;
|
|
||||||
val = llformat("%.9g", pos.mdV[VX]);
|
val = llformat("%.9g", pos.mdV[VX]);
|
||||||
strings.push_back(val);
|
strings.push_back(val);
|
||||||
val = llformat("%.9g", pos.mdV[VY]);
|
val = llformat("%.9g", pos.mdV[VY]);
|
||||||
@@ -2868,14 +2867,13 @@ bool handle_go_to()
|
|||||||
|
|
||||||
// Could be first use
|
// Could be first use
|
||||||
LLFirstUse::useGoTo();
|
LLFirstUse::useGoTo();
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class LLGoToObject : public view_listener_t
|
class LLGoToObject : public view_listener_t
|
||||||
{
|
{
|
||||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||||
{
|
{
|
||||||
return handle_go_to();
|
return handle_go_to(LLToolPie::instance().getPick().mPosGlobal);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user