Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9f61bbd739 | ||
|
|
cefc57561b | ||
|
|
742ccdecb4 | ||
|
|
fcb2c0fd07 |
+1
-1
@@ -1059,7 +1059,7 @@ void GameManager::commandBuildRoadToTileSelected(int targetX, int targetY, Matri
|
|||||||
// Pathfind from current tile to target tile
|
// Pathfind from current tile to target tile
|
||||||
std::vector<std::pair<int, int>> route = Pathfinder::findPath(
|
std::vector<std::pair<int, int>> route = Pathfinder::findPath(
|
||||||
selected->tileX, selected->tileY, targetX, targetY,
|
selected->tileX, selected->tileY, targetX, targetY,
|
||||||
MovementDomain::Land, mapPoints, numPoints05, &selected->config
|
mapPoints, numPoints05, MovementDomain::Land, &selected->config
|
||||||
);
|
);
|
||||||
|
|
||||||
if (route.empty()) {
|
if (route.empty()) {
|
||||||
|
|||||||
+1
-1
@@ -908,7 +908,7 @@ void QSceneRenderer::drawPathAndRange(QPainter &painter, Unit *unit, const QMatr
|
|||||||
int hx = -1, hy = -1;
|
int hx = -1, hy = -1;
|
||||||
if (screenToHex(m_mouseCurrentPos, vMatrix, hx, hy) && (hx != unit->tileX || hy != unit->tileY)) {
|
if (screenToHex(m_mouseCurrentPos, vMatrix, hx, hy) && (hx != unit->tileX || hy != unit->tileY)) {
|
||||||
if (TerrainMovementManager::instance().isHexPassable(hx, hy, MovementDomain::Land, m_point, m_numPoints05, &unit->config)) {
|
if (TerrainMovementManager::instance().isHexPassable(hx, hy, MovementDomain::Land, m_point, m_numPoints05, &unit->config)) {
|
||||||
auto preview = Pathfinder::findPath(unit->tileX, unit->tileY, hx, hy, MovementDomain::Land, m_point, m_numPoints05, &unit->config);
|
auto preview = Pathfinder::findPath(unit->tileX, unit->tileY, hx, hy, m_point, m_numPoints05, MovementDomain::Land, &unit->config);
|
||||||
if (preview.size() > 1) {
|
if (preview.size() > 1) {
|
||||||
QPainterPath previewLine;
|
QPainterPath previewLine;
|
||||||
bool first = true;
|
bool first = true;
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
#include "matrix2d.h"
|
#include "matrix2d.h"
|
||||||
#include "unitrenderer.h"
|
#include "unitrenderer.h"
|
||||||
#include "gamemanager.h"
|
#include "gamemanager.h"
|
||||||
|
#include "actionneededmanager.h"
|
||||||
|
|
||||||
class QSceneRenderer : public QOpenGLWidget
|
class QSceneRenderer : public QOpenGLWidget
|
||||||
{
|
{
|
||||||
@@ -177,6 +178,19 @@ protected:
|
|||||||
int amount;
|
int amount;
|
||||||
};
|
};
|
||||||
std::vector<CityResourceChoiceHit> m_cityResourceChoiceHits;
|
std::vector<CityResourceChoiceHit> m_cityResourceChoiceHits;
|
||||||
|
|
||||||
|
// Action Needed Queue (Bottom HUD notification bar)
|
||||||
|
struct ActionItemHit {
|
||||||
|
QRect rect;
|
||||||
|
QRect dismissRect;
|
||||||
|
ActionNeededType type;
|
||||||
|
int entityId;
|
||||||
|
};
|
||||||
|
std::vector<ActionItemHit> m_actionItemHits;
|
||||||
|
QRect m_actionQueueHeaderRect;
|
||||||
|
|
||||||
|
void drawActionNeededQueue(QPainter &painter);
|
||||||
|
void handleActionItemClick(ActionNeededType type, int entityId);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // QSCENERENDERER_H
|
#endif // QSCENERENDERER_H
|
||||||
|
|||||||
Reference in New Issue
Block a user