Autowalker now correctly faces enemies to fight them.
This commit is contained in:
parent
9faad5f263
commit
759f93cae0
3 changed files with 19 additions and 31 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue