fixed the map generator doing paths that hit the edge which made it look like the map was out of bounds.
This commit is contained in:
parent
194cc6664b
commit
6b4bc6cc11
5 changed files with 23 additions and 4 deletions
|
@ -8,9 +8,6 @@ namespace lighting {
|
|||
void LightRender::render_square_light(LightSource source, Point at, PointList &has_light) {
|
||||
for(matrix::in_box it{$lightmap, at.x, at.y, (size_t)floor(source.radius)}; it.next();) {
|
||||
if($paths.$paths[it.y][it.x] != WALL_PATH_LIMIT) {
|
||||
if(it.x == at.x && it.y == at.y) {
|
||||
println("distance at center: {}", it.distance());
|
||||
}
|
||||
$lightmap[it.y][it.x] = light_level(source.strength, it.distance(), it.x, it.y);
|
||||
has_light.push_back({it.x, it.y});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue