Lighting now works, now to get multiple lights.
This commit is contained in:
parent
4ceacecfda
commit
6174df5ec7
4 changed files with 36 additions and 13 deletions
4
map.cpp
4
map.cpp
|
@ -192,9 +192,9 @@ bool Map::neighbors(Point &out, bool greater) {
|
|||
// BUG: sometimes cur is in a wall so finding neighbors fails
|
||||
for(size_t i = 0; i < dirs.size(); ++i) {
|
||||
Point dir = dirs[i];
|
||||
int target = inmap(dir.x, dir.y) ? $paths[dir.y][dir.x] : 1000;
|
||||
int target = inmap(dir.x, dir.y) ? $paths[dir.y][dir.x] : $limit;
|
||||
|
||||
if(target == 1000) continue; // skip unpathable stuff
|
||||
if(target == $limit) continue; // skip unpathable stuff
|
||||
|
||||
int diff = cur - target;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue