MCPcopy Create free account
hub / github.com/crossuo/crossuo / OnRightMouseButtonDoubleClick

Method OnRightMouseButtonDoubleClick

src/ScreenStages/GameScreen.cpp:2610–2627  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2608}
2609
2610bool CGameScreen::OnRightMouseButtonDoubleClick()
2611{
2612 if (g_ConfigManager.EnablePathfind && g_SelectedObject.Object != nullptr &&
2613 g_SelectedObject.Object->IsWorldObject() && !g_PathFinder.AutoWalking)
2614 {
2615 CRenderWorldObject *rwo = (CRenderWorldObject *)g_SelectedObject.Object;
2616 if (rwo->IsLandObject() || rwo->IsSurface())
2617 {
2618 if (g_PathFinder.WalkTo(rwo->GetX(), rwo->GetY(), rwo->GetZ(), 0))
2619 {
2620 g_Game.CreateTextMessage(TT_OBJECT, g_PlayerSerial, 3, 0, "Pathfinding!");
2621 return true;
2622 }
2623 }
2624 }
2625
2626 return false;
2627}
2628
2629void CGameScreen::OnMidMouseButtonScroll(bool up)
2630{

Callers

nothing calls this directly

Calls 8

WalkToMethod · 0.80
GetYMethod · 0.80
GetZMethod · 0.80
CreateTextMessageMethod · 0.80
IsWorldObjectMethod · 0.45
IsLandObjectMethod · 0.45
IsSurfaceMethod · 0.45
GetXMethod · 0.45

Tested by

no test coverage detected