X-Git-Url: https://plomlompom.com/repos/index.html?a=blobdiff_plain;f=src%2Fserver%2Ffield_of_view.c;h=07e1455999a0f81de63ce97b667ed03fd6f6a6b6;hb=491e8bc8e7a9b1d312256817c0b8be7e05b127be;hp=4b1ac00194d6a9498b2e3a5a3a8bba818bb147cd;hpb=3dedf6344c941891491773d1cc5d647aa664b218;p=plomrogue diff --git a/src/server/field_of_view.c b/src/server/field_of_view.c index 4b1ac00..07e1455 100644 --- a/src/server/field_of_view.c +++ b/src/server/field_of_view.c @@ -374,7 +374,7 @@ static void update_map_memory(struct Thing * t_eye, uint32_t map_size) struct ThingInMemory * tm = t_eye->t_mem; struct ThingInMemory * tm_prev = NULL; struct ThingInMemory * tm_next = NULL; - for (; tm != NULL; tm = tm_next) + for (; tm; tm = tm_next) { tm_next = tm->next; if ('v' == t_eye->fov_map[tm->pos.y * world.map.length + tm->pos.x]) @@ -393,7 +393,7 @@ static void update_map_memory(struct Thing * t_eye, uint32_t map_size) tm_prev = tm; } struct Thing * t = world.things; - for (; t != NULL; t = t->next) + for (; t; t = t->next) { if ( !t->lifepoints && 'v' == t_eye->fov_map[t->pos.y * world.map.length + t->pos.x])