Skip to content

Commit 93d26e6

Browse files
committed
cleanup
1 parent 2217012 commit 93d26e6

2 files changed

Lines changed: 0 additions & 35 deletions

File tree

GeneralsMD/Code/GameEngine/Include/GameLogic/TerrainLogic.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,9 +266,6 @@ class TerrainLogic : public Snapshot,
266266
/// Return the closest waypoint on the labeled path
267267
virtual Waypoint *getClosestWaypointOnPath( const Coord3D *pos, AsciiString label );
268268

269-
/// Return a vector of shipyard locations for this Label, expected to be ShipyardN where N is player index starting with 1
270-
virtual std::vector<Waypoint*> getShipyardBuildPositions(const Coord3D* pos, AsciiString label);
271-
272269
/// Return true if the waypoint path containing pWay is labeled with the label.
273270
virtual Bool isPurposeOfPath( Waypoint *pWay, AsciiString label );
274271

GeneralsMD/Code/GameEngine/Source/GameLogic/Map/TerrainLogic.cpp

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,38 +1608,6 @@ Waypoint *TerrainLogic::getClosestWaypointOnPath( const Coord3D *pos, AsciiStrin
16081608
return pClosestWay;
16091609
}
16101610

1611-
//-------------------------------------------------------------------------------------------------
1612-
/** Return shipyard building locations for a player sorted by distance to pos */
1613-
//-------------------------------------------------------------------------------------------------
1614-
std::vector<Waypoint*> TerrainLogic::getShipyardBuildPositions(const Coord3D* pos, AsciiString label)
1615-
{
1616-
std::vector<Waypoint*> ret;
1617-
if (label.isEmpty()) {
1618-
DEBUG_LOG(("***Warning - asking for empty path label."));
1619-
return ret;
1620-
}
1621-
1622-
for (Waypoint* way = m_waypointListHead; way; way = way->getNext()) {
1623-
Bool match = false;
1624-
if (label.compareNoCase(way->getPathLabel1()) == 0) match = true;
1625-
if (label.compareNoCase(way->getPathLabel2()) == 0) match = true;
1626-
if (label.compareNoCase(way->getPathLabel3()) == 0) match = true;
1627-
if (match) {
1628-
ret.push_back(way);
1629-
}
1630-
}
1631-
1632-
std::sort(ret.begin(), ret.end(), [=](const Waypoint* a, const Waypoint* b) {
1633-
const Coord3D* posA = a->getLocation();
1634-
const Coord3D* posB = b->getLocation();
1635-
Real distAsqr = (posA->x - pos->x) * (posA->x - pos->x) + (posA->y - pos->y) * (posA->y - pos->y);
1636-
Real distBsqr = (posB->x - pos->x) * (posB->x - pos->x) + (posB->y - pos->y) * (posB->y - pos->y);
1637-
return distAsqr < distBsqr;
1638-
});
1639-
1640-
return ret;
1641-
}
1642-
16431611
//-------------------------------------------------------------------------------------------------
16441612
/** Return true if the waypoint path containing pWay is labeled with the label. */
16451613
//-------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)