Enemy pathing is back.
This commit is contained in:
parent
54fa1a23ce
commit
435ad8f237
2 changed files with 6 additions and 0 deletions
5
map.cpp
5
map.cpp
|
@ -293,6 +293,10 @@ void Map::set_target(const Point &at, int value) {
|
|||
$input_map[at.y][at.x] = 0;
|
||||
}
|
||||
|
||||
void Map::clear_light_target(const Point &at) {
|
||||
$input_map[at.y][at.x] = 1;
|
||||
}
|
||||
|
||||
void Map::clear_target(const Point &at) {
|
||||
$input_map[at.y][at.x] = 1;
|
||||
}
|
||||
|
@ -407,6 +411,7 @@ int Map::light_level(int level, size_t x, size_t y) {
|
|||
void Map::render_light(LightSource source, Point at) {
|
||||
Point min, max;
|
||||
light_box(source, at, min, max);
|
||||
clear_light_target(at);
|
||||
|
||||
for(size_t x = min.x; x <= max.x; ++x) {
|
||||
for(size_t y = min.y; y <= max.y; ++y) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue