Skip to content

Commit 3d482ca

Browse files
author
James McCulloch
committed
* fix (work-around) for apparent MSVC bug, in AStarNode::operator<()
* removed some unused pathfinder stuff, and const-ified some other stuff * RoutePlanner is used in scenarios (for testing purposes...)
1 parent d280eef commit 3d482ca

File tree

12 files changed

+61
-673
lines changed

12 files changed

+61
-673
lines changed

source/glest_game/ai/cartographer.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include "cartographer.h"
1313
#include "game_constants.h"
1414
#include "route_planner.h"
15-
#include "node_map.h"
1615

1716
#include "pos_iterator.h"
1817

@@ -45,14 +44,6 @@ Cartographer::Cartographer(World *world)
4544
int w = cellMap->getW(), h = cellMap->getH();
4645

4746
routePlanner = world->getRoutePlanner();
48-
49-
nodeMap = new NodeMap(cellMap);
50-
GridNeighbours gNeighbours(w, h);
51-
nmSearchEngine = new SearchEngine<NodeMap, GridNeighbours>(gNeighbours, nodeMap, true);
52-
nmSearchEngine->setStorage(nodeMap);
53-
nmSearchEngine->setInvalidKey(Vec2i(-1));
54-
nmSearchEngine->getNeighbourFunc().setSearchSpace(ssCellMap);
55-
5647
masterMap = new AnnotatedMap(world);
5748
clusterMap = new ClusterMap(masterMap, this);
5849

@@ -104,10 +95,8 @@ Cartographer::Cartographer(World *world)
10495

10596
/** Destruct */
10697
Cartographer::~Cartographer() {
107-
delete nodeMap;
10898
delete masterMap;
10999
delete clusterMap;
110-
delete nmSearchEngine;
111100

112101
// Goal Maps
113102
deleteMapValues(resourceMaps.begin(), resourceMaps.end());

source/glest_game/ai/cartographer.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include "game_constants.h"
1616
#include "influence_map.h"
1717
#include "annotated_map.h"
18-
#include "node_map.h"
1918
#include "cluster_map.h"
2019

2120
#include "world.h"
@@ -106,10 +105,6 @@ class Cartographer {
106105
StoreMaps storeMaps; /**< goal maps for resource stores */
107106
SiteMaps siteMaps; /**< goal maps for building sites */
108107

109-
// A* stuff
110-
NodeMap *nodeMap;
111-
SearchEngine<NodeMap,GridNeighbours> *nmSearchEngine;
112-
113108
World *world;
114109
Map *cellMap;
115110
RoutePlanner *routePlanner;
@@ -135,7 +130,6 @@ class Cartographer {
135130
Cartographer(World *world);
136131
virtual ~Cartographer();
137132

138-
SearchEngine<NodeMap,GridNeighbours>* getSearchEngine() { return nmSearchEngine; }
139133
RoutePlanner* getRoutePlanner() { return routePlanner; }
140134

141135
/** Update the annotated maps when an obstacle has been added or removed from the map.

source/glest_game/ai/node_map.cpp

Lines changed: 0 additions & 291 deletions
This file was deleted.

0 commit comments

Comments
 (0)