[Change] Avoid using numerals when TILE_WIDTH and TILE_HEIGHT are defined in Unuk/Constants.h
This commit is contained in:
parent
87c075ddb0
commit
50db738194
@ -39,8 +39,7 @@ bool MapTile::GetSuccessors(AStarSearch<MapTile>* search, MapTile* parent) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add tile to the right if possible
|
// Add tile to the right if possible
|
||||||
// TODO: replace 64 with map width
|
if(tileX < TILE_WIDTH) {
|
||||||
if(tileX < 64) {
|
|
||||||
MapTile& successor = _level->GetTile(tileX + 1, tileY);
|
MapTile& successor = _level->GetTile(tileX + 1, tileY);
|
||||||
if(successor.GetTileSolidity() || successor.GetEntitySolitity()) {
|
if(successor.GetTileSolidity() || successor.GetEntitySolitity()) {
|
||||||
search->AddSuccessor(successor);
|
search->AddSuccessor(successor);
|
||||||
@ -56,8 +55,7 @@ bool MapTile::GetSuccessors(AStarSearch<MapTile>* search, MapTile* parent) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add tile to the top if possible
|
// Add tile to the top if possible
|
||||||
// TODO: replace 64 with map height
|
if(tileY < TILE_HEIGHT) {
|
||||||
if(tileY < 64) {
|
|
||||||
MapTile& successor = _level->GetTile(tileX, tileY + 1);
|
MapTile& successor = _level->GetTile(tileX, tileY + 1);
|
||||||
if(successor.GetTileSolidity() || successor.GetEntitySolitity()) {
|
if(successor.GetTileSolidity() || successor.GetEntitySolitity()) {
|
||||||
search->AddSuccessor(successor);
|
search->AddSuccessor(successor);
|
||||||
|
Loading…
Reference in New Issue
Block a user