Autowalker now correctly faces enemies to fight them.

This commit is contained in:
Zed A. Shaw 2025-09-02 11:31:01 -04:00
parent 9faad5f263
commit 759f93cae0
3 changed files with 19 additions and 31 deletions

View file

@ -92,12 +92,15 @@ PathingResult Pathing::find_path(Point &out, int direction, bool diag)
if(weight == direction) {
out = {x, y};
found = true;
// only break if this is a lower path
return true;
} else if(weight == 0) {
out = {x, y};
found = true;
// only found an equal path, keep checking
}
// this says keep going
return false;
};