Skip to content

Commit

Permalink
Disable the ASatar passability highlighting for the editor
Browse files Browse the repository at this point in the history
  • Loading branch information
ipochto committed Dec 5, 2023
1 parent 4ddc43a commit ec398b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/map/map_draw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#include "unittype.h"
#include "ui.h"
#include "video.h"
#include "editor.h"

#include <cstdlib>

Expand Down Expand Up @@ -349,7 +350,7 @@ void CViewport::DrawMapBackgroundInViewport(const fieldHighlightChecker highligh
Map.TileGraphic->DrawFrameClip(tile, dx, dy);
#ifdef DEBUG
// AStar passability overlay
if (CViewport::isPassabilityHighlighted()) {
if (CViewport::isPassabilityHighlighted() && Editor.Running == EditorNotRunning) {

HighlightGraphicalTileInViewport(dx, dy, graphicTileOffset, sx,
[](const CMapField &mf) -> bool { return mf.getFlag() & MapFieldUnpassable; },
Expand Down
1 change: 0 additions & 1 deletion src/map/map_fog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,6 @@ void CViewport::Clean()
if (this->FogSurface) {
CleanFog();
}
this->ShowAStarPassability = false;
}

void CViewport::CleanFog()
Expand Down

0 comments on commit ec398b5

Please sign in to comment.