Change signature of handle_go_to to be more versatile

This commit is contained in:
Liru Færs
2020-01-05 15:39:35 -05:00
parent a02693e4dd
commit 1fbfc498bf
2 changed files with 4 additions and 7 deletions

View File

@@ -533,7 +533,7 @@ void LLToolPie::walkToClickedLocation()
mAutoPilotDestination->setDuration(3.f);
*/
handle_go_to();
handle_go_to(mPick.mPosGlobal);
}
// 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()
{
mPick.mPosGlobal = gAgent.getPositionGlobal();
handle_go_to();
handle_go_to(gAgent.getPositionGlobal());
/* Singu TODO: llhudeffectblob
if(mAutoPilotDestination)
{

View File

@@ -2837,12 +2837,11 @@ class LLObjectPFLinksetsSelected : public view_listener_t
// </edit>
bool handle_go_to()
void handle_go_to(const LLVector3d& pos)
{
// try simulator autopilot
std::vector<std::string> strings;
std::string val;
LLVector3d pos = LLToolPie::getInstance()->getPick().mPosGlobal;
val = llformat("%.9g", pos.mdV[VX]);
strings.push_back(val);
val = llformat("%.9g", pos.mdV[VY]);
@@ -2868,14 +2867,13 @@ bool handle_go_to()
// Could be first use
LLFirstUse::useGoTo();
return true;
}
class LLGoToObject : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
return handle_go_to();
return handle_go_to(LLToolPie::instance().getPick().mPosGlobal);
}
};