X-Git-Url: https://plomlompom.com/repos/feed.xml?a=blobdiff_plain;f=src%2Fserver%2Fio.c;h=947c1468b48711d998e875bb76924e6a0da3d03d;hb=3cb6ed6453b22eba62f7c9186790813b0abebeb9;hp=485313a4bff954f0da115d30ff12061af993f32b;hpb=9281cb7dd7656ff5d19e0747f819051a884649ec;p=plomrogue diff --git a/src/server/io.c b/src/server/io.c index 485313a..947c146 100644 --- a/src/server/io.c +++ b/src/server/io.c @@ -17,7 +17,6 @@ #include "../common/rexit.h" /* exit_trouble() */ #include "../common/try_malloc.h" /* try_malloc() */ #include "cleanup.h" /* set_cleanup_flag() */ -#include "field_of_view.h" /* VISIBLE */ #include "hardcoded_strings.h" /* s */ #include "things.h" /* Thing, ThingType, ThingAction, get_thing_type(), * get_player() @@ -309,7 +308,7 @@ static char * build_visible_map(struct Thing * player) uint32_t pos_i; for (pos_i = 0; pos_i < map_size; pos_i++) { - if (player->fov_map[pos_i] & VISIBLE) + if (player->fov_map[pos_i] == 'v') { visible_map[pos_i] = world.map.cells[pos_i]; } @@ -322,8 +321,7 @@ static char * build_visible_map(struct Thing * player) { for (t = world.things; t != 0; t = t->next) { - if ( ( player->fov_map[t->pos.y * world.map.length +t->pos.x] - & VISIBLE) + if ( 'v'==player->fov_map[t->pos.y*world.map.length+t->pos.x] && ( (0 == i && 0 == t->lifepoints) || (1 == i && 0 < t->lifepoints))) {