Vast improvement in the world generation, with more reliable pathing, cleaner generation code, and an ability to do a random or direct walk to create paths. This also works with enemies if I want.
This commit is contained in:
parent
c7607533ce
commit
0b4392dbcc
7 changed files with 151 additions and 77 deletions
|
@ -44,7 +44,7 @@ void System::enemy_pathing(DinkyECS::World &world, Map &game_map, Player &player
|
|||
if(ent != player.entity) {
|
||||
Point out = position.location; // copy
|
||||
if(game_map.distance(out) < config.HEARING_DISTANCE) {
|
||||
game_map.neighbors(out, false);
|
||||
game_map.neighbors(out);
|
||||
motion = { int(out.x - position.location.x), int(out.y - position.location.y)};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue