--- deliantra/Deliantra-Client/Client.xs 2008/07/20 02:55:36 1.267 +++ deliantra/Deliantra-Client/Client.xs 2008/07/20 15:05:13 1.270 @@ -371,6 +371,8 @@ #define CELL_CLEAR(cell) \ do { \ + if ((cell)->player) \ + (cell)->tile [2] = 0; \ (cell)->darkness = 0; \ (cell)->stat_hp = 0; \ (cell)->flags = 0; \ @@ -671,7 +673,9 @@ const_iv (SDL_GL_MULTISAMPLEBUFFERS), const_iv (SDL_GL_MULTISAMPLESAMPLES), const_iv (SDL_GL_ACCELERATED_VISUAL), - const_iv (SDL_GL_SWAP_CONTROL) + const_iv (SDL_GL_SWAP_CONTROL), + + const_iv (FOW_DARKNESS) # undef const_iv }; @@ -699,6 +703,12 @@ NV ceil (NV x) +NV ceilabs (NV x) + CODE: + RETVAL = x < 0. ? - ceil (-x) : ceil (x); + OUTPUT: + RETVAL + IV minpot (UV n) IV popcount (UV n) @@ -2234,7 +2244,7 @@ mx += self->x - 1; my += self->y - 1; - memset (darkness1, 255, sw1 * sh1); + memset (darkness1, 255 - FOW_DARKNESS, sw1 * sh1); for (y = 0; y < sh1; y++) if (0 <= y + my && y + my < self->rows)