Skip to content

Commit

Permalink
Disable ASatr passability highlighting for editor
Browse files Browse the repository at this point in the history
  • Loading branch information
ipochto committed Dec 5, 2023
1 parent 4ddc43a commit 5fd0254
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "cppdbg",
"linux": {
"program": "${workspaceFolder}/build/stratagus-dbg",
"args": ["-W", "-a", "-d", "${workspaceFolder}/../data.${input:game}"],
"args": ["-W", "1600x1000" ,"-v", "640x480", "-F", "-a", "-d", "data.${input:game}", "-u", "./"],
"environment": [
{"name": "OMP_WAIT_POLICY", "value": "passive"}
],
Expand All @@ -22,7 +22,7 @@
"externalConsole": false,
},
"stopAtEntry": false,
"cwd": "${workspaceFolder}/../${input:game}",
"cwd": "${workspaceFolder}/../../data",
},
],
"inputs": [
Expand Down
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 5fd0254

Please sign in to comment.