Skip to content

Commit

Permalink
fix linux
Browse files Browse the repository at this point in the history
  • Loading branch information
beats-dh committed Mar 7, 2023
1 parent aa265b6 commit df90c36
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/items/tile.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class SpectatorVector : private CreatureVector {
}
}

operator CreatureVector&() {
CreatureVector &getVector() {
return specs;
}

Expand Down
11 changes: 9 additions & 2 deletions src/map/map.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,18 @@ class AStarNodes {
static int_fast32_t getTileWalkCost(const Creature &creature, const Tile* tile);

private:
#if defined(__SSE2__)
alignas(16) uint32_t nodesTable[MAX_NODES];
alignas(64) int32_t calculatedNodes[MAX_NODES];
AStarNode nodes[MAX_NODES];
bool openNodes[MAX_NODES];
phmap::flat_hash_map<uint32_t, AStarNode*> nodeTable;
#else
AStarNode nodes[MAX_NODES];
uint32_t nodesTable[MAX_NODES];
#endif
size_t curNode;
int_fast32_t closedNodes;
bool openNodes[MAX_NODES];
phmap::flat_hash_map<uint32_t, AStarNode*> nodeTable;
};

using SpectatorCache = std::map<Position, SpectatorVector>;
Expand Down

0 comments on commit df90c36

Please sign in to comment.