|
|
@ -89,9 +89,9 @@ void System::enemy_pathing(GameLevel &level) { |
|
|
|
Point out = position.location; // copy
|
|
|
|
Point out = position.location; // copy
|
|
|
|
|
|
|
|
|
|
|
|
if(enemy_ai.wants_to("find_enemy")) { |
|
|
|
if(enemy_ai.wants_to("find_enemy")) { |
|
|
|
map.neighbors(out, motion.random, PATHING_TOWARD); |
|
|
|
map.random_walk(out, motion.random, PATHING_TOWARD); |
|
|
|
} else if(enemy_ai.wants_to("run_away")) { |
|
|
|
} else if(enemy_ai.wants_to("run_away")) { |
|
|
|
map.neighbors(out, motion.random, PATHING_AWAY); |
|
|
|
map.random_walk(out, motion.random, PATHING_AWAY); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
motion = { int(out.x - position.location.x), int(out.y - position.location.y)}; |
|
|
|
motion = { int(out.x - position.location.x), int(out.y - position.location.y)}; |
|
|
|