MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / handlePlayerActionSelectTile

Method handlePlayerActionSelectTile

source/modes/GameMode.cpp:1719–1745  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1717}
1718
1719void GameMode::handlePlayerActionSelectTile()
1720{
1721 const InputManager& inputManager = mModeManager->getInputManager();
1722 if(inputManager.mCommandState == InputCommandState::infoOnly)
1723 {
1724 selectSquaredTiles(inputManager.mXPos, inputManager.mYPos, inputManager.mXPos,
1725 inputManager.mYPos);
1726 return;
1727 }
1728
1729 if(inputManager.mCommandState == InputCommandState::building)
1730 {
1731 selectSquaredTiles(inputManager.mXPos, inputManager.mYPos, inputManager.mLStartDragX,
1732 inputManager.mLStartDragY);
1733 return;
1734 }
1735
1736 unselectAllTiles();
1737
1738 ClientNotification *clientNotification = new ClientNotification(
1739 ClientNotificationType::askMarkTiles);
1740 clientNotification->mPacket << inputManager.mXPos << inputManager.mYPos;
1741 clientNotification->mPacket << inputManager.mLStartDragX << inputManager.mLStartDragY;
1742 clientNotification->mPacket << mDigSetBool;
1743 ODClient::getSingleton().queueClientNotification(clientNotification);
1744 mPlayerSelection.setCurrentAction(SelectedAction::none);
1745}
1746
1747void GameMode::resetSkillTree()
1748{

Callers

nothing calls this directly

Calls 2

setCurrentActionMethod · 0.80

Tested by

no test coverage detected